473,734 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsd enumeration and pattern

Hello,

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

where

<xs:simpleTyp e name="stypeJour ">
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Lundi"/>
<xs:enumerati on value="Mardi"/>
<xs:enumerati on value="Mercredi "/>
<xs:enumerati on value="Jeudi"/>
<xs:enumerati on value="Vendredi "/>
<xs:enumerati on value="Samedi"/>
<xs:enumerati on 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

May 31 '06 #1
1 2577
The following two links might be of help:
http://www.w3.org/TR/xmlschema-2/#regexs
http://msdn.microsoft.com/library/de...gexpsyntax.asp

Thanks,
Priya

"news.microsoft .com" <no****@toto.co m> wrote in message
news:eU******** ******@TK2MSFTN GP04.phx.gbl...
Hello,

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

where

<xs:simpleTyp e name="stypeJour ">
<xs:restricti on base="xs:string ">
<xs:enumerati on value="Lundi"/>
<xs:enumerati on value="Mardi"/>
<xs:enumerati on value="Mercredi "/>
<xs:enumerati on value="Jeudi"/>
<xs:enumerati on value="Vendredi "/>
<xs:enumerati on value="Samedi"/>
<xs:enumerati on 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

Jun 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12633
by: Justin Wright | last post by:
I know that I can set up an enumeration as follows ( just typed in quick so may have syntax errors ): <xsd:simpleType name="colors"> <xsd:restriction base="xsd:string"> <xsd:enumeration value="red"/> <xsd:enumeration value="yellow"/> <xsd:enumeration value="blue"/> </xsd:simpleType>
0
1333
by: Brian Riis | last post by:
This all pertains to the above mentioned article. Anyone want to read it (it's rather neat, actually), here's the address: http://www.cuj.com/documents/s=8205/cujweb0305meynard/ Anyway, I was trying to work my way through the idea of the class, especially the one, that uses a template parameter for the enumeration value, in the hopes of getting an enum that enumerated through std::strings. The whole idea is to keep a base class with...
8
6512
by: aevans1108 | last post by:
Greetings I can't seem to inherit enumerated values from a globally defined type in my XML schema. XmlSchema.Compile() doesn't like it. Here's the schema. <?xml version="1.0" encoding="UTF-8" ?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
7
12693
by: archway | last post by:
I know you cannot have string enumerations such as: enum myStringEnum { enumItem1 = "value 1", enumItem2 = "value 2", etc } However, I was wondering whether you had ever created something that would mimic this? I have tried the following:
2
1813
by: Mark | last post by:
Assume you have an enumeration like PhoneType { Home, Business, Cell }. This enumeration corresponds with a lookup/dictionary table in your database like: phone_cd | phone_descr 1 Home 2 Business 3 Cell Now, I could associated each enumeration value with the phone_cd used in the
4
5659
by: Marshal | last post by:
Sure... IEnumerable was inconvenient suggesting a separate class to service the enumeration, IEnumerator, and multiple operations: Current, MoveNext, Reset. (I'll warp the definition of "operation" for a second if you don't mind). However, it existed within intuitive language semantics, whereas the new "yield" keyword, while highly convenient, is also one of the most gross warping of language concepts to date... public IEnumerator...
8
1728
by: John Cobb | last post by:
Excuse me if I use some terminology incorrectly as I am not well versed in Object Orientation. In short I want to create an Enumerated type similar to the following Enum Monitor as Byte Small Medium Large End Enum
3
2545
by: Davidoff | last post by:
Hi, I parse an XML file with a XSD schema. One XmlNode has an attribute whose type is a restriction of xs:string : <xs:simpleType name="stypeDay"> <xs:restriction base="xs:string"> <xs:enumeration value="Mon"/> <xs:enumeration value="Tue"/> <xs:enumeration value="Wed"/>
0
500
by: news.emn.fr | last post by:
Hello, i got this attribute <xs:attribute name="jour"> <xs:simpleType> <xs:restriction base="stypeJour"> </xs:restriction> </xs:simpleType> </xs:attribute>
11
1727
by: Jon Slaughter | last post by:
This is more of a C++ question but I guess it applies equally well to C#. Is there a way to declare an enum where the values assigned to the fields is incremented by something rather than 1. What I would like to do is create an enum where the varaibles increment by some formula rather than just 1. I doubt this is possible but it would be nice Essentially what I'm having to do is
0
8777
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9184
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6737
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6033
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4551
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4813
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.