RE: [xsl] How Schema Validation works

Subject: RE: [xsl] How Schema Validation works
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 14 Sep 2004 22:37:19 +0100
Completely off-topic, I'm afraid - you want the xmlschema-dev@xxxxxx list at
W3.

Yes, the pattern is a regular expression. Validation occurs when you decide
to validate your XML document against the schema. 

In plain English, a level code must be IEP or UE or US or PS or KG or a
number in the range 1 to 12, with lower case permitted as an alternative to
upper case.

Michael Kay

> -----Original Message-----
> From: karl@xxxxxxxxxxxxxxxxxxxx [mailto:karl@xxxxxxxxxxxxxxxxxxxx] 
> Sent: 14 September 2004 21:47
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] How Schema Validation works
> 
> I'm trying to understand the basic premiss to something like this:
> 
> [cut out from schema]
> <xsd:element name="LevelCode" type="sd:LevelCodeType" minOccurs="0" />
> 
> [cut out from schema]
> <xsd:simpleType name="LevelCodeType">
>  <xsd:restriction base="xsd:string">
>  <xsd:pattern
> value="[Ii][Ee][Pp]|[Uu][EeSs]|[Pp][Ss]|[Kk][Gg]|[1-9]|[1][0-2]" />
>  </xsd:restriction>
> </xsd:simpleType>
> 
> 
> Is the xsd:pattern a regular expression?  What causes the 
> validation to
> occur?  How can the above be written in plain Enlish?
> 
> Thanks,
> Karl

Current Thread