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

Re: XML Schema Question: default namespace misses attributes

  • From: John Cowan <jcowan@r...>
  • To: "Rev. Bob the Twice-Ordained" <rev-bob@g...>
  • Date: Thu, 10 Feb 2000 13:02:33 -0500

html id namespace
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)


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.