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
754 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
With the rapid rise in mobile usage, mobile devices are here to stay and have become an integral part of doing business. Here are 9 great apps for your BYOD environment.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

867 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

16 Experts available now in Live!

Get 1:1 Help Now