Subject:Serializing XML to a string with XALAN C++ Author:Michael LaRocca Date:28 Apr 2008 02:30 PM
I'm struggling within XALAN C++ to serialize an XML tree (all nodes and attributes of an XML subdom, in proper XML markup) to a string and pass it to an extension function. Does anyone have such an example? I don't need an example of the extension function, just the XSLT to invoke it.
My initial attempt was this:
<xsl:value-of select="isc:evaluate('LabResultsNarrative', ./Patient/Encounters/Encounter/Results)" disable-output-escaping="yes"/>
(where isc:evaluate is my extension function).
What I'm seeing is that the XML markup is stripped off, and all I'm seeing are the data values (as though something implicitly called string() on it). I really want to have the fully marked up XML sub-tree available to my code within the extension function.
I saw a post from Michael Kay in another thread suggesting the use of saxon:serialize. Surely there's some way to do this with XALAN instead?