Home xstl apply-template (call tempalate) with variable and use in xsl:evaluate

# xstl apply-template (call tempalate) with variable and use in xsl:evaluate

pshemek
1#
pshemek Published in 2017-11-13 10:59:33Z
 I have the following xml:  John Andrews 23 4000 Accounting  I am using this transformation:  Payroll Data for Taiwan
Chinese Name
/pi:Name
 Here I am creating a map $tabNames and the would like to pass map together with current node to employeeRows template. Instead of data values for "rows" parameter I get entire map and instead of current node (pi:Payroll_Extract_Employees/pi:company) for currentNode parameter I receive the same map as for the "rows" parameter. The second problem is that xsl:evaluates changes$employee to a value I would like following to give me the same output   as this   What I have so far throws an error here:   Error message: System ID: C:\Users\przemekb\AppData\Local\Temp\Untitled4.xsl Severity: fatal Description: Static error in XPath expression supplied to xsl:evaluate: Unexpected token name "Andrews" beyond end of expression. Expression: { John Andrews 23 4000 Accounting pi:Name} Start location: 36:42 Length: 1
Michael Kay
2#
Michael Kay Reply to 2017-11-16 18:52:41Z
 Perhaps your   should be either   or simply  
Michael Kay
3#
Michael Kay Reply to 2017-11-13 12:33:37Z
 I suspect that in this element pi:Summary/pi:Name the content is intended to be an XPath expression, and that you expect this XPath expression to be evaluated. That's not a correct expectation; use an xsl:value-of instruction. I suspect that  should be   though I can't account for the output you said you got. In this:  there's something amiss because "." will always be a singleton, so why does the "as" attribute suggest it might be a sequence?
 You need to login account before you can post.
Processed in 0.284863 second(s) , Gzip On .