Reputation: 3081
detect if <xsl:with-param>
calls with select
attribute or using text node of the <xsl:with-param>
. In other words how to detect parameter type if it is string or xpath notation of node?
Upvotes: 2
Views: 287
Reputation: 163595
There is no reliable way in XSLT 1.0 of determining what type of argument has been passed. You need to design the interface differently so as to remove this requirement, e.g. by passing an extra parameter.
Upvotes: 3
Reputation: 4403
In XSLT 2.0 you can use the instance of
operator:
<xsl:if test="$p instance of xsd:string">
Upvotes: 2