Schematron
XML / XSL
1
Posts
1
Posters
0
Views
1
Watching
-
I'm new to schematron and can't find any forums related to it, so if anyone can help I would appreciate it. I want to check that if an element has a child (it might not) that the child is one of a pre-defined set of elements. Eg. if we have a fish_tank element it could have child elements of fish, gravel, filters, pirate_ship, etc So here is what I think the scheme would be
<pattern name="aquarium">
<rule context="child::fish_tank">
<assert test="name()='fish' or name()='gravel' or name='pirate_ship'">Not a valid element!</assert>
</rule>
</pattern>