Re: [xml-dev] Come On, DTD, Come On! Thoughts on DSDL Part 9
by John Cowan other posts by this author
Jun 14 2002 3:54AM messages near this date
Re: [xml-dev] Come On, DTD, Come On! Thoughts on DSDL Part 9
|
Re: [xml-dev] Come On, DTD, Come On! Thoughts on DSDL Part 9
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@[...].com> 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_
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org> , an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
Thread:
John Cowan
Marcus Carr
Eric Bohlman
Marcus Carr
james anderson
james anderson
james anderson
Marcus Carr
Arjun Ray
Marcus Carr
Arjun Ray
John Cowan
Arjun Ray
John Cowan
Arjun Ray
John Cowan
Arjun Ray
John Cowan
Deborah Aleyne Lapeyre
John Cowan
Thomas B. Passin
Ronald Bourret
Ronald Bourret
Michael Kay
Thomas B. Passin
james anderson
David Carlisle
james anderson
David Carlisle
james anderson
David Carlisle
james anderson
Michael Kay
james anderson
David Carlisle
Tim Bray
Ronald Bourret
Ronald Bourret
Ronald Bourret
Arjun Ray
John Cowan
Arjun Ray
John Cowan
Arjun Ray
John Cowan
John Cowan
james anderson
John Cowan
Rick Jelliffe
Arjun Ray
John Cowan
Rick Jelliffe
Rick Jelliffe
Dennis Sosnoski
John Cowan
Dennis Sosnoski
John Cowan
Dennis Sosnoski
Arjun Ray
G. Ken Holman
John Cowan
Arjun Ray
james anderson
Arjun Ray
John Cowan
Arjun Ray
Rick Jelliffe
John Cowan
Arjun Ray
John Cowan
John Cowan
james anderson
John Cowan
james anderson
james anderson
John Cowan
james anderson
james anderson
John Cowan
Ronald Bourret
Ronald Bourret
Jonathan Borden
Ronald Bourret
Michael Fuller
John Cowan
Bob Hutchison
james anderson
Thomas B. Passin
John Cowan
Ronald Bourret
John Cowan
Thomas B. Passin
Ronald Bourret
Ronald Bourret
james anderson
Norman Walsh
K. Ari Krupnikov
John Cowan
John Cowan
K. Ari Krupnikov
John Cowan
G. Ken Holman
Ronald Bourret
Rick Jelliffe
John Cowan
Marcus Carr
G. Ken Holman
John Cowan
Michael Fitzgerald
Paul Prescod
John Cowan
John Cowan
|