Hi
I am getting an error "FATAL ERROR: The context item for an axis step is
not a node"
on the line <xsl:if
test="TopConcept/*[lower-case(name())=lower-case($archTerm)]"></xsl:if>.
My structure is such
---------------------------------------------------------------------------------------------------------------------
<xsl:template match="/">
<TopConcept name="{TopConcept/@name}">
<xsl:apply-templates select="TopConcept"/>
</TopConcept>
</xsl:template>
<xsl:template match="TopConcept">
<xsl:for-each select="/*/*/O/Class[text()=$notPresent]">
<xsl:variable name="clsName"
select="..//preceding-sibling::A/Class/text()"/>
<xsl:if
test="matches($clsName,'(.)([A-Z])')"><!--only call the template if
there is any word to split-->
<xsl:call-template name="splitTerm">
<xsl:with-param name="AName" select="$clsName"/>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template name="splitTerm">
<xsl:param name="AName"/> <!-- Eg: AName = 'NextTime' -->
<xsl:variable name="split"
select="tokenize(replace($AName,'(.)([A-Z])','$1 $2'), ' ')"/>
<xsl:for-each select="$split">
<xsl:variable name="ATerm" select="."/> <!-- ATerm = 'Next' -->
<xsl:if test="string-length($ATerm)>2">
<xsl:if
test="TopConcept/*[lower-case(name())=lower-case($archTerm)]"></xsl:if>
<!--look for existence of <Next> as a child of <TopConcept> -->
<!-- PROBLEM WITH THIS LINE OF CODE-->
</xsl:if>
</xsl:for-each>
</xsl:template>
---------------------------------------------------------------------------------------------------------------------
I have tested and seen that current( ) does not return a node( ) but
rather the atomic value 'Next' for instance. Prior to using the
'saxon:next-in-chain' feature the code was working fine when I went back
to the top node to start a search but now it generates an error. Ive
tried several options but none seem to resolve the issue.
Could someone please help.
Thanks
Rahil
--~------------------------------------------------------------------
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>
--~--