[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: fault tolerant saxon:parse()

Subject: Re: fault tolerant saxon:parse()
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 17 Nov 2008 13:45:05 +0000
Re:  fault tolerant saxon:parse()
>> Not too sure at the moment how to incorporate tagsoup as it expects
>> the concrete DefaultHandler as opposed to the interface
>>  as it expects the concrete DefaultHandler as opposed to the interface
>>  ContentHandler...
> bah humbug java witterings,

:) I've got that bit sorted now...

TransformerFactory tFactory = new net.sf.saxon.TransformerFactoryImpl();
Transformer transformer = tFactory.newTransformer(new StreamSource(new

Map tagSoupMap = new HashMap();
SAXParserImpl saxParser =

SAXSource ss = new SAXSource(saxParser.getXMLReader(), new
InputSource(new File(xmlPath).toURI().toString()));

StringWriter sw = new StringWriter();
Result result = new StreamResult(sw);

transformer.transform(ss, result);

Still not quite right though - the post-tagsoup markup is quite a bit
different from the input... I probably just need to tweak some

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.