Choosing between 2 <xsd:all > choices in an xml schema 2003-01-22 - By Denis McCarthy
Hi there, I'm parsing a document using dom, and I want to enforce certain rules using a schema. Say there are 4 xml tags that I want to set rules for, <A>, <B>, <C>, <D> and <E>. I want to set up a rule where a combination of (say) <A>,<B> and <D> appearing in a message are valid, and also (say) <A>, <C> and <E>, but no other combination is valid. I would have thought that something like <xsd:choice> <xsd:all> <xsd:element name=<A> <xsd:element name=<B> <xsd:element name=<D> </xsd:all> <xsd:all> <xsd:element name=<A> <xsd:element name=<C> <xsd:element name=<E> </xsd:all> </xsd:choice> would be the way to do it, but apparently this is an error (I get the following when I parse my Document)
Error: choice content must be zero or more of element, group, choice, sequence or any. Saw "{1}".
Does anyone know of a way I can enforce this type of rule? Thanks Denis McCarthy
********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify your system administrator.
This footnote also confirms that this email message has been checked for the presence of computer viruses.
www.fexco.com **********************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: xerces-j-user-unsubscribe@(protected) For additional commands, e-mail: xerces-j-user-help@(protected)
|
|