RE: [xsl] User defined SAX ContentHandler

Subject: RE: [xsl] User defined SAX ContentHandler
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Wed, 10 Aug 2005 12:43:45 +0000
I don't see this as unfeasible, at this point. And its usefulness is not in question, either. However, if you could fit this in as a [conceptual] layer above SAX, you could probably come up with some sort of a mapping layer between SAX events, or a sequence of SAX events, and a call to a business method. That mapping layer could itself be an XML description, and given that, the whole mess could probably be compiled to some form so performance isn't terrible.

--A


From: Ramkumar Menon <ramkumar.menon@xxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] User defined SAX ContentHandler
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

_________________________________________________________________
Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Current Thread