</CODELIST>
</DISPLAY>
I want to get xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<plane number="1">
<listcode>CODE1 CODE2 CODE3 CODE4</listcode>
<text>this is testing text</text>
</plane>
<code value="2312" /> -> reference to CODELIST to "row" with code = 2312
Subject:finding connection between escaped text and elements... Author:Minollo I. Date:27 Dec 2005 12:20 PM
If you want to be able to run XPath expressions on the escaped segment, you will have first to make it become a "parsed" document fragment. That's not possible in standard XSLT; if you run Saxon, you can use an extension function (saxon:parse()) and do something like:
<xsl:variable name="myInfo" xmlns:saxon="http://saxon.sf.net/">
<xsl:copy-of select="saxon:parse(concat('<root>',DISPLAY/PLANE_1/row/column,'</root>'))"/>
</xsl:variable>
(where you can change the DISPLAY/PLANE... expression with the one computed in the proper context)
Once you do that, you'll be able to run queries against $myInfo.
Subject:finding connection between escaped text and elements... Author:Marek Kucharik Date:28 Dec 2005 02:29 AM
Hello Minollo,
I dont understand how to run queries against result from saxon:parse. $myInfo returns only values for all nodes from escaped node-set and I only need value from node <code>.
Subject:finding connection between escaped text and elements... Author:Minollo I. Date:28 Dec 2005 03:21 PM
Assuming $myInfo is assigned the way I suggested, $myInfo/root/code/@value will return "2312" in your example; $myInfo/root/text will return "this is testing text".