[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.
|
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
|