[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

error executing path expression

Subject: error executing path expression
From: Rahil <qamar_rahil@xxxxxxxxxxx>
Date: Thu, 26 May 2005 12:17:30 +0100
error executing
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.