Re: Xalan-J for XML Pipeline?
Michael Glavassevich <[email protected]> Wed, 14 Dec 2011 23:12:56 -0500
| Newsgroups | gmane.text.xml.xalan.java.user |
|---|---|
| Message-ID | <OFD60E8119.84B804DA-ON85257967.0016BAF9-85257967.001728B5@ca.ibm.com> |
Hi Lewis, Have you had a look at TransformerHandler [1] and ValidatorHandler [2]? You can connect these together to form a pipeline which does a transformation and validates the result (and/or source). Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/TransformerHandler.html [2] http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/validation/ValidatorHandler.html Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected] "McGibbney, Lewis John" <[email protected]> wrote on 12/14/2011 09:00:03 AM: > Hi Everyone, > > I'm working on a reasonably large HTML project which I wish to > convert to XML. So far so good. It is essential that the resulting > XML conforms to an XSD which I have obtained. Before undertaking the > transformation it would be nice to > 1) Validate the source HTML document ensuring it conforms to the XSD > 2) Validate the resulting XML output with the XSD. > > So far I have reviewed Saxon as a possible tool, however > unfortunately schema validation is only offered in the enterprise > edition, therefore I wonder if Xalan-J is a feasible alternative? > Having looked on the user@ lists I've not seen much apart from this > thread [1] to suggest that it is. > > Finally, it would be great if there was some tool which indicates > where an error is during the validation and transformation, however > from what I gather this is not the case, can anyone confirm? > > Thank you very much in advance. > Lewis > > [1] http://marc.info/?l=xalan-j-users&m=122546865125251&w=2 > > Glasgow Caledonian University is a registered Scottish charity, > number SC021474 > > Winner: Times Higher Education?s Widening Participation Initiative > of the Year 2009 and Herald Society?s Education Initiative of the Year 2009. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/ > name,6219,en.html > > Winner: Times Higher Education?s Outstanding Support for Early > Career Researchers of the Year 2010, GCU as a lead with Universities > Scotland partners. > http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/ > name,15691,en.html