xml-add- base and relative

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 UTC