Subject: [xsl] [xslt] not working transformation when function called From: Michalmas <michalmas@xxxxxxxxx> Date: Thu, 19 Mar 2009 21:14:32 +0100 |
Hello guys, I have following xslt: <xsl:template match="*"> <xsl:copy-of select="." /> </xsl:template> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="move/from"> <datatype><xsl:value-of select="local:getNodeType(/, node()/dataname)"/></datatype> <!--DATATYPE --> </xsl:template> <xsl:function name="local:getNodeType"> <xsl:param name="node" as="node()"/> <xsl:param name="searchValue" as="xs:string"/> <xsl:choose> <xsl:when test="empty($searchvalue)"> <xsl:sequence select="$node/pic-value"/> </xsl:when> <xsl:otherwise> <xsl:sequence select="local:ref($node//data-declaration[name=$searchvalue[1]][1], $searchValue[postion() != 1])"/> </xsl:otherwise> </xsl:choose> </xsl:function> But for some reason it is not applied on my XML: <move> <from> <dataname>01</dataname> <dataname>02</dataname> </from> <to> <qualification> <dataname>001</dataname> <dataname>002</dataname> </qualification> </to> </move> As i can't even get in debugger to the place, i have also question: - in place where DATATYPE is created and function is called, i need to pass as argument all nodes. The XPath is move/from/dataname when function is called. Should it be in variable all what?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [xslt] enhance match cond, David Carlisle | Thread | Re: [xsl] [xslt] not working transf, Christopher R. Maden |
Re: [xsl] [xslt] enhance match cond, David Carlisle | Date | Re: [xsl] [xslt] not working transf, Christopher R. Maden |
Month |