OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Empty AttlistDecl

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <ak117@freenet.carleton.ca>
  • To: xml-dev@ic.ac.uk
  • 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@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
      http://home.sprynet.com/sprynet/dmeggins/

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


  • References:



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS