Mandatory and Optional Attributes in Schematron

juliaistevens

New Member
guysI need to specify a rule in Schematron where I say that every tag xpto must have attributes x and y and all the other attributes it eventually has must be z or w.So let's say I have the following tag\[code\]<xpto a="abc">\[/code\]This is a wrong tag because, not only it doesn't have the attributes x and y, it also has attribute a which is not one of the valid ones (x,y,z,w).A valid tag would be:\[code\]<xpto x="abc" y="cba">\[/code\]or\[code\]<xpto x="abc" y="cba" w="dsa">\[/code\]I know how to specify mandatory attributes with the @attribute command, I just don't know how to specify that all attributes' name must be in some set, like ('x','y','z','w') in the example given...
 
Back
Top