Re: Does DTD validation work with namespaces?
by Rick JELLIFFE other posts by this author
Aug 10 2000 8:33AM messages near this date
Re: Does DTD validation work with namespaces?
|
Re: Does DTD validation work with namespaces?
Amy Lewis wrote:
> Oh, yuck! (to use the technical term)
> Or must I say, "Nope, can't do that," and "just" do XHTML?
A possible approach would be for everyone on XML-DEV to agree on several
parameter entities and naming conventions they will use for the contents
of the most popular elements.
For example, let us say we have three kinds of elements we want to put
under this regime: inline text, block-level text, and container text.
Then we all agree to write our DTDs so that we do
<!DOCTYPE myData [
<!-- Files containing PEs with content models -->
<!ENTITY % johns-models SYSTEM
"http://john.com/johns-element-set1.dtd">
<!ENTITY % svg-models SYSTEM "http://sgv.org/svg-element-set1.dtd">
<!ENTITY % marys-models SYSTEM "http://mary.net/mary-element-set1.dtd">
<!-- Bring in all the declarations for content models. -->
%johns-models;
%svg-models;
%marys-models;
<!-- Add all them together so that all are available, inlcuding local
decs -->
<!ENTITY XML-DEV-block-elements
" %johns-block-elements; | %svg-block-elements; |
%marys-block-elements">
<!ENTITY XML-DEV-inline-elements
" %johns-inline-elements; | %svg-inline-elements; |
%marys-inline-elements">
<!ENTITY XML-DEV-container-elements
" %johns-container-elements; | %svg-container-elements; |
%marys-container-elements | myData ">
<!-- Now all the content models are available, bring in the
declarations
for elements, attlists, etc -->
<!ENTITY % johns-structures SYSTEM
"http://john.com/johns-element-set1.dtd">
<!ENTITY % svg-structures SYSTEM "http://sgv.org/svg-element-set1.dtd">
<!ENTITY % marys-structures SYSTEM
"http://mary.net/mary-element-set1.dtd">
%johns-structures;
%svg-structures;
%marys-structures;
<!-- here is a local element too -->
<!ELEMENT myData ( %XML-DEV-block-elements; )>
]>
<myData/>
In other words, we all create one entity containing our contributions to
the content models of each type, named using a well-known suffix. Then,
in another entity, we put all our declarations proper, but in the
content models, we just reference well-known public names (
%XML-DEV-*-elements) to be defined.
Advantage: allow anyone to import an element set and retain strong
typing.
Disadvantage: no-one uses such a convention now; will look clunky to
people who don't like text processing; need to agree on fundamental set
of patterns to which we all can write.
...no chance I think :-)
Rick
Thread:
Paul W. Abrahams
Rick JELLIFFE
W. E. Perry
Jonathan Borden
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
John F. Schlesinger
Jonathan Borden
Simon St.Laurent
W. E. Perry
John Cowan
Rick JELLIFFE
Rick JELLIFFE
Sean McGrath
Simon St.Laurent
Jonathan Borden
Sean McGrath
Rick JELLIFFE
Rick JELLIFFE
Simon St.Laurent
James Robertson
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
Paul W. Abrahams
Jonathan Borden
Paul W. Abrahams
Rick JELLIFFE
Dan Vint
Rick JELLIFFE
Marcus Carr
Michael Champion
John Cowan
John Cowan
John Cowan
Michael Champion
Winchel 'Todd' Vincent, III
John Cowan
Jonathan Borden
sam th
Jonathan Borden
Simon St.Laurent
John Cowan
John Cowan
John Cowan
Simon St.Laurent
Richard Lanyon
John Cowan
Jonathan Borden
John Cowan
Simon St.Laurent
John Cowan
Jonathan Borden
Rick JELLIFFE
james anderson
Winchel 'Todd' Vincent, III
Winchel 'Todd' Vincent, III
Rick JELLIFFE
Norman Walsh
Jonathan Borden
Winchel 'Todd' Vincent, III
Jonathan Borden
Norman Walsh
Winchel 'Todd' Vincent, III
Amy Lewis
Eric Bohlman
John Cowan
Simon St.Laurent
Jeff Greif
Jonathan Borden
Elliotte Rusty Harold
Sean McGrath
Simon St.Laurent
Joe English
Simon St.Laurent
Jonathan Borden
Simon St.Laurent
W. E. Perry
Jonathan Borden
John Cowan
John Cowan
Sean McGrath
W. E. Perry
John F. Schlesinger
Sean McGrath
Michael Champion
Michael Champion
Paul W. Abrahams
John Cowan
Paul W. Abrahams
Paul W. Abrahams
Simon St.Laurent
Martin Gudgin
Jonathan Borden
Simon St.Laurent
Tim Bray
Jonathan Borden
Jack Rusher
Steve Rowe
|