logo       

Re: [Sax-devel] Should I use sax?: msg#00028

Subject: Re: [Sax-devel] Should I use sax?
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 <list@xxxxxxxxxx> 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: mrglavas@xxxxxxxxxx
> E-mail: mrglavas@xxxxxxxxxx
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
> For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
> 

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe