commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin MacClay" <kmacc...@vantage.com>
Subject RE: Jelly: Processing only a portion of XML
Date Thu, 27 May 2004 16:08:36 GMT
One idea I had was to continue to let it process the entire document,
but cause it to skip over the sections of the document that it isn't
interested in.  This works OK for me because my Jelly document will
consist entirely of my own custom tags.  I extended TagSupport so that
through a flag I can have it skip over invokeBody().

This is easier for the stopping point because then the whole rest of the
tags in the document can be ignored.  It's more challenging for the
XPath to start the processing (you'd really have to do a parsing like
you mention).

Kevin

-----Original Message-----
From: Paul Libbrecht
Sent: Thursday, May 27, 2004 11:38 AM

Quite hard...
To be able to evaluate the XPath, you need to parse! Or you use 
something like XPP. Or... oh well, yes, or you have a "map" (or 
"index") of your XML-file which a good (but non-existent yet) parser 
can use to extract only what you want.

Stopping ? Mmh... well... again, that would mean go into the SAX-level 
which Jelly only does for output and not for input.

Would be interesting but this looks to me like a quite general question 
of parsing!

paul

On 27-May-04, at 16:43 Uhr, Kevin MacClay wrote:

> With Jelly, is there any way to process only a portion of an XML 
> document?  The ideal would be to supply an XPath to tell it where to 
> begin processing the script.  Then there would be a special tag that 
> caused the script to stop processing (similar to a "return" in a Java 
> method).  The result could return an XPath of the stopping point in 
> the XML.
>
> I know this presents a different way of looking at Jelly.  Usually you

> think in terms of processing the entire document and coming up with an

> XML result.  But I think the ability to process portions of the XML 
> would open the project up to other uses.  If this feature is not 
> available now, do you think it would fit into the current architecture

> at all?

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message