You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Peet Sneekes <pe...@mediamatic.nl> on 2000/02/02 11:08:59 UTC
Namespaces and preprocessing LotusXSL to Xalan
Hi,
There's one problem I could not solve while converting from LotusXSL to
Xalan.
I use the Xalan processor to make a XSL file(3) from a XSL(1) and a XML(2)
(two DOM's).
This preprocessed XSL file(3) is used to convert a XML(4) into a HTML(5).
To ensure that the XSL-namespace of the second round is NOT transformed or
interpreted
in the first round, I made the following constuction in the first XSL(1):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl2="quote:http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
Please notice the 'quote' part in the XSL2 namespace definition, this is
stripped in the first round, leaving the following namespace definition in
the preprocessed XSL(3):
<xsl:stylesheet xmlns:xsl2="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/TR/REC-html40">
Now the problem:
I can't convice Xalan to do the same thing as LotusXSL did for me before:
I use the folowing code:
XSLTInputSource i = new XSLTInputSource(content);
XSLTInputSource s = new XSLTInputSource(stylesheet);
Document out = new DocumentImpl();
XSLTResultTarget o = new XSLTResultTarget(out);
org.apache.xalan.xpath.xml.XMLParserLiaisonDefault xmlParserLiaison = new
XMLParserLiaisonDefault();
xmlParserLiaison.setProcessNamespaces(true);
xmlParserLiaison.setUseValidation(true);
XSLTProcessor processor =
XSLTProcessorFactory.getProcessor(xmlParserLiaison);
processor.setProblemListener(pl);
processor.process(i, s, o);
Anyways, can anyone give me a hint?
Thanks,
Peet