[Om3] Content of CDName and other texts: with or w/o whitespace?

David Carlisle davidc at nag.co.uk
Mon May 26 23:33:38 CEST 2008


> However, I think it makes it quite hard to process CDs automatically,
> as the programmer (me in this case) always has to remember that there
> can be whitespace and thus must wrap any reference to the content of
> such an element into some function like normalize-space() in XPath or
> trim() in many other languages.

Alternatively if you use an API that uses the schema (XSD or XSD) then
your application should see the data with this space already stripped,
as that is built into the definition of the QName datatype (and
historically this white space stripping has always been applied to XML
and SGML dtattypes such as ID, although datatyping for XML only applies
to attributes, the XSD datatyping for element content follows
essentially the same model.

I think it's too late to change this now, orignially it may have been
better not to allow the space although it would make the schema more
complicated, as you'd have to override the default white space facet.
But it's too late to make a breaking change now.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


More information about the Om3 mailing list