[bt-devel] Case sensitivity in xml tags

Chris Little chrislit at crosswire.org
Sat Feb 28 02:39:35 MST 2009



Eeli Kaikkonen wrote:
> Is it guaranteed that the XML in the modules is always lower (upper) 
> case, or does e.g.sword::XMLTag::getName() always return a lower (upper) 
> case string ? If not, we need to have case sensitive comparison. Unless 
> I have misunderstood something.
> 
> For example, we use "strcasecmp(tag.getName(), "foreign")". It works 
> with case sensitive comparison only if the tag name "foreign" is always 
> lower case in all modules.

XML element & attribute names are case sensitive. Only correctly-cased 
element & attribute names will validate against a schema. All data is 
validated as a precondition to release, so all data from CrossWire is 
case sensitive and need not be case-folded.

--Chris



More information about the bt-devel mailing list