[jdom-interest] XSLT output problems

Laurent Bihanic laurent.bihanic at atosorigin.com
Mon Jul 22 04:27:40 PDT 2002


According to the XSL spec., the <xsl:ouput> directives only apply when the 
XSLT processor is doing the actual text outputting. When using JDOMResult, the 
XSLT processor output SAX events.


Polina R.Thompson wrote:
> I am using JDOM and Xalan to manipulate a source XML document format to 
> a different XML output format. I use XSL stylesheets to define the 
> output format. The data and element names transform correctly, but 
> xsl:output directions set in the stylesheet are completely ignored. 
> Somewhere in the creation of JDOMResult or in its getDocument() method, 
> that information is lost.
> I have a work around in place (where I retrieve the xsl:output 
> information from the stylesheet, and then manipulate the resulting 
> document, adding CDATA and setting DocType before the Document is 
> written to file) but I wanted to see if anyone could suggest a cleaner 
> solution.
> Thanks!

                  wWw    Zzzzz
                 (- -)
Laurent Bihanic           | Tel: +33 (0)1  (Direct line)
Atos Origin               |      +33 (0)1
Intégration - e-Business  | Fax: +33 (0)1
Les Miroirs - Bat. C      |
18, avenue d'Alsace       |
F-92926 La Defense Cedex  | e-Mail: laurent.bihanic at atosorigin.com

"Microsoft isn't the answer. Microsoft is the question and the answer
  is no."

The opinions expressed are entirely my own and may not necessarily be
those of my employer.  Also, I am not now nor have I ever been a
lawyer.  My opinions are provided as-is with absolutely no warrantee of
merchantability or fitness for any particular use.  Besides, you can't
prove I typed this.  No body saw me type this.  Who says I typed this?

More information about the jdom-interest mailing list