> Hi,
> I need to set the encoding parameter of xsl:output dynamically. I think
this is
> definately possible.
No, such a feature is not currently available.
> I am aware of the XalanTransformer::setStylesheetParam() function but it
doesn't
> seem to work for me. Am I using the wrong function and is there some
other function
> I should use.
...
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
> <xsl:param name="param1"/>
> <xsl:output method="html" encoding="$param1"/>
You can't just use a variable everywhere in a stylesheet where you want
dynamic behavior. A good book on XSLT, or a quick read of the XSLT
recommendation will explain the xsl:output element. You should also
understand that a processor is not required to support encodings other than
UTF-8 and UTF-16. Xalan-C will support whatever encodings Xerces-C
supports, which changes depending on the platform, and the transcoding
system it was built with:
http://xml.apache.org/xerces-c/faq-parse.html#faq-21
Dave