[xslt] libxslt and merge.xslt parameters
- From: "Senthil Nathan" <rsennat gmail com>
- To: xslt gnome org
- Subject: [xslt] libxslt and merge.xslt parameters
- Date: Mon, 17 Sep 2007 11:12:45 +0530
merge.xml ---->
<merge xmlns="
http://informatik.hu-berlin.de/merge">
<file1>file1.xml</file1>
<file2>file2.xml</file2>
</merge>
Suppose if I have the DOM tree of those files in memory, how
should I need to use merge.xslt to merge the trees in memory??
Actually in merge.xslt, the files specified are accessed as,
<xslt:call-template name="m:merge">
<xslt:with-param name="nodes1"
select="document($file1,/*) /node()" />
<xslt:with-param name="nodes2"
select="document($file2,/*)/node()" /> </xslt:call-template>
Using libxslt api's the stylesheet is applied on the xml as,
cur = xsltParseStylesheetFile((const xmlChar *)"merge.xslt");
doc = xmlParseFile("merge.xml");
res = xsltApplyStylesheet(cur, doc, params);
So, how can I pass the two input DOMs to the sylesheet as parameters and
replace the calls on document() by references to the parameters using LIBXSLT.
Thanks
Senthil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]