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

Re: XML & SGML

  • From: "Conleth O'Connell" <cso@v...>
  • To: xml-dev@i...
  • Date: Wed, 6 May 1998 15:38:06 -0500

Re: XML & SGML
Lars Marius Garshol writes:
 > W. Eliot Kimber wrote:
 > > 
 > > The inability to use parameter entities inside of declarations is the
 > > problem--unless I've misunderstood the restriction.
 > 
 > You have. (Thankfully. Reassuring to see that you can be wrong about
 > something. :)
 > 
 > <!ELEMENT foo (%bar;)>
 > 
 > is entirely valid in the external subset, but not in the internal. This
 > is the relevant part of the spec (from section 2.8):
 > 
 > "Well-Formedness Constraint: PEs in Internal Subset
 > 
 >           In the internal DTD subset, parameter-entity references can 
 >           occur only where markup declarations can occur, not within 
 >           markup declarations. (This does not apply to references that 
 >           occur in external parameter entities or to the external 
 >           subset.)"
 > 
 > I still haven't found a sensible way to implement this in the external
 > subsets, though. :-(

It depends on your intent, but you may have use yet another level of
indirection.

Let's say I have DTD foo located at http://mycom.com/f.dtd

<!ENTITY % bar "baz | car">
<!ELEMENT foo (%bar;)>

The XML instance might look like:

<!DOCTYPE foo SYSTEM "http://mycom.com/f.dtd" [
<!ENTITY % bar "baz | car | xyzzy">
]>

<foo><xyzzy/></foo>

This is valid because the internal subset entity declaration is resolved
before the entity declaraition in the external subset.

The area I got tripped up was in the Attribute declarations:
 - only one element can be declared in each ATTLIST
 - it is more difficult to declare and use common attributes

This requires an intervening external subset to declare and use the
entities.  Too many years on DocBook I guess |-)

Cheers,
Con

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


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.