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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xml-dev] can dtds be extended?

Kinda Sorta.

You'll have to use an "Internal Subset" to do this.
Here's an example:


Now say you wanted to include or inherit this DTD, but add a 'b' attribute 
on the 'E' element. Your instance document might look like:

<?xml version="1.0" ?>
<!DOCTYPE E SYSTEM "standard.dtd" [
   a="i am a required attribute"
   b="I am an new attribute

If things end up getting too complicated, you can use External Parameter 
Entities to do much the same thing, and more.

-Wayne Steele

>From: Matt Brown <mbrown@insightful.com>
>Reply-To: mbrown@insightful.com
>To: xml-dev@lists.xml.org
>Subject: [xml-dev] can dtds be extended?
>Date: Wed, 12 Sep 2001 12:02:13 -0700
>I am using a published DTD (PMML) and need to add attributes to one of the
>elements. Is there any way I can do this, ie, extend the DTD in a way such
>that I can include extra information for my needs while still conforming to
>the published standard? For example, is there any way I can overwrite an
>element or attlist in an xml doc with a new one of the same name with more
>attributes? Can I reference 2 DTD's an include a smaller "DTD addition" 
>my xml? Is there any way to support inheritance in XML?
>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 elist use the subscription
>manager: <http://lists.xml.org/ob/adm.pl>

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp