[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Types and Context
- From: Jonathan Borden <jborden@mediaone.net>
- To: Jeni Tennison <mail@jenitennison.com>
- Date: Tue, 22 May 2001 08:57:57 -0400
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
>