While compiling schemas for a modification that I'm working on, I can
see something like this:
[xslt] WARNING: constraint for att.referring class does not have a
context=. Resulting rule is applied to *all* elements.
Which is very true, because I have moved some constraintSpecs from an
element spec (where, I gather, the element being defined supplies the
context) into a spec containing a definition of a new attribute class
that the element now belongs to.
I have searched the Guidelines for some examples, but failed to see any
that would use "context=" with Schematron. A modified example that I
earlier received from Syd has this:
<sch:rule context="*[@referringMode eq 'pointer']"> ...
and it works really well, but is that the magic that I need for
restricting Schematron to only the elements which are members of the
class that I am defining?
A naive reading of the above context would suggest that the Schematron
rule still applies to all elements except the root element (and then it
of course filters them appropriately). So where is the trick, please,
what am I missing?
Thanks in advance,