W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

xml-add- base and relative

From: David A. Lee <dlee@calldei.com>
Date: Mon, 29 Dec 2008 09:18:00 -0500
Message-ID: <D50550153D834F1795B42F7E5A1890C6@calldei.com>
To: "XProc Dev" <xproc-dev@w3.org>
Looking at the test case  add-xml-base-003.xml I  believe the intent is clear,
but I cant see how the specs supports the interpretation.

The relevent specs:
" if the value of the relative option is true, a string which, when resolved against the parent's [base URI], will give the element's [base URI], otherwise the element's [base URI]."

Given the parent's base URI:  
http://tests.xproc.org/tests/doc/xml-base-test.xml

And the element's base URI:

http://tests.xproc.org/tests/doc/xml-base-chap.xml

And using the definition of "resolve" from both the Java SDK for URI and the RFC 2396

The string which resolved against the parent's [base URI] to give the element's baseURI is the full URI

http://tests.xproc.org/tests/doc/xml-base-chap.xml


But the test expectations (and what I think is the "intent") is that the base URI for purposes of resolve (but NOT for purposes of the xml:base attribute) is the parent's base URI minus the final file component.
e.g.

http://tests.xproc.org/tests/doc

Hence the resultant string is "xml-base-chap.xml" which when resolved against
http://tests.xproc.org/tests/doc

produces 
http://tests.xproc.org/tests/doc/xml-base-chap.xml


Hence I think the spec needs to be changed to specify that resolution is NOT against the parent's base URI  but rather against the parent's base URI with the final path component removed.

-----------------------------------------------------------
David A. Lee
dlee@calldei.com  
http://www.calldei.com
http://www.xmlsh.org
Received on Monday, 29 December 2008 14:18:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 29 December 2008 14:18:37 GMT