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

Re: Does DTD validation work with namespaces?

  • From: Rick JELLIFFE <ricko@g...>
  • To: xml-dev@l...
  • Date: Thu, 10 Aug 2000 16:33:30 +0800

svg models
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

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.