Thanks for your help guys.

1) Does anybody have an example of how to serialize a SAX with the
TransformerHandler?
2) How do I put together the JAXP transformation with my SAX event
handlers? I want only the attributes which have the "specified" property
set. (thanx chris for the suggestion)

Seems that I have to write my own ContentHandler to output the XHTML.(?)
My idea is to have a DefaultHandler chained with with a XMLFilterImpl.
The DefaultHandler modifies the XHTML as I want and the chained filter
outputs it.

/roberto
Michael Glavassevich wrote:
> Roberto Cosenza <[EMAIL PROTECTED]> wrote on 05/22/2006 11:20:26 AM:
> 
>> Hi David. Thank you for your clarification.
>> It is clear, SAX is the way to go for me.
>> I confirm that sax is reading the doctype and doing the validation
>> accordingly. It was missleading that the XMLSerializer was outputting
>> the "Strict" doctype unregarding of the input one.
> 
> If you're writing new code, I would avoid using Xerces' native 
> serializers. They are non-standard, not particularly well maintained and 
> likely to be deprecated [1] soon (perhaps in the next release). JAXP's 
> TransformerHandler [2] is a much better choice for serializing SAX events.
> 
>> I have one more question:
>> Parsing a document which contains the fragment
>> <a href="mylink.html" >mylink</a>, generates events also for the
>> a-attribute 'shape="rect"', which is not given in input!!
>> Is there any way to turn this behavior off? It seems like the parser is
>> inserting some implicit attributes here and there...
>> /Roberto
> 
> [1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-6
> [2] 
> http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/TransformerHandler.html
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: [EMAIL PROTECTED]
> E-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Roberto Cosenza
ICQ 12231605, MSN & Jabber robcos AT robcos.com
Tel: +46-(0)70-4660928
Work Tel: +46-(0)8-55576860, Fax: +46-(0)8-55576861
-- 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to