[ http://issues.apache.org/jira/browse/XALANJ-2274?page=comments#action_12369312 ]
Henry Zongaro commented on XALANJ-2274: --------------------------------------- Dmitry Hayes pointed out to me that XPath 1.0 says nothing about base URI's, and that section 3.2 of XSLT 1.0[3] has this to say: Every node also has an associated URI called its base URI, which is used for resolving attribute values that represent relative URIs into absolute URIs. If an element or processing instruction occurs in an external entity, the base URI of that element or processing instruction is the URI of the external entity; otherwise, the base URI is the base URI of the document. So there is still a bug in both processors with respect to external entities, but they should not be sensitive to xml:base. [3] http://www.w3.org/TR/xslt#base-uri > Base URI is not correct for elements in external entities in input documents > or stylesheets or elements specifying xml:base > --------------------------------------------------------------------------------------------------------------------------- > > Key: XALANJ-2274 > URL: http://issues.apache.org/jira/browse/XALANJ-2274 > Project: XalanJ2 > Type: Bug > Components: XSLTC, DTM, Xalan-interpretive, parse-or-compile > Reporter: Henry Zongaro > Priority: Minor > > According to section 4.2 of the XML Base Recommendation,[1] > The base URI of an element is: > - the base URI specified by an xml:base attribute on the element, if one > exists, otherwise > - the base URI of the element's parent element within the document or > external entity, if one exists, otherwise > - the base URI of the document entity or external entity containing the > element. > Neither Xalan-J Interpretive nor XSLTC seems to correctly compute the base > URI of elements that have an xml:base attribute or that are in external > entities. This can be seen in a reference to the document function, where > the first argument is a string containing a relative URI and the second > argument either is absent, in which case the base URI of the element in the > stylesheet that contains the expression should be used as the base against > which the first argument is resolved, or is a node-set, in which case the > base URI of the first node in the node-set in document order should be used > as the base against which the first argument is resolved.[2] > [1] http://www.w3.org/TR/xmlbase/ > [2] http://www.w3.org/TR/xslt#document -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
