[
Lists Home |
Date Index |
Thread Index
]
Michael Brennan wrote:
>
>I've been thinking for some time of doing something like this, but have
>never gotten around to it. I think my ideal solution, though, would be to
>use something that looks somewhat like XSLT, but which lets me specify
>lightweight "collectors" -- something like the "variables" in XSLT, but
>which collect data from the SAX stream when a pattern is matched. You could
>have templates like XSLT that specify a Pattern, then have variables that
>collect subordinate data (e.g. data that is along either the child,
>descendant, or attribute axes of the node matched by the pattern). When all
>of the variables associated with the pattern have collected all relevant
>data, fire off some action to do processing with the data.
>
The idea of collectors and launchers (though slightly different) is
exactly what I and some others are thinking of. I will be back with
something like the very first proposal draft and it should already
address this kind of things.
Petr
>
>
>I think dom4j has something like this, but geared more toward processing its
>object model rather than just collecting data from raw SAX events.
>
>I think this could be useful, though. We often hear how XSLT is not the
>right solution for everything, but there have been plenty of cases where I
>felt that XSLT was about a 90% match for the functionality I wanted -- if
>only I could tweak its behavior a bit (and make it work on SAX streams
>without collecting data into a DOM or similar object model).
>
--
Petr Cimprich
Ginger Alliance
www.gingerall.com
|