Re: XML Schema Question: default namespace misses attributes
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)
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