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

Re: XTTE0510 ISSUE.

Subject: Re: XTTE0510 ISSUE.
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Aug 2008 16:55:18 -0400
Re:   XTTE0510 ISSUE.
At 2008-08-18 13:43 -0700, chun ji wrote:
Here is my XSL file that does not work,
   <xsl:template match="Obj">
       <xsl:variable name="objName" select="@name"/>
       <xsl:variable name="caseString" select =
"$doc2//obj[@name = $objName]/@cases"/>
        <xsl:variable name="caseArray"
select="tokenize($caseString, ',')"/>

<xsl:for-each select="$caseArray">

Here you are iterating over a set of strings returned from tokenize().


<xsl:apply-templates />

And you are not in any node tree, so there is no way to push any nodes at your stylesheet. Your current context item is a string value.

!0XTTE0510: Cannot apply-templates to child nodes when
the context item is an atomic value!1.

Which is why you get the error.


If you wanted to push the node children of Obj
then put Obj into a variable and use:

<xsl:apply-templates select="$Obj/node()"/>

I hope this helps.

. . . . . . . . . . . . . Ken

--
Upcoming XSLT/XSL-FO hands-on courses:      Wellington, NZ 2009-01
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.