> One of the the things that I'd like to have is the ability to find out
> what pattern(s) matched a particular element/attribute and, in the
> case of simple types, which simple type matched.

Hmm.  Sounds a bit like a PSVI.  Would it be sufficient if this works
for a RELAX NG schema only if it is sufficiently deterministic that
for a document valid against the schema you can determine which
pattern an element or attribute matches just by looking at the names
of the element or attribute and its ancestors? I think I would want to
do this sort of thing with a separate infoset-augmentation process
that is independent of RELAX NG validation even though it's controlled
by the same schema.

How would you want to get the information about which pattern matched
an element/attribute?  One possibility is to try and do something that
fits into an XSD-ish model, where you get a QName representing the
"type" of an element or attribute. The JAXP validation API is set up
to support this, and I expect other XML technologies are as well.
Maybe you could have a (configurable) annotation attribute on
element/attribute/data patterns whose value gets reported to the
application as the "type".

I'm also curious what you want this for.  Also, as between
elements/attributes on the one hand and data on the other, for which
are you more interested in getting the matching pattern?

James

Reply via email to