OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: Does DTD validation work with namespaces?

[ Lists Home | Date Index | Thread Index ]
  • From: Rick JELLIFFE <ricko@geotempo.com>
  • To: xml-dev@lists.xml.org
  • Date: Thu, 10 Aug 2000 16:33:30 +0800

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
 <!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. -->

  <!-- Add all them together so that all are available, inlcuding local
decs -->
  <!ENTITY XML-DEV-block-elements 
	" %johns-block-elements; | %svg-block-elements; |
  <!ENTITY XML-DEV-inline-elements 
	" %johns-inline-elements; | %svg-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
      for elements, attlists, etc -->
 <!ENTITY % johns-structures SYSTEM
 <!ENTITY % svg-structures SYSTEM "http://sgv.org/svg-element-set1.dtd">
 <!ENTITY % marys-structures SYSTEM

  <!-- here is a local element too -->
  <!ELEMENT myData ( %XML-DEV-block-elements; )>


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
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 :-)



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS