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?
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--