Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
?
779 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Tech spooks aren't just for those who are tech savvy, it also happens to those of us running a business. Check out the top tech spooks for business owners.
Let's take a look into the basics of ransomware—how it spreads, how it can hurt us, and why a disaster recovery plan is important.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

604 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