Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Conditonal XSD validation based on elements values

Question posted by: nassim.bouayad.agha@gmail.com (Guest) on June 27th, 2008 07:07 PM
Hello,
I am seeking for information about conditional XSD validation based on
elements values,but unfortunatly,I could not find a clear answer.Let's
say that I have three XML elements named GROUP,SUB_GROUP and VALUE.How
to validate the VALUE element depending on GROUP and SUB_GROUP values?
Like if GROUP equals 3 and SUB_GROUP equals 4 then VALUE must be a
string enumeration...
Is it possible to perform that with XSD?I have seen some example using
schemapath (XPath conditions),but that does not seem to be
normalized...?!
Thank you in advance.
Regards.
Nassim
Joseph J. Kesselman's Avatar
Joseph J. Kesselman
Guest
n/a Posts
June 27th, 2008
07:07 PM
#2

Re: Conditonal XSD validation based on elements values
Join Bytes! wrote:
Quote:
I am seeking for information about conditional XSD validation based on
elements values


Not supported in XML Schema at this time. Use the xsi:type attribute to
explicitly indicate which type the element is supposed to be interpreted as.

nassim.bouayad.agha@gmail.com's Avatar
nassim.bouayad.agha@gmail.com
Guest
n/a Posts
June 27th, 2008
07:07 PM
#3

Re: Conditonal XSD validation based on elements values
On 4 juin, 00:12, "Joseph J. Kesselman" <keshlam-nos...@comcast.net>
wrote:
Quote:
nassim.bouayad.a...@gmail.com wrote:
Quote:
I am seeking for information about conditional XSD validation based on
elements values

>
Not supported in XML Schema at this time. Use the xsi:type attribute to
explicitly indicate which type the element is supposed to be interpreted as.


Thank you for yout answer.

nassim.bouayad.agha@gmail.com's Avatar
nassim.bouayad.agha@gmail.com
Guest
n/a Posts
June 27th, 2008
07:07 PM
#4

Re: Conditonal XSD validation based on elements values
On 4 juin, 00:12, "Joseph J. Kesselman" <keshlam-nos...@comcast.net>
wrote:
Quote:
nassim.bouayad.a...@gmail.com wrote:
Quote:
I am seeking for information about conditional XSD validation based on
elements values

>
Not supported in XML Schema at this time. Use the xsi:type attribute to
explicitly indicate which type the element is supposed to be interpreted as.


Thank you for your answer.
Regards.
Nassim.

 
Not the answer you were looking for? Post your question . . .
189,759 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors