All of an XML document is case-sensitive. This is significantly different from HTML and most other SGML applications, where the default was to ignore case. It was done to allow markup in non-Latin-alphabet languages, and to obviate problems with case-folding in writing systems which are inherently caseless.
HTML is not Case sensitive. XML is Case sensitive.
The original intent for XML casing was lower case with hyphens. It's case sensitive and doesn't require you follow that convention -- so you can do whatever you want.
Uppercase Keywords In general, the keywords that relate to DTDs (e.g., DOCTYPE, ENTITY, CDATA, ELEMENT, ATTLIST, PCDATA, IMPLIED, REQUIRED, and FIXED) must be all uppercase. On the other hand, the various strings used in the XML declaration (e.g., xml, version, standalone, and encoding) must appear in all lowercase.
Short Answer:
Yes - XML is case sensitive.
Longer Answer:
It is widely accepted as case sensitive, however if you want to accept more flexibly, take a look at the question below, which discusses having case-insensitive enumerations:
XML Schema Case Insensitive Enumeration of Simple Type String
With XSD 1.1 you can achieve a case-insensitive enumeration using an assertion:
<xs:simpleType name="RGB">
<xs:restriction base="xs:string">
<xs:assert test="lower-case($value) = ('red', 'green', 'blue')"/>
</xs:restriction>
</xs:simpleType>
XSD 1.1 is supported in recent releases of Saxon and Xerces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With