|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Need a little help with xsl:evaluate
Hi Folks,
I want to evaluate the XPath expression that is inside the <predicate>
element:
<mappings>
<mapping>
<Airport_Name>GENERAL EDWARD LAWRENCE LOGAN </Airport_Name>
<name>GENERAL EDWARD LAWRENCE LOGAN</name>
<predicate>normalize-space(../Airport_Name) eq ../name</predicate>
</mapping>
</mappings>
Here's how I tried to evaluate the XPath expression:
<xsl:template match="/">
<verification-results>
<xsl:for-each select="/mappings/mapping/predicate">
<result-of-evaluating-predicate>
<xsl:evaluate xpath="."/>
</result-of-evaluating-predicate>
</xsl:for-each>
</verification-results>
</xsl:template>
When I execute the template rule, I get this error message:
Error in xsl:evaluate/@xpath
XPDY0002 Dynamic error in expression {normalize-space(../Airport_Name) eq
../name} called
using xsl:evaluate. Caused by net.sf.saxon.trans.XPathException: The context
item for axis
step ./parent::(element()|document-node()) is absent. Found while atomizing
the first
argument of fn:normalize-space()
What am I doing wrong? How to fix it?
/Roger
|
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








