[Home] [By Thread] [By Date] [Recent Entries]

  • From: David Megginson <ak117@f...>
  • To: xml-dev@i...
  • Date: Tue, 27 Jan 1998 08:44:44 -0500

Stefan Mintert writes:

 > What's the purpose of an empty AttlistDecl?
 > Shouldn't production [52] read instead as follows?
 > 
 >        AttlistDecl ::= '<!ATTLIST' S Name AttDef+ S? '>'
 > 
 > (+ instead of *)

Actually, it turns out to be remarkably useful for external DTD
subsets.  Consider this:

  <![%security;[
    <!ENTITY % security-atts "
      level CDATA #REQUIRED
      auth CDATA #REQUIRED">
  ]]>
  <!ENTITY % security-atts "">

  <!ATTLIST section %security-atts;>

Now, if the %security; parameter entity is set to "INCLUDE" (to enable
security features), you will get

  <!ATTLIST section
    level CDATA #REQUIRED
    auth CDATA #REQUIRED>

If the %security; parameter entity is set to "IGNORE" (to disable
security features), you will get

  <!ATTLIST section>

Fortunately, this is still legal in XML.


All the best,


David

-- 
David Megginson                 ak117@f...
Microstar Software Ltd.         dmeggins@m...
      http://home.sprynet.com/sprynet/dmeggins/

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...)


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member