Subject: Re: [xsl] problem with fn:contains using xsl:param From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sun, 13 Dec 2009 17:40:44 -0500 |
I'm using Saxon-HE 9.2.0.3N to test XSLT 2.0 document I'm creating. The purpose of transformation is to generate Perl source code based on schema file.
I had this statement
<xsl:template match="xsd:element[contains(@type,'xsd:date') or contains(@type,'xsd:dateTime') or contains(@type,'xsd:bool')]">
which was working as expected and I wanted to refactor it to something like this
<xsl:param name="KnownXSDTypes">xsd:date xsd:dateTime xsd:bool</xsl:param> (...) <xsl:template match="xsd:element[contains($KnownXSDTypes, @type)]">
but after this change I'm getting different results. I don't see how the latter code could have different meaning than the former one.
Any ideas?
<xsl:param name="KnownXSDTypes" as="element()*"> <type>xsd:date</type> <type>xsd:dateTime</type> <type>xsd:boolean</type> </xsl:param> ... <xsl:template match="xsd:element[@type=$KnownXSDTypes]">
-- XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] problem with fn:contains usin, Piotr Dobrogost | Thread | Re: [xsl] problem with fn:contains , G. Ken Holman |
Re: [xsl] Using divide-and-conquer , Hermann Stamm-Wilbra | Date | RE: [xsl] problem with fn:contains , Michael Kay |
Month |