[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! 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
|