The proper way to configure a new input source is to add its SourceFactory to cocoon.xconf. Effectively you are defining a new protocol. So if you define

<source-factories>
...
 <component-instance class="my.input.source.SourceFactory" name="foo"/>
</source-factories>

you can reference it in a pipeline as

<map:transform src="foo://whatever.xslt"/>

Of course "whatever.xslt" can be anything and can include references to input modules. I don't know of any way to pass parameters to an input source other than including them in the url (as a request parameter perhaps?).

HTH,
Ralph


Matt Robinson wrote:

Hello.

Is it possible to 'reference' an Excalibur InputSource directly in a pipeline 
transform?

I have written a custom Excalibur Input Source that inserts templates into an 
XSL stylesheet directly on-the-fly.  Using this Input Source inside a Generator 
not only creates problems by attempting to resolve all included XSL files using 
the pipeline
URI, but is also unnecessary because the calling pipeline element effectively 
re-parses the file anyway.  I basically don't see the need or usefulness of 
supplying XSLT as SAX events anyway.

I would like to do away with the pipeline altogether and just 'plug in' the 
Input Source directly.  For example, I would like to modify this pipeline 
fragment:

<map:transform 
src="cocoon://{context-attr:webappPath}webmetrics/{1}/{3}/{4}/{flow-attribute:bean.pageSequence}"/>

Into something like:

<map:transform src="{webmetrics-input}">
        <xslt src="xslt/{1}/{3}/{4}.xsl"/>
        <page src="{flow-attribute:bean.pageSequence}"/>
</map:transform>

Where {webmetrics-input} is defined in the cocoon.xconf file as an input component, and the 
<xslt> & <page> tags act as parameters to the Input Source.

Would the above structure expect an Excalibur InputSource to be exposed to the 
transform?

Note that I can't use the map:aggregate construct because the template insert must be 
before the </xsl> tag in the finished XSL stylesheet, and no, I don't want to 
break up all of my stylesheets so they require the close tag to be appended just so I 
can
use this construct.

Kind Regards,

Matt Robinson

E-Commerce
Flight Centre Limited


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to