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

Re: Namespaces on Attribute Names

  • From: David Megginson <david@m...>
  • To: "xml-dev@i..." <xml-dev@i...>
  • Date: Tue, 21 Jul 1998 13:37:48 -0400

xml defaulting qualified attributes
james anderson writes:

 > the suggested interpretation of qualified attribute names conflates
 > two things (inheritance and namespaces). these are better left
 > distinct - at least on the conceptual level on which i understood
 > the response to have been situated.

Please take my posting as descriptive rather than prescriptive: I'm
attempting to supply an explicit conceptual framework for something
that never properly had one, but am not promoting that framework as a
good solution.

 > do i understand the suggestion correctly, to specify that the
 > presence of an attribute from a given namespace denotes a dynamic
 > subtype relation between the containing element and an element with
 > the same name as the prefix used for the namespace (the correctness
 > of applying 'LC.getRefNo' to the element).

No, I wouldn't go that far, mainly because namespaces don't have
elements or attributes; they just have names.

I'd suggest instead that the attribute from a given namespace implies
a subtype relationship between the current element and an unnamed
element type that includes the qualified attribute.

 > aren't there alternative ways to expresss that? ways which would be
 > just as expressive, though less terse, but which would also allow
 > permit other denotations and which don't lead to the such quandries
 > as the following.

(That's probably a rhetorical question.)  Yes, architectural forms
handle this situation much more smoothly by explicitly naming the
supertype, though AF's, too, have their warts in other areas.

 > if i follow your c++ example back to xml, i understand it to imply, for
 > example, that the possible declaration
 > 
 > <!ATTLIST LC LC:refno CDATA #REQUIRED >
 > 
 > applies to any element in which the attribute is present, but doesn't apply
 > when the attribute is not. !?

Namespaces and DTDs are two different kinds of things: a DTD specifies
what an author is allowed to include in a specific document, and what
defaulting for attribute values, etc., should be used.  A namespace
simply guarantees that a name is globally unique, whatever that name
happens to be used for.

 > is this the kind of thing mr murray-rust is always alluding to when
 > he mentions the "rather hairy problems of validating dtds" in the
 > presence of qualified names?

There's not really a problem from that perspective: a DTD can/will
restrict the particular uses of namespaces in a document, as in the
following example:

  <!ATTLIST doc
    LC:refno CDATA #REQUIRED
    CRTC:rating CDATA "restricted">

The problem with DTDs will come if namespaces include some kind of
defaulting or local scoping mechanism -- at that point, writing a DTD
for an XML document will become extremely difficult.


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.