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

Re: Come On, DTD, Come On! Thoughts on DSDL Part 9

Re:  Come On
Arjun Ray scripsit:

> One use that I'd like to have (in SGML too) is a "virtual element type"
> whose basic purpose is grouping, allowing a complex content model to be
> analysed into simpler named components.  For instance, suppose we had a
> HTML-like specification like this:
>   <!ELEMENT  dl  (dt+,dd+)* >
> Sometimes it's useful to gather a term with its descriptions as a group,
> like this:
>   <!ELEMENT  dl  (dli)* >
>   <!MODEL  dli  (dt+,dd+) >

That is one of the many purposes of the RELAX NG pattern.  Note that
unlike parameter entities, patterns are fully structured, not lexical: but
like PEs, patterns subsume the WXS notions of {content model, attribute
group, etc.} declarations.

In a DTD-ish style of RNG you would write the above as:

dl = element dl {dli+}

dli = dt+, dd+

dt = element dt { <whatever> }

dd = element dd { <whatever> }

> Such "elements" could be required to have no tags!  (And they also take
> away one reason to use parameter entities.  An open issue would be whether
> such virtual elements should share the same namespace as element types, or
> be indicated specially in model groups with a distinct marker, such as a
> '$' or '@' prefix.) 

In RELAx NG they do *not* share the lexical space of element types.
Everything on the left side of "=" in RELAX NG is local to the schema
and never appears in the instance.  Element type names and attribute
names appear only after the words "element" and "attribute".

> I've never understood the distaste for DTDs.

My principal objection is that they provide only a single content model
per element type regardless of context.  This arises because they
conflate element types with particles in content models.  The treatment
of attributes is also weak, and nothing at all is done when alternation
between child elements and attributes is desirable.

John Cowan <jcowan@r...>     http://www.reutershealth.com
I amar prestar aen, han mathon ne nen,    http://www.ccil.org/~cowan
han mathon ne chae, a han noston ne 'wilith.  --Galadriel, _LOTR:FOTR_


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.