Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - xml Schema: restriction of Normalized string [Thread Next] Re: xml Schema: restriction of Normalized stringTo: bharathkr@------.--- Date: 12/5/2008 12:01:00 PM
That is not valid.
Saxon-SA will give you the following message:
SaxonSA] The whiteSpace normalization must not be weaker than that of
the base type
Xerces says
[Xerces] whiteSpace-valid-restriction.2: In the definition of myType,
the value 'preserve' for the facet 'whitespace' is invalid, because the
value for 'whitespace' has been set to 'replace' in one of the ancestor
types.
oXygen adds also the following URL to the error message:
URL: http://www.w3.org/TR/xmlschema-2/#whiteSpace-valid-restriction
Now, if you look at the URL above that points to the spec you see the
fragment below, look at point 2:
***
Schema Component Constraint: whiteSpace valid restriction
It is an =B7error=B7 if whiteSpace is among the members of {facets} of {b=
ase
type definition} and any of the following conditions is true:
1 {value} is replace or preserve and the {value} of the parent
whiteSpace is collapse
2 {value} is preserve and the {value} of the parent whiteSpace is replace
***
From schema for schemas the definition of normalizedString is:
<xs:simpleType id="normalizedString" name="normalizedString">
<xs:annotation>
<xs:documentation
source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:whiteSpace id="normalizedString.whiteSpace"
value="replace"/>
</xs:restriction>
</xs:simpleType>
Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com
bharath wrote:
> Hi=85.
>
>
>
> Can you please tell me the following is valid restriction or not=85
>
>
>
>
>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
>
> <xs:simpleType name="myType">
>
> <xs:restriction base="xs:normalizedString">
>
> <xs:whiteSpace value="preserve"/>
>
> </xs:restriction>
>
> </xs:simpleType>
>
> </xs:schema>
>
>
>
>
>
> Thanks and regards,
>
> Bharath.
>
> ***********************************************************************=
*********************************
> This e-mail and attachments contain confidential information from
> HUAWEI, which is intended only for the person or entity whose address i=
s
> listed above. Any use of the information contained herein in any way
> (including, but not limited to, total or partial disclosure,
> reproduction, or dissemination) by persons other than the intended
> recipient's) is prohibited. If you receive this e-mail in error, please=
> notify the sender by phone or email immediately and delete it!
>
>
>
From george@o... Fri Dec 05 08:10:44 2008
Received: from maggie.w3.org ([193.51.208.68])
by frink.w3.org with esmtp (Exi | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
