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
756 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
ID: 17803068
you are in the wrong area :) , move this question to xml

0
 
LVL 4

Accepted Solution

by:
Tol_cv earned 250 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String format issue 13 91
authenticate preemptively soap ui option 3 143
Can't access image with tomcat/html 6 97
maven webservice example issue 2 134
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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