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

Re: can dtds be extended?

  • From: Wayne Steele <xmlmaster@h...>
  • To: mbrown@i..., xml-dev@l...
  • Date: Wed, 12 Sep 2001 13:27:25 -0700

pmml dtd
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!

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.