"linkspeed" <> wrote in message
news: om
> Hi, I tried following element definition in MSXML 4.0
> <xsd:element name="Identifier">
> <xsd:simpleType>
> <xsd:restriction base="xsd:token">
> <xsd
attern value=".*"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
What sense does this kind of pattern have?
> It can validate XML text like: <Identifier>abbbb</Identifier>
> But not :
> <Identifier>
> abbbb</Identifier>
Sure, not at last because your pattern does not allow newlines. A token
cannot contain newlines, either.
> Isn't token a white space collapsed string?
It maybe *has to be* a string containing no white spaces, but it is not
converted to one as the schema is used for validation. The schema must
match the XML *as is*, not as *would be*. If you used base="xsd:string"
as restiction base it also would not have worked out (because of the
pattern).
Martin