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

  • From: David Megginson <ak117@f...>
  • To: xml-dev Mailing List <xml-dev@i...>
  • Date: Sun, 16 Nov 1997 17:07:13 -0500

I remember some postings recently wondering about the implications of
making elements (etc.) case-sensitive in XML.  I remember only Tim's
followup about IDs -- apologies if I'm going over well-worn ground
here.

As I understand it, if you set both NAMECASE GENERAL and NAMECASE
ENTITY to "NO" in full SGML, then there will be no case substitution
anywhere.  Since XML is an SGML application profile, that means that
you may use

  <!ELEMENT ...>, <!ATTLIST ...>, <!NOTATION ...>, and <!ENTITY ...>

but NOT

  <!Element ...>, <!Attlist ...>, <!Notation ...>, and <!Entity ...>

or

  <!element ...>, <!attlist ...>, <!notation ...>, and <!entity ...>

Furthermore, all element type names, attribute names, notation names,
entity names, _and_ attribute values (of any type) are also case
sensitive.  As a result, if you had this in your XML DTD:

  <!ATTLIST doc
    security   (unclassified|secret) #REQUIRED>

and this in your XML document:

  <doc security="SECRET">

the parser should report an error.  It also means that something like
this is legal (though pathologically wierd):

  <!ATTLIST question
    value (yes|Yes|yEs|yeS|YEs|YeS|yES|YES)>

The contents of processing instructions are never subject to case
substitution anyway, though the validation of their contents is also
mostly beyond (full) SGML's mandate; for consistency, however, it
would make sense to require everything there to be in upper-case as
well.  In other words,

  <?XML VERSION="1.0" ENCODING="ISO-LATIN-1"?>

would be acceptable, but not

  <?Xml version="1.0" encoding="Iso-Latin-1"?>

Any comment on this last point?


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