?
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
Medium Priority
?
775 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Expert Comment

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

0
 
LVL 4

Accepted Solution

by:
Tol_cv earned 1000 total points
ID: 17818033
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
We are witnesses that everyone is saying that our children shouldn't "play" with a technology because it is dangerous. This article is going to prove that they are wrong.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

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