Just now we are using a custom XPath 2.0 engine (which supports
the minimal subset defined by the XML Schema 1.1 spec), for type
alternatives implementation, in Xerces-J.
The XML Schema 1.1, spec mentions:
A conforming processor must accept and process any XPath expression
conforming to the "required subset" of [XPath 2.0] defined by the
Note: Any XPath expression valid according to [XPath 2.0] may appear
in a conforming schema. Conforming processors may but are not required
to support XPath expressions not belonging to the required subset of
i.e, the implementers are allowed to give to users, the full XPath 2.0
langauge, for type alternative XPath 2.0 expressions. The only thing,
which needs to be ensured is, that the XDM tree for type alternatives
will include only the root element, and it's attributes.
I have a feeling, that it would be good, if we provide the full XPath
2.0 language to type alternative users. We can use PsychoPath for
this, which is used by assertions as well.
Is supporting the full XPath 2.0 language, for type alternatives a
good idea? Or, we must provide a minimal XPath 2.0 subset only, for
Which option will be better, from users point of view, and also from
the point of view of interoperability of XML Schema's written with 1.1
Just now, I am in favor of the full XPath 2.0 language, for type
alternatives. But I am ok, with the consensus on this list.
Another idea that comes to my mind is, to provide a configurable
option to users, to either use the minimal subset (which is the
current implementation), or use full XPath 2.0 support, with