[
Lists Home |
Date Index |
Thread Index
]
Eric van der Vlist wrote:
> That's something on which I have tried to insist as much as possible in
> my book about WXS (and now in the corresponding section [1] of my book
> about RELAX NG): despite its name, xs:token should be used in most of
> the cases where people are using xs:string.
Yes, I know. I have your XSD book :-)
> Overusing xs:string leads to XML vocabularies which are needlessly
> incoherent about how whitespaces are handled and the confusion on the
> name "xs:token" (understood by so many people as a single token while
> it's only a "tokenized" string) is the main reason why people keep using
> xs:string instead of xs:token.
I was trying to use xs:token, because I thougt it is an easy way to
normalize whitespace typing inconsistences when using PSVI enabled
parser. When using xs:token I will get "correct" (same) value from both:
<first-name>John</first-name>
<first-name>
John
</first-name>
and no whitespace trimming is needed in the application, it should get
"John" in both cases.
But .NET lapse forces me to use some workaround. I can use xs:string
based type which will disallow leading and trailing whitespaces by
pattern and users will be forced to use only the former variant of
markup. This is probably way to go as non-PSVI enabled parser will
return the same data.
Anyway, is some MS folk reading this "bug report", or is there any othey
way to report bug to MS? And please don't tell me that this won't be
fixed because it is backward incompatible change that will affect many
existing systems of our customers :-(
--
-----------------------------------------------------------------
Jirka Kosek
e-mail: jirka@kosek.cz
http://www.kosek.cz
S/MIME Cryptographic Signature
|