Closed
Bug 49462
Opened 24 years ago
Closed 21 years ago
XML Base should affect processing instruction href
Categories
(Core :: XML, defect, P3)
Core
XML
Tracking
()
RESOLVED
INVALID
Future
People
(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)
References
()
Details
From the spec:
"A relative URI appearing in the content of a processing instruction is resolved
against the base URI described by the xml:base attribute of the nearest ancestor
element having an xml:base attribute."
Currently we only care about XML Base in the context of simple XLinks.
Comment 1•24 years ago
|
||
Heikki,
Thanks for the link to XML base document.Read the spec and made a few QA tests .
At first glance, it looked like you would need to specfiy a namespace for base
but that appears not to be the case.Since you need to declare xlink namespace,
this must cover this attribute. Yes ?
Assignee | ||
Comment 2•24 years ago
|
||
XML Base is totally independent of XLink. XLink depends on XML Base.
Now, XML Base is declared with adding the attribute "xml:base" to XML elements.
There is no need to declare namespace for the prefix "xml"; it is implicitly set
so you can just use it. The namespace prefix "xml" is also reserved so I guess
it would be illegal to try and define it.
XML Base is scoped, so if you need to get the XML Base for some element you need
to traverse the parents of that element to compute the full absolute XML Base
URI. There are samples/tests of the use of XML Base in the context of simple
XLinks in mozilla/layout/xml/tests/xmlbase/xmlbase.xml
I'll give an example how this affects PIs (processing instructions):
<?xml version="1.0"?>
<?xml-stylesheet href="http://www.mozilla.org/style.css" type="text/css">
<doc xml:base="http://www.netscape.com">
<?xml-stylesheet href="/style.css" type="text/css">
<doc>
The first stylesheet PI gets the style.css from the www.mozilla.org server. The
second PI is inside the effect of XML Base that has been set on the doc element,
so the second PI will get its style.css from the www.netscape.com server.
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•24 years ago
|
||
XML Base is still a working draft, and lately there has been some discussion
about whether XML Base should affect PIs or not. Based on these uncertainties
and the workaround of using absolute URIs I am going to Future this.
This bug has been marked "future" because the original netscape engineer working
on this is over-burdened. If you feel this is an error, that you or another
known resource will be working on this bug,or if it blocks your work in some way
-- please attach your concern to the bug for reconsideration.
Target Milestone: --- → Future
Assignee | ||
Updated•24 years ago
|
Target Milestone: Future → mozilla0.9
Assignee | ||
Comment 4•24 years ago
|
||
Not that important yet I think...
Target Milestone: mozilla0.9 → Future
Assignee | ||
Comment 5•24 years ago
|
||
Hmm... xml-stylesheet can only appear in document prolog, the example with
stylesheets was wrong.
With the current implementation of DOM 3 baseURI (not yet checked in) you would
get to proper baseURI for PI as well.
Updated•22 years ago
|
QA Contact: petersen → rakeshmishra
Updated•22 years ago
|
QA Contact: rakeshmishra → ashishbhatt
Comment 6•21 years ago
|
||
XML processing instructions implement BaseURI correctly. Since the PIs
themselves never do anything, it's the caller that needs to make sure to get the
base URI off the PI when resolving relative URIs.
So is there anything left to do here?
Assignee | ||
Comment 7•21 years ago
|
||
I think we can close this.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•