[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: SAX-ext Attribute + Entity Parsing
Justin Couch wrote: > > Eric van der Vlist wrote: > > > Instead of adding methods to the SAX2 classes, have you considered using > > the existing ones to pass additional elements/attributes from a specific > > namespace to the applications using the existing ones ? > > [snip] > > > The applications would then see this as an element: > > > > <xxx:attributeDecl name="..." type="..." defValue="..." value="..."/> > > My problem here is that I have no control over the DTD spec. It would be > nice if I could do that, but it is far from my hands. I'm just paid to > implement the code :) You don't have to control the DTD, these elements will probably never been materialized as XML text. These elements are just added by the parser and could be filtered for the "final" application when required. [snip] > Could you explain a little more what you mean by the layer modification > bit? Apart from supplying my own custom *Handler implementations, as per > the SAX2 spec, I'm not currently getting any lower into a specific SAX > parser implementation. I am probably very "XSLT biased"... What I meant is that if you want to pass the info to applications that are a layer above the SAX parser (for instance a XSLT transformation or a DOM based application), this is much easier if you add elements using the standard SAX API than if you add new methods. On the other hand, those application that would need to handle this information just above the SAX layer can filter these elements just like they would do with your solution. It's like using an existing channel to convey new information versus creating another channel... Between two adjacent layers, adding a new channel is not a big deal, but if you need to traverse several layers, using an existing channel will avoid the pain to modify them. Using SAX events, the additional effort to filter those events that are carrying attribute declaration is very limited (especially if you define your own namespace for these elements). Eric > -- > Justin Couch Author, Java Hacker > http://www.vlc.com.au/~justin/ Java 3D FAQ Maintainer > http://www.j3d.org/ J3D.org The Java 3D Community Site > ------------------------------------------------------------------- > "Humanism is dead. Animals think, feel; so do machines now. > Neither man nor woman is the measure of all things. Every organism > processes data according to its domain, its environment; you, with > all your brains, would be useless in a mouse's universe..." > - Greg Bear, Slant > ------------------------------------------------------------------- > > ------------------------------------------------------------------ > The xml-dev list is sponsored by XML.org, an initiative of OASIS > <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To unsubscribe from this elist send a message with the single word > "unsubscribe" in the body to: xml-dev-request@l... -- See you in Austin (Knowledge Technologies 2001) http://www.gca.org/attend/2001_conferences/kt_2001/mon.htm ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://dyomedea.com http://xmlfr.org http://4xt.org http://ducotede.com ------------------------------------------------------------------------
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|