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

Re: What are the characteristics of a good type system for XML


characteristics of a good graph
Jeni Tennison <jeni@j...> wrote:

| My point was that they're not just names. If you declare an attribute
| as being of type ID, you not only say that the attribute must have a
| value that meets the lexical constraints of being a name, you also say
| that no other ID-type attribute in the document has the same value. If
| you declare an attribute as being of type ENTITY, as well as stating
| the format of the value of the attribute you state that there is an
| unparsed entity declared in the DTD with that name. And so on for
| NOTATION, IDREF and so on. They don't just constrain the value of the
| attribute, they constrain other aspects of the document.

Okay, I think I misunderstood what you meant by "limits on the scope of a
type definition". :-)

The NAME categories (ID et al) are somewhat special in SGML/XML.  Apart
from ID, the others are all referential, pointing to constructs by what
amount to instrumental names, (i.e. names that function as aliases - IDs,
notation names and entity names).  They have no purpose or significance
other than to connect parts of the graph that make up the document.  That
is, they're just pointers and glue.  We shouldn't expect to manipulate
them as values per se - that is, to perform "typed operations" on them,
such as mutating them as if they were strings, performing arithmetic on
them if they could be taken as numbers, etc.  (About the only operation
permissible on them is to dereference them!)  To that extent we shouldn't
expect a type system of values to say anything about them, other than to
recognize their special status as somewhat Lisp-ish symbols.

This goes back to my earlier comment that apart from string as the ur-type
XML has an intrinsic notion of NAME too - anything that is a NAME can't be
manipulated as a value: it can only be mapped to some referent - which,
btw, could be yet another NAME.  (One of the reasons I'm not a fan of XSLT
is its poor support for lists of NAMEs;  quite often these are association
lists encapsualting semantic understandings - but getting to such cheap
lookup tables from an operational perspective is a royal pain.)

| Yes, I agree. I think that the other kinds of constraints that these
| types impose should be dealt with at a different level of validation.

Or as run time errors?


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.