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

saxon:evaluate from external to current source

Subject: saxon:evaluate from external to current source
From: Matt Stoeffler <mstoef@xxxxxxxxx>
Date: Tue, 8 May 2007 15:37:04 -0400
 saxon:evaluate from external to current source
There was a posting in April--see http://www.biglist.com/lists/xsl- list/archives/200704/threads.html#0022-- in which a question was posed about establishing proper context for saxon:evaluate for an external document. I have a problem that inverts that one somewhat. I'm working on xsl that uses a reference xml file to direct the order in which to process a source document. So, when processing source.xml, I reference an external map.xml, which looks like this ...

<field-map form="Secondary School Participation">
<field srcPath="feedback/nameInfo/title" resId="courtesyTitle">Courtesy Title</field>
<field srcPath="feedback/nameInfo/name" resId="nameHead">Name</field>
<field srcPath="feedback/nameInfo/email" resId="emailHead">Email</field>


...
</field-map>

The reference map.xml tells me what source nodes to process in what order. My problem arises when I change context in the xsl file ...

where $formfields gets me the nodeset from the external document I want, depending on the form I want to process.

<xsl:for-each select="$formfields/field">
   <xsl:variable name="currpath" as="xs:string" select="@srcPath"/>
   <xsl:apply-templates select="/saxon:evaluate($currpath)"/>
 </xsl:for-each>


... problem is, the saxon:evaluate fails because, I suspect, I'm in the wrong document context. How can I tell my apply-templates instruction to evaluate the path in the source document?


thanks.

Matt.

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.