You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by paksegu <pa...@yahoo.com> on 2009/02/20 05:10:24 UTC

Re: Pipeline support - update with right link

Though I am late to this discussion, taken an excerpt form previous discussion

"I could imagine a XML generator that simply does an xml document view of the node in question." [ An excerpt from previous discussion]

thenĀ  using *something to process the document, into something

Wouldn't E4X (links below) be a viable alternative in this situation? for example you could write (output) your links and name of links into an HTML then use an HTML parser to crawl and check the links...WDYT?

https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X

https://developer.mozilla.org/En/E4X


Ransford Segu-Baffoe



paksegu@yahoo.com



http://www.noqmx.com/

https://serenade.dev.java.net/

--- On Tue, 2/10/09, Carsten Ziegeler <cz...@apache.org> wrote:
From: Carsten Ziegeler <cz...@apache.org>
Subject: Re: Pipeline support
To: sling-dev@incubator.apache.org
Date: Tuesday, February 10, 2009, 8:46 AM

Alexander Klimetschek wrote:
> On Tue, Feb 10, 2009 at 12:13 PM, Felix Meschberger
<fm...@gmail.com> wrote:
>> There is yet another alternative, which also sounds intriguing: We
>> define a ScriptEngineFactory for the ".pipeline" extension.
Files  with
>> the extension .pipeline would be pipeline configurations, which would
be
>> interpreted by the PipelineScriptEngine. The second part of the
>> processing -- preparation of the input data -- would be analogous to
the
>> above with the two options :
>>
>>         /a/b/data
>>              +-- sling:resourceType =
"sling/pipeline/sample"
>>
>>         /apps/sling/pipeline/sample/html.pipeline
>>              "file with pipeline config"
> 
> I like this one more.
> 
> For the question how the initial XML (or whatever stream the pipeline
> can handle) is generated: that should be part of the pipeline
> config/script, using standard generators just as in Cocoon for
> example. I could imagine a XML generator that simply does an xml
> document view of the node in question.
> 
Yes, I totally agree here as well :) This sounds like the nicest approach.

However whereas this is one important use case I see another use case
where I simply want to "run" a pipeline on generated output of some
script like for doing link checking or doing other general purpuse stuff.

In this case the sling:resourceType would still point to the original
script doing the html representation and the pipeline would take the
(html) output and process it. Not sure if we can find a good solution
for this as well. But we can have a look at the first use case first and
then see where this leads.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org



      

Re: Pipeline support - update with right link

Posted by Alexander Klimetschek <ak...@day.com>.
On Fri, Feb 20, 2009 at 5:10 AM, paksegu <pa...@yahoo.com> wrote:
> Though I am late to this discussion, taken an excerpt form previous discussion
>
> "I could imagine a XML generator that simply does an xml document view of the node in question." [ An excerpt from previous discussion]
>
> then  using *something to process the document, into something
>
> Wouldn't E4X (links below) be a viable alternative in this situation? for example you could write (output) your links and name of links into an HTML then use an HTML parser to crawl and check the links...WDYT?
>
> https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Processing_XML_with_E4X
>
> https://developer.mozilla.org/En/E4X

For the generator of the pipeline it should be possible to use any
normal sling script, because they already run on top of the data (a
node/resource) and generate a stream. If there would be a scripting
engine capable of E4X, one could simply use it as generator.

Regarding scripts for all the parts of a pipeline: For the other
elements of the pipeline (transformers and serializers) the input
interface is a bit more difficult as they will have to deal with an
input stream. In Cocoon, these pipelines are based on standard SAX
events, which is probably not that easy to "script".

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com