[Home] [By Thread] [By Date] [Recent Entries]
Jeni Tennison wrote:
>
> Just to make sure I understand what you mean by the above - you're
> advocating adding a new node test called exslt:typeOf?
no the intention is an extension function taking two arguments
typeOf(node,typeQname)
note that this assumes there is some 'active' schema present. one could more
generally do:
typeOf(node, typename, schema)
and note that the 'schema' need not _only_ be an XML Schema, for example one
might have a simple XSLT file:
<xsl:variable name="person.type">
father|mother
</xsl:variable>
etc.
>
> I actually wrote match="*[xs:type('this:person')]". I used an
> extension function because they're the least controversial and
> dramatic way of extending XPath. Of course, the people designing XPath
> 2.0 are a lot freer than we are ;)
i missed what you were doing. its correct (the first "." is implicit?)
>
> Anyway, I thought this syntax for xs:type() gelled well with the way
> that lang() works in XPath at the moment. Another possibility for the
> same kind of extension function would be:
>
> match="*[xs:type() = 'this:person']"
that doesn't work because a node may have many types.
Jonathan
>
|

Cart



