[xslt] libxslt and xslt document( ) function
- From: "Senthil Nathan" <rsennat gmail com>
- To: xslt gnome org
- Subject: [xslt] libxslt and xslt document( ) function
- Date: Wed, 19 Sep 2007 23:23:22 +0530
Hi,
I'm rephrasing my previous post reg. merging xml's using merge.xslt.
How do I pass a DOM tree pointer, which I get after parsing the xml file,
to the XSLT document( ) function. Any idea of this will be very much helpful to me.
The original post is as below,
Thanks.
Senthil Nathan R
--------------------------------------------
Hi,
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]