Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xml Schema: restriction of Normalized string

From: George Cristian Bina <george@---------.--->
To: 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent