|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: can dtds be extended?
Kinda Sorta. You'll have to use an "Internal Subset" to do this. Here's an example: ---standard.dtd--- <!ELEMENT E (#PCDATA)* > <!ATTLIST E a CDATA #REQUIRED > ------------------ 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" [ <!ATTLIST E b CDATA #IMPLIED > ]> <E 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@i...> >Reply-To: mbrown@i... >To: xml-dev@l... >Subject: can dtds be extended? >Date: Wed, 12 Sep 2001 12:02:13 -0700 > >Hi, >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" >with >my xml? Is there any way to support inheritance in XML? >thanks, >matt > > >----------------------------------------------------------------- >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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








