Subject:XSD: Structure definition depending on element or attribute value Author:Alexander Becher Date:18 Nov 2011 11:52 AM Originally Posted: 18 Nov 2011 11:50 AM
Dear support,
i want to define a structure depending on element or attribute value. F.i. following structures should be valid.
It means the Substructure Exception should be only valid if the value of the Element (or alternatively Attribute) RC is "0".
I try to enable it with following.
<xs:assert test="if (@RC eq 0) then Exception else false()"/> but ASSERT isn't recognized by Stylus Studio 2011 as a valid option. Can you help me?
Subject:XSD: Structure definition depending on element or attribute value Author:Ivan Pedruzzi Date:18 Nov 2011 05:44 PM
Hi Alexander,
The Saxon schema processor is capable to validate a schema like the following, but unfortunately Stylus Studio does not enable XSD 1.1 validation. If you own a license of Saxon Enterprise Edition you will be able to use it.
As alternative you may consider to design a program in XSLT or XQuery to assert your rules.