|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] default base-uri?John Snelson jsnelson at sleepycat.comSun Jan 8 17:42:00 PST 2006
Berkeley DB XML does not parse it's queries from a file, so it cannot
set the base URI to the location of the query. Instead, we provide a
default base URI of "dbxml:", which is the URI scheme that we use in
fn:collection() and fn:doc() to access the database. This allows our
users to write relative URIs as an argument to those functions, and have
it resolve by default to the database.
John
Per Bothner wrote:
> 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.
--
John Snelson, Berkeley DB XML Engineer
Sleepycat Software, Inc
http://www.sleepycat.com
Contracted to Sleepycat through Parthenon Computing Ltd
http://blog.parthcomp.com/dbxml
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






