cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: XIncludeTransformer
Date Tue, 08 May 2001 13:26:09 GMT
John Schult wrote:
> 
> Berin,
> 
> Thanks for the quick reply!  So if I have:
> 
> <map:transformer name="xinclude"
>   src="org.apache.cocoon.components.saxconnector.XIncludeSAXConnector"/>
> 
> <map:match="">
>         <map:generate src="start.xml">
>         <map:transform src="start.xsl"/>
>         <map:transform type="xinclude"/>
>         <map:serialize...>
> </map:match>
> 
> <map:match pattern="test">
>         <map:generate...>
>         <map:serialize type="xml">
> </map:match>
> 
> in the sitemap, and
> 
> <xinclude:include href="test" parse="xml"/>
> 
> in the 'start.xsl' file, can I assume that the ouput of the 'test' pattern
> will get included?

No.  The XIncludeSAXConnector is not a Transformer. In the "cocoon.xconf" file
there is a line like this:

  <sax-connector class="org.apache.cocoon.components.saxconnector.XIncludeSAXConnector"/>

The other alternative is

  <sax-connector class="org.apache.cocoon.components.saxconnector.NullSAXConnector"/>

The XIncludeSAXConnector is used for invisible aggregation.  It actually may begin to
use a new namespace soon because it doesn't obey xinclude semantics completely.  It will
perform the include if your "test" entry is generated in the Generator or the Transformer.

Again, take a look at the dynamic pages samples and view the Aggregation one.

> 
> -----Original Message-----
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> Sent: Monday, May 07, 2001 5:14 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: XIncludeTransformer
> 
> John Schult wrote:
> >
> > Has anyone used the XIncludeTransformer?  Assuming this is in the sitemap:
> >
> >  <map:transformer name="xinclude"
> > src="org.apache.cocoon.transformation.XIncludeTransformer"/>
> >
> > What would be the syntax of the <map:transform...> ?  I am assuming that
> you
> > place <map:transform type="xinclude"/> in the pipeline and it will resolve
> > the <xinclude:include.../> elements in the document.  Is this right?
> 
> Yes.  There are two different forms of performing XInclude.  You can
> use the <map:transform type="xinclude"/> method which includes resources
> directly from a URL.  The other method is using the XIncludeSAXConnector
> which only includes resources from the sitemap (in other words, XSP pages
> and aggregated content).
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message