none
Case sensitivity in XML Schema Definitions RRS feed

  • Question

  • Hi guys

     

    Is there any way to switch case sensitivty off when defining your xml schema?

     

    I've got a source xml doc that looks like this:

     

    <ABC>

    <DEF>

    ......

     

    I've defined my schema like this:

     

    <abc>

    <def>

    ...

     

    If the case doesnt match i get the 'element is not declared' error.

     

    Tuesday, September 16, 2008 10:11 AM

Answers

  • XML is case sensitive, so it also follows the XML Schema is also case sensitive.

     

    The reason is performance. The CPU only sees bits not letters. The character A is encoded differently than the a, so any case insensitive compare must convert all alphabet characters to the same case. Using ASCII there is not much overhead (single clock cycle per character) but with Unicode it gets a lot more complicated.

     

    By being case sensitive, XML eliminates the need to translate all element and attribute names to a single case.

    Tuesday, September 16, 2008 1:45 PM
    Answerer