OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Types and Context

>   <xsl:template match="*[xs:type('this:person')]">
>      ...
>   </xsl:template>
> New elements of the this:person type that were added to the schema
> would automatically be matched by this template, whereas in the
> current situation I'd have to change the XSLT.

Not necessarily. I could write an XPath expression that matches anything
with that has a <first> and <last> element inside of a <name> element,
for example. The main difference is really one of convenience. Personally,
if I was *that* worried about convenience, I'd probably define a
"my:type" attribute, set it to "person", and then match on that. I 
can see few cases, outside of very data-centric applications,
where the above would be useful.

My main concern with the above is that it is *complicated*. Match
patterns are already fairly expensive/hard to optimize. Adding in
schema support will make them even harder to optimise... especially
in the face of the conflicting incrementality goals for XSLT 2.0.
While some very smart people *will* be able to optimize the match
patterns, it will be beyond the scope of what most people are
capable of, and what most people need.