W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

Re: Schema validators expected to support xml:base?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 13 Mar 2002 16:19:33 +0000
Message-ID: <7628919664.20020313161933@jenitennison.com>
To: "Roger L. Costello" <costello@mitre.org>
CC: xmlschema-dev@w3.org, elharo@metalab.unc.edu
Hi Roger,

> I was looking through the section on XML Base in Elliotte Rusty
> Harold's book, XML Bible (Gold Edition). He seems to suggest that
> XML Schema validators are expected to understand XML Base:
>
> "It (xml:base) also applies to URLs found in XInclude include
> elements, processing instructions, W3C Schema language
> schemaLocation attributes, and more."

I think that this is accurate; both XInclude and XML Schema are built
on top of the Infoset, and the Infoset Rec states that:

  Several information items have a [base URI] or [declaration base
  URI] property. These are computed according to [XML Base].
                                     http://www.w3.org/TR/xml-infoset/

where [XML Base] is a reference to the XML Base Rec. Everything that's
built on top of the Infoset should take account of xml:base
attributes, from what I can tell.
                                     
> I did a quick look through the Structures spec and the only
> reference that I found to XML Base was:
>
> "Before this specification is finally completed, we will need to
> account for any changes [XML Base] makes to the Infoset in the areas
> of QName interpretation and value space and the interpretation of
> all aspects of schemas involving values identified as being of type
> anyURI, including in particular xsi:schemaLocation,
> xsi:noNamespaceSchemaLocation and targetNamespace."

(I think that you might be looking at an old version of the XML Schema
spec. I searched the XML Schema Structures Rec and couldn't find this
text anywhere within it.)

> Is this saying that schema validators are expected to support
> xml:base, and that I can use a relative URL in:
>
>    - schemaLocation
>    - noNamespaceSchemaLocation

I think so; the XML Schema Rec is very open about how XML Schema
validators actually retrieve schema documents using these attributes -
I think it's viewed as outside the scope of the Rec. I would expect
applications to use the [base URI] property of the element information
item that held a URI reference in order to resolve a URI reference,
but my expectations and observed behaviour are often divergent :)

>    - targetNamespace
>
> If we can use a relative URL in targetNamespace that that seems to
> be contrary to something else that Elliotte says:
>
> "The one common kind of URL that xml:base does not apply to is the
> namespace URL."

As I understand it, relative namespace URIs are deprecated (phew, that
side-steps that question!). See http://www.w3.org/2000/09/xppa, which
I think is still current (?).

> One last thing to note: I did a quick check and XSV does not seem to
> support xml:base (although it may be my firewall that's the problem
> and not XSV). Does anyone know of a schema validator which supports
> xml:base?

Well it doesn't look like either Xerces-C++ or MSXML do...

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Wednesday, 13 March 2002 11:19:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT