[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Behavior of document() Function with Empty String

Subject: Re: Behavior of document() Function with Empty String
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Mon, 18 Dec 2006 11:45:30 +0100
Re:  Behavior of document() Function with Empty String
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.