[xslt] newbie question regarding the libxslt API and use of parameters



Hi All,

This is a newbie question regarding the libxslt API.

I am trying to build a GUI based tool that allows users to perform the
same set of actions that can be done through xsltproc on the
commandline.

I am using the code given in the tutorial at
http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html

I have been able to compile and run this code succesfully as it is.

However, I am facing problems in trying to pass parameters while using
this code. It looks like it ignores the parameters passed in this line

res = xsltApplyStylesheet(cur, doc, params);

Please see an example below -

E:\work\libtext>libtext.exe -param chunker.output.encoding
windows-1252 -param htmlhelp.encoding win
dows-1252 C:\Local\_LIB\docbook-xsl-1.66.1\htmlhelp\chment_htmlhelp.xsl
c:\myfile.xml


Inspite of passing the parameters chunker.output.encoding as
windows-1252 the result comes out with a charset of ISO -8859-1

This is unlike the behaviour of xsltproc that produces the desired
windows-1252 as the output.

I will be very grateful if someone can explain this behaviour and how
to correct it.

Also, a related question -

As I mentioned above, I am trying to use the libxslt API to build a
GUI based tool like xsltproc, for my internal purpose. Is this a good
idea? If not, how can I make internal calls from my C++ code to
xsltproc ?

Thanks and Regards
Titash


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]