RE: [xsl] XSLT 2.1: ElementTest against several names?

Subject: RE: [xsl] XSLT 2.1: ElementTest against several names?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 1 Dec 2008 12:59:10 -0000
>   More generally, I think the schemas define the grammar of 
> valid XML instances, while the stylesheet functions and named 
> templates define processing on those instance, and the rules 
> for parameter typing can be different from the rules of the grammar...

Yes, but I think that in any language, you can't expect a type to be a
completely precise assertion about the set of values that you will accept.
For example, in Java, you can't say "I will accept an Integer or a String".
You have to declare your type as the nearest named type in your type
hierarchy, and rely on explicit parameter validation to make a more precise
test.

(There's a strong case for allowing union types to be named in the
SequenceType production, however, since those types actually exist as such
in your schema.)

I don't think that arguments about the economics of purchasing the software
are likely to carry much weight. If vendors decide that some facilities are
sufficiently valuable that users should have to pay for them, asking for an
equally valuable facility that you hope to get for free is unlikely to be
persuasive. In fact, saying that you aren't prepared to pay for it is
pretty-well synonymous with saying that this is merely a "nice-to-have".

Michael Kay
http://www.saxonica.com/

Current Thread