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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Extending DTDs for Backward Compatibility

[ Lists Home | Date Index | Thread Index ]
  • From: "Rick Jelliffe" <ricko@allette.com.au>
  • To: <xml-dev@ic.ac.uk>
  • Date: Sat, 31 Jan 1998 01:59:23 +1100


 
> From: Joe Lapp <jlapp@webmethods.com>

> >I need to create DTDs that are extensible...

The base DTD:

 <!--  Base DTD in file x.dtd -->
 <!ENTITY % x.addon " " >
 <!ELEMENT x  ( #PCDATA | table | chair %xaddon; ) >
 ...

In the document:

 <!DOCTYPE x SYSTEM "x.dtd"
 [
 <!ELEMENT Joes-new-extension-element ( #PCDATA ) >
 <!ENTITY % x.addon " | Joes-new-extension-element ">
 ]>

 <x>some text<Joes-new-extension-element/> some other
 text</x>

Parameter entities in the "internal subset" of the
Doctype declaration are parsed before the "eternal
subset" (i.e. x.dtd here).

The first declaration of an entity has precedence.

So you can derive a new DTD by merely declaring the new
element types you need in the internal subset, and then
defining the appropriate parameter entity.


Rick Jelliffe
 

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

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

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