473,326 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

specifying conditional elements

Is it possible to specify conditonals within an xsd? For example,
consider the following two possible xml inputs:

Input A:
<comparison>
<left_operand>x</left_operand>
<operator>greater_than</operator>
<right_operand>x</right_operand>
</comparison>

Input B:
<comparison>
<left_operand>x</left_operand>
<operator>null</operator>
</comparison>
What I would like to do is the following: If the value of <operator> is
either "greater_than", "less_than", or "equals", then element
<right_operand> must be present. If the value of <operator> is "null"
or "not_null" then <right_operand> should not be present.

My guess is this may be beyond what xsd can handle, but I just thought
I'd ask the experts....

Thanks

Jul 20 '05 #1
0 1128

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

Similar topics

4
by: CGuy | last post by:
Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind();
19
by: Michael Vilain | last post by:
Yes, I know some feel tables are evil. Nevertheless, at the time I coded my site, it was easiest to control where stuff went on the page for the widest range of browsers. I'm currently deciding...
6
by: Steven Simpson | last post by:
Hello! I could arrange some HTML elements so that they have a sensible order without stylesheets: <div id="sections"> <div id="content"> The bulk of the content that people actually want to...
2
by: FireStarter | last post by:
Guys, in the code that follows, why does the method F() still compile, even if DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile (notice that I can write whatever I...
2
by: Piper707 | last post by:
Hi, I need to know if there is any way of achieving conditional processing for XSD elements. --------------------------------------------------------------- <criteria></criteria> = a complex...
0
by: spasala | last post by:
Hello All, I have an xml element namely <csharpAttr>""</csharpAttr> the value of tha element could be anything for example <csharpAttr>"" </csharpAttr>
2
by: spasala | last post by:
Hello All, I have an xml element namely <csharpAttr>""</csharpAttr> the value of tha element could be anything for example
5
by: brett | last post by:
I'd like to check these two conditions: if ((is_page() or ($category->cat_ID === $cat)){ do something } but keep getting an "unexpected {..." error. If I do this, it works fine: if...
3
by: dmc | last post by:
Can anyone suggest an elegant solution for this problem? I have a source document as follows: <Object Type="Type1"> <Attribute_A>ValueA</Attribute_A> <Attribute_B>ValueB</Attribute_B>...
4
by: Zack | last post by:
Hi, Let's say you have this function named validate. validate looks like this: function validate() { return ($F("Email") != '' ? ($("Name").value = $F("Email")) : false); }
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.