xml validation multiple elements (Full Version)

All Forums >> [Ask XML questions here] >> Java XML Discussions



Message


sachinask -> xml validation multiple elements (30 May 2007)

in following scenario xml schema has to generate


<elementAll type=”one">
                       <element-A>
                                               <!-- value -->
                       </element-A>
                       <element-B>
                                               <!-- value -->
                       </element-B>
<element-C>
                                               <!-- value -->
                       </element-C>

</elementAll>

if attribute type=”one” then element-C need to be exists.

if attribute type=”two” then element-C should not exists.


is it possible to write schema for above scenario.

help is appriciated

thanks




jkmyoung -> RE: xml validation multiple elements (30 May 2007)

Using xml schema, no; That would be a cooccurrence constraint.
It may be possible with other schema validation, eg schematron.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.015625