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


Help: OASIS Mailing Lists Help | MarkMail Help



   XML and case-folding

[ Lists Home | Date Index | Thread Index ]
  • From: David Megginson <ak117@freenet.carleton.ca>
  • To: xml-dev Mailing List <xml-dev@ic.ac.uk>
  • 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

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


  <!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,


would be acceptable, but not

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

Any comment on this last point?

All the best,


David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com

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)


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

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