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

3 XML Base questions

xml base url
I have 3 questions on XML Base:

1. My first question is to make sure that I understand the big picture: 
It is my understanding that a specification will define whether or not
it supports XML Base, and if it does, it will define where (on what
elements) the xml:base URL can be applied.  For example, the XLink
specification says (my own words) "yes, we support XML Base; any href in
an XLink that has a relative URL will have the xml:base URL prepended". 
That is, a specification identifies where an xml:base URL may be
applied.  Contrast with a specification (A) that does not support XML
Base, then any A-aware tool is not expected to understand xml:base, and
will not do any URL-prepending.  Is this the way it works?

2. Assuming my statements in (1) are correct, then I would like to know
what specifications currently support XML Base, and what elements have
they identified as being XML Base-able.  Here's my initial stab at a

Specification         XML Base-able elements
HTML/XHTML            the href in an anchor element
                      the src in an image element

XInclude              the href in an include element

XLink                 the href in an XLink element

XML Schemas           the schemaLocation attribute
                      the noNamespaceSchemaLocation attribute
                      the targetNamespace attribute
                      (I am currently getting clarification on whether
                       these schema attributes are XML Base-able, so 
                       don't take this as gospel.  If anyone knows
                       with certainty please let me know.)

Are there other specifications which support XML Base?  What about RDDL?

3. With namespaces you can declare a namespace and use it, all in one
fell swoop.  For example:

   <c:Camera xmlns:c="http://www.camera.org">

Notice how I declared the namespace (and the prefix, c) on the Camera
element, and simultaneously qualified Camera.

Can we similarly declare an xml:base URL and use the xml:base URL?  For

   <BookCatalogue xml:base="http://www.example.org/"

Note how I declared the xml:base URL (http://www.example.org/) and
simultaneously used the xml:base URL in schemaLocation.  Thus, the
complete schemaLocation is: http://www.example.org/BookCatalogue.xsd. 
Is this legal - declare the xml:base URL and use it simultaneously?

Thanks!  /Roger


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.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.