HighTechTalks DotNet Forums  

XSD help

Dotnet XML microsoft.public.dotnet.xml


Discuss XSD help in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Peter Morris [Droopy eyes software]
 
Posts: n/a

Default XSD help - 06-23-2006 , 03:25 AM






Hi all

I have a config file like so

<config>
<optionSet1>
<option index="1" name="Set 1 index 1"/>
</optionSet1>
<optionSet1>
<option index="1" name="Set 2 index 2"/>
</optionSet1>
</config>


optionSet1-index1 can only have set values 1, 3, 5, 7

How do I define XSD for optionSet2-index1 so that

if optionSet1-index1 is in 1, 5 then it must be null
if optionSet1-index1 == 3 then it must be A or B
if optionSet1-index1 == 7 then it must be B, C or D


Thank you very much!

Pete



Reply With Quote
  #2  
Old   
Stan Kitsis [MSFT]
 
Posts: n/a

Default Re: XSD help - 06-23-2006 , 01:02 PM






Hi Peter,

You cannot do this using Xml Schema - it does not have this type of
co-occurance constraints.

--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.


"Peter Morris [Droopy eyes software]" <pete (AT) droopyeyes (DOT) no.com.spam> wrote in
message news:uILbq6plGHA.4212 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Quote:
Hi all

I have a config file like so

config
optionSet1
option index="1" name="Set 1 index 1"/
/optionSet1
optionSet1
option index="1" name="Set 2 index 2"/
/optionSet1
/config


optionSet1-index1 can only have set values 1, 3, 5, 7

How do I define XSD for optionSet2-index1 so that

if optionSet1-index1 is in 1, 5 then it must be null
if optionSet1-index1 == 3 then it must be A or B
if optionSet1-index1 == 7 then it must be B, C or D


Thank you very much!

Pete




Reply With Quote
  #3  
Old   
Peter Morris [Droopy eyes software]
 
Posts: n/a

Default Re: XSD help - 06-25-2006 , 12:14 PM



Hi Stan

Quote:
You cannot do this using Xml Schema - it does not have this type of
co-occurance constraints.
Thanks for the answer. I think this is a shame, XSD could have been an
excellent means of specifying user input + validation for thin clients.



--
Pete
====
Audio compression components, DIB graphics controls, ECO extensions,
FastStrings
http://www.droopyeyes.com

My blog
http://blogs.slcdug.org/petermorris/




Reply With Quote
  #4  
Old   
Peter Flynn
 
Posts: n/a

Default Re: XSD help - 06-25-2006 , 02:27 PM



Peter Morris [Droopy eyes software] wrote:
Quote:
Hi Stan

You cannot do this using Xml Schema - it does not have this type of
co-occurance constraints.

Thanks for the answer. I think this is a shame, XSD could have been an
excellent means of specifying user input + validation for thin clients.
That role was delegated to XML Forms.

///Peter


Reply With Quote
  #5  
Old   
Priya Lakshminarayanan
 
Posts: n/a

Default Re: XSD help - 06-26-2006 , 12:02 PM



You can embed Schematron rules in an XSD schema to specify co-occurrence
constraints and layer over XSD validation. For more information on
schematron,
take a look at:
www.schematron.com
http://www.xml.com/pub/a/2000/11/22/schematron.html

Thanks,
Priya

"Peter Morris [Droopy eyes software]" <pete (AT) droopyeyes (DOT) no.com.spam> wrote in
message news:Owm5grHmGHA.4768 (AT) TK2MSFTNGP03 (DOT) phx.gbl...
Quote:
Hi Stan

You cannot do this using Xml Schema - it does not have this type of
co-occurance constraints.

Thanks for the answer. I think this is a shame, XSD could have been an
excellent means of specifying user input + validation for thin clients.



--
Pete
====
Audio compression components, DIB graphics controls, ECO extensions,
FastStrings
http://www.droopyeyes.com

My blog
http://blogs.slcdug.org/petermorris/




Reply With Quote
  #6  
Old   
Peter Morris [Droopy eyes software]
 
Posts: n/a

Default Re: XSD help - 06-28-2006 , 04:10 PM



Quote:
That role was delegated to XML Forms.
What do you mean?




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.