Altova Mailing List Archives


Re: XML Schema Question: default namespace misses attributes

From: John Cowan <jcowan@-------------.--->
To: "Rev. Bob the Twice-Ordained" <rev-bob@----.--->
Date: 2/10/2000 8:15:00 AM
rev-bob@g... wrote:

> You misunderstand me somewhat; let's go for a concrete example.

By all means.

> <myDefs:book code="0312862792">Riders in the Sky</myDefs:book>
> 
> The question now becomes, what about the "code" attribute?  IMO, the
> parser should see the myDefs namespace on the <book> element, and try to
> find the "code" attribute in the myDefs definition of the <book> element first
> - because that is the most logical step to take.

Just so.  Unfortunately, without a DTD or XML Schema, there is no knowing
whether myDefs:book actually defines "code" as a valid attribute or not.
To allow consistent processing between validating and non-validating
parsers, therefore, ...

>  If that attribute is not found in
> that definition, the next logical place to look is in the rest of myDefs - to see
> if perhaps "code" is defined globally in that namespace.

... the above is not done.  Instead, "code" within myDefs:book always
means myDefs:book:code (not valid syntax, I know) and never
myDefs:code.  A specific application may choose to say that these
are synonymous, but at the namespace-aware parser level they are different.

> <myDefs:book html:id="mq4" code="0312862792">Riders in the Sky</myDefs:book>

No problem here: html:id means "id" freely floating in the html namespace, but
distinct from a (hypothetical) html:id element.

In short, you already have almost everything you want.
 
-- 

Schlingt dreifach einen Kreis vom dies! || John Cowan <jcowan@r...>
Schliesst euer Aug vor heiliger Schau,  || http://www.reutershealth.com
Denn er genoss vom Honig-Tau,           || http://www.ccil.org/~cowan
Und trank die Milch vom Paradies.            -- Coleridge (tr. Politzer)

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.