Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XML Schema Facet problem

From: "Zafar Abbas" <someone@---------.--->
To: NULL
Date: 8/1/2005 3:24:00 PM
Could you post the real XSD and XML  you are trying to validate. Will take a
look at it.

Zafar


<deadbydawne@y...> wrote in message
news:1122443056.546218.242910@f......
> Hmmm,
>
> Using VB.NET and Visual Studio.NET I have defined the type:
>
> <xs:simpleType name="string10">
> <xs:restriction base="xs:string">
> <xs:maxLength value="10" />
> </xs:restriction>
> </xs:simpleType>
>
> and used it in:
>
> <xs:element name="PONumber" type="string10" msprop:nullValue="_throw"
> />
>
> so when I set a value in the dataset (generated from this schema) with:
>
> dRowHeader.PONumber = fields(2)
>
> where fields(2) is a string exceeding 10 chars, the exception:
>
> Cannot set column 'PONumber' to '59051710000000000000'. The value
> violates the MaxLength limit of this column.
>
> Is thrown.
>
> Lovely Jubely!!
>
> BUT
>
> Doing the same with:
>
> <xs:simpleType name="ISBNType">
> <xs:restriction base="xs:string">
> <xs:pattern value="\d{1}-\d{5}-\d{3}-\d{1}" />
> </xs:restriction>
> </xs:simpleType>
>
> and:
>
> <xs:element name="PODate" type="ISBNType" msprop:nullValue="_throw" />
>
> and:
>
> dRowHeader.PODate = fields(3)
>
> where ISBNType is just an arbitrary type for testing purposes (not a
> date I know)
>
> No error is thrown!!!
>
> Hope someone out there is cleverer than wot I am :)
>
> Many thanks
>




transparent
Print
Mail
Digg
delicious
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