xsl-list
[Top] [All Lists]

Re: [xsl] Behavior of document() Function with Empty String

2006-12-17 13:09:46
Colin Paul Adams wrote:
Whatever, I agree with your conclusion that you cannot rely on
document ('') working.

Though I don't fully understand what the phrase "no base uri" may mean here in this discussion, I think it's in place here to state that document('') never works once you offset the base uri by using xml:base in the xsl:stylesheet element, or in any direct ancestor to the element containing the document('') instruction.

In a particular project of us, all stylesheets from a stylesheet library are located in a certain directory structure, deeper nested than the input/output sources location. To get easy access to the paths of input/output and for all stylesheets to "see" the same directory structure, all those stylesheets have an xml:base instruction of "../..". This has the (uncanny) side benefit of effectively disabling the call to document('').

Once you use document(''), be sure you do not have an ancestor parent element containing an xml:base element.

Cheers,
Abel Braaksma

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--