[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

default base-uri?

Michael Kay mhk at mhk.me.uk
Sun Jan 8 14:10:10 PST 2006


uri current directory
I would expect that if the query is read from a resource that has a known
URI, then that URI will be taken as the base URI. If it isn't (for example,
if it is simply a string in a Java program) then the initial base URI will
be undefined, and that any attempt to access it will be an error. However,
an alternative approach would be to use the "current working directory" if
the operating system has such a concept. Many JAXP implementations adopt
this approach, but I think it's a bit questionable.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: http://xquery.com/mailman/listinfo/talk 
> [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf Of Per Bothner
> Sent: 08 January 2006 00:23
> To: http://xquery.com/mailman/listinfo/talk
> Subject:  default base-uri?
> 
> What is the "default" base-uri when base-uri has not been
> explicitly specified.  The XQuery specification says "none",
> but what does that mean in practice?
> 
> If my query contains:
>    fn:doc("foo.xml")
> and assume there is no "declare base-uri" declaration.
> Section C.1 of the specifcation says that an implementation
> is allowed to overwrite or augment the default, so the result
> is implementation-defined.  But what *should* it be, assuming
> the user have not explicitly specifier a base uri?
> 
> * An error?
> * Resolved relative to the source code of the XQuery, assuming
> that is meaningful - e.g. the directory containing the query file?
> * Resolved relative to the "current directory", assuming that
> is meaningful?  If so, current directory at compile-time or at
> run-time, if there is a distinction?  If the latter, then the
> base-uri is not static - though one could define kludges
> like "file:." or "current-directory:foo.xml".
> 
> I have some ideas, but maybe people with wider experience have
> expectations they could share.
> -- 
> 	--Per Bothner
> http://xquery.com/mailman/listinfo/talk   http://per.bothner.com/
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk
> 




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.