Solved

Strange Xalan error : org.apache.xml.utils.WrappedRuntimeException: The output format must have a '{http://xml.apache.org/xalan}content-handler' property!

Posted on 2006-10-25
4
748 Views
Last Modified: 2012-06-21
Hello,


I'm doing quite a simple XML > HTML through XSL but i keep getting the following error:

------------------------
org.apache.xml.utils.WrappedRuntimeException: The output format must have a '{http://xml.apache.org/xalan}content-handler' property!
-----------------------

This is the code
        //-- Create a stream for the input xml
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        Document document = builder.parse(new FileInputStream(inputXML));
        DOMSource domSource = new DOMSource(document);

        //-- Create a stream for the xsl
        Source stylesheetSource = new StreamSource(new File(stylesheetFile));

        //-- Create a stream for the output
        StreamResult streamResult = new StreamResult(new File(outputXML));

        //-- Perform the xsl transformation
        TransformerFactory transformerFactory = TransformerFactory.newInstance();
        Transformer transformer = transformerFactory.newTransformer(stylesheetSource);
        transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        transformer.transform(domSource, streamResult);


I've tried the same with Jdom but i keep getting the same error

Anyone an idea ?


kind regards,


Steven
0
Comment
Question by:Xyleen
4 Comments
 
LVL 10

Expert Comment

by:jaggernat
Comment Utility
you are in the wrong area :) , move this question to xml

0
 
LVL 4

Accepted Solution

by:
Tol_cv earned 250 total points
Comment Utility
seems like a xalan configuration problem

Workaround is to add the xsl:content-handler attribute to all XSL files

if you are using it under a tomcat server see also  :
http://testdrive.mapinfo.com/TECHSUPP/MIPROD.NSF/0/4a9bc2a8f684237f85256e63006f9ad4?OpenDocument


0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Apache server configuration 7 78
constructor overloading 2 73
iterator example remove 8 74
spring example errors 33 196
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now