![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XML Schema Facet problem [Thread Next] Re: XML Schema Facet problemTo: 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
>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
