Groups | Blog | Home
all groups > dotnet xml > may 2006 >

dotnet xml : xsd enumeration and pattern


news.microsoft.com
5/31/2006 8:07:15 PM
Hello,

i got this attribute
<xs:attribute name="jour">
<xs:simpleType>
<xs:restriction base="stypeJour">
</xs:restriction>
</xs:simpleType>
</xs:attribute>

where

<xs:simpleType name="stypeJour">
<xs:restriction base="xs:string">
<xs:enumeration value="Lundi"/>
<xs:enumeration value="Mardi"/>
<xs:enumeration value="Mercredi"/>
<xs:enumeration value="Jeudi"/>
<xs:enumeration value="Vendredi"/>
<xs:enumeration value="Samedi"/>
<xs:enumeration value="Dimanche"/>
</xs:restriction>
</xs:simpleType>

Is it possible to "filter" properties of the attribute "jour"so that a
special enumeration value is forbidden ?
I don't know much about pattern . I think this might be the solution ,
something like
<xs:pattern value="\C Lundi "/> ???

where can I read more about pattern ?

Thanks

David


Priya Lakshminarayanan
6/1/2006 11:22:18 AM
The following two links might be of help:
http://www.w3.org/TR/xmlschema-2/#regexs
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/jscript7/html/jsjsgrpregexpsyntax.asp

Thanks,
Priya

[quoted text, click to view]

AddThis Social Bookmark Button