|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] error executing path expression
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








