Hi,
[EMAIL PROTECTED] schrieb:
>
> Hi All,
>
> I'm trying to unmarshal ( using Castor 0.9.3 ) the results of a XSL
> transformation ( using Xalan ) on a source XML document.
>
> I think I need to use the org.exolab.castor.xml.EventProducer interface, which
> is based around the SAX 1.0 DocumentHandler.
>
> The idea would be to hook this up to a org.xml.sax.XMLFilter ( to support the
> tranformation ) and a XMLReader to parse the source document.
>
> Unfortunately, the Xalan TrAX APIs all work in terms of the SAX 2.0
> ContentHandler.
>
> Can anyone tell me ( example code would be especially good ) how I can reliably
> bridge the need for a ContentHandler, when all I've got to play with is a
> DocumentHandler ? Is there an existing Adapter class that I can use or should I
> be looking to write one myself ?
>
Have a look at the JAXP 1.1 API:
SAX1 --> SAX2: org.xml.sax.helpers.ParserAdapter implements
XMLReader, DocumentHandler
SAX2 --> SAX1: org.xml.sax.helpers.XMLReaderAdapter implements
Parser, ContentHandler
Regards,
Dirk
--
RISC: Relegate Important Stuff to Compiler
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev