xsl-list
[Top] [All Lists]

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

2006-12-18 03:46:54
Andrew Welch wrote:

Isn't it because the stylesheet doesn't actually live at the location
that xml:base is referring to, therefore no XML file is returned?  So
it's not that uncanny, just that there's nothing to return.

Indeed. As a matter of fact (afaik): once you use xml:base (pointing to something else than your current stylesheet) you have no way of referring to your current stylesheet. Which also means that pointing to a directory/path where the stylesheet resides does not work: document("") will then try to retrieve the path, not the stylesheet in that path (it has no way to know it).

This will still work (for document('')), provided the url resolves to a real XML doc:
xml:base="./mystylesheet.xslt"

This won't, as document('') tries to load the path, which does not resolve to a file containing any xml:
xml:base="./"

-- Abel


--~------------------------------------------------------------------
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>
--~--