Subject: [xsl] User defined SAX ContentHandler From: Ramkumar Menon <ramkumar.menon@xxxxxxxxx> Date: Wed, 10 Aug 2005 11:51:00 +0530 |
Hi All, W3C defines specific methods witihn a SA ContentHandler like startElement(), endElement() etc... that would be called back when elements are encountered within the XML Document. User overrides these methods to define the logic within each of these callback methods. As an alternative, what if the User defines explicit methods like public void startEmployee() [simplified here- ignoting namespace mappings] public void endEmployee() public void onEmptyAdddress() public void onAttr_Employee_Name() [this is just illustrative of the attributes scenario.] Advantage ----------------- Cleaner separation of logic. <<add here>> Disadvantages --------------------- No Clear contract. <<add here>> This is only an ilustrative subset of the functionalty. What do you folks think of this ? Is this a better alternative ? rgds, Menon -- Shift to the left, shift to the right! Pop up, push down, byte, byte, byte! -Ramkumar Menon A typical Macroprocessor
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How to get to the XML Dec, Michael Kay | Thread | Re: [xsl] User defined SAX ContentH, Mukul Gandhi |
RE: [xsl] Maintaining XSL ..., Asit Kharshikar | Date | Re: [xsl] User defined SAX ContentH, Mukul Gandhi |
Month |