XSD parsing 2003-01-27 - By Sergey Suhoruchkin
Base type is exactly "integer", my mistake. Everything else is clear now, thank you very much for the comprehensive answer!
Best regards, Sergey
sandygao@(protected) com To: xerces-j-user@(protected) .apache.org cc: 27.01.03 17:25 Subject: Re: XSD parsing Please respond to xerces-j-user
> and as a result of parsing I get "decimal" as base type (instead of > "integer")
How do you check the base type? The base should be "integer", but its primitive type should be "decimal". (Note that integer is derived from decimal.)
> and also two additional facets specified: > - fractionDigits = 0
"integer" is derived from decimal by specifying this facet, so it's inherited to types derived from integer.
> - whiteSpace = "replace"
It should be "collapse". (You were seeing "replace" because of a recently fixed bug: the text were incorrectly ordered.) "decimal" has whiteSpace=collapse. So all types derived from has this facet.
HTH, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 sandygao@(protected)
"Sergey Suhoruchkin" To: xerces-j-user@(protected) <ssuhoruc@(protected) cc: a.by> Subject: XSD parsing
01/27/2003 08:49 AM Please respond to xerces-j-user
Hi, All
I'm parsing the following XML Schema:
<?xml version='1.0' encoding='UTF-8'?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="test"> <xs:restriction base="xs:integer"> <xs:minInclusive value="10"/> <xs:maxInclusive value="1000"/> </xs:restriction> </xs:simpleType>
</xs:schema>
and as a result of parsing I get "decimal" as base type (instead of "integer") and also two additional facets specified: - fractionDigits = 0 - whiteSpace = "replace"
Can anybody clarify why this happens and how it can be avoided? Or point me to some URLs...thanks in advance.
Best regards, Sergey
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|