You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Phil Blake <ph...@tcp.net.au> on 2002/11/18 08:58:03 UTC

Does work?

Hi all,

I'm having a problem with <apply-imports> applying any imports.

Can someone in-the-know assure me that <apply-imports> is functional? 
Also, if there is any trick to using it as I haven't seen it work yet 
and I think I've got a pretty simple example.

Thanks in advance,

Phil



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

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


Re: Does work?

Posted by Boscoe <Bo...@t-online.de>.
  Hi Phil,

>
> I have a stylesheet with the following matcher:
>
> <xsl:template match="psi:pageContent" name="psi_pageContent" 
> mode="psi_pageContent">
> <xsl:apply-templates select="psi:pageHead" mode="psi_pageHead"/>
> <xsl:apply-templates select="psi:pageBody" mode="psi_pageBody"/>
> <xsl:apply-templates select="psi:pageFoot" mode="psi_pageFoot"/>
> </xsl:template>
>
> and another stylesheet that imports the above stylesheet with an 
> overriding matcher:
>
> <xsl:template match="psi:pageContent" name="psi_pageContent" 
> mode="psi_pageContent">
> <body>
> <xsl:apply-imports/> 

try this:
      <xsl:apply-imports mode="psi_pageContent"/>

>
> </body>
> </xsl:template>
>
Greetings,

Boscoe



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

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


Re: Does work?

Posted by Joerg Heinicke <jo...@gmx.de>.
I don't know, you have to ask the XSLTC guys, maybe one is on this list? 
At http://xml.apache.org/xalan-j/xsltc/index.html there is a link to 
<xsl:apply-imports/> ... 404 ;-)

Joerg

Phil Blake wrote:
>> <map:transform src="psi.xsl" type="xalan"/>
>>
>> Does this solve your problem?
>>
> Yes it does. I missed the move of transformers. Thanks for pointing it out.
> 
> It is working with xalan and not with xsltc. Do you know if 
> <apply-templates> is yet-to-be-implemented? ...or why it isn't working?
> 
> Just asking - I'll look into it.
> 
> Thanks,
> 
> Phil


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

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


Re: Does work?

Posted by Phil Blake <ph...@tcp.net.au>.
> <map:transform src="psi.xsl" type="xalan"/>
>
> Does this solve your problem?
>
Yes it does. I missed the move of transformers. Thanks for pointing it 
out.

It is working with xalan and not with xsltc. Do you know if 
<apply-templates> is yet-to-be-implemented? ...or why it isn't working?

Just asking - I'll look into it.

Thanks,

Phil



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

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


Re: Does work?

Posted by Joerg Heinicke <jo...@gmx.de>.
Dependent on the date you downloaded your Cocoon, XSLTC is default. Have 
a look into the root sitemap:

<map:transformers default="xslt">

and a few lines below you shell find:

<map:transformer name="xslt"> (some more attributes)
<transformer-factory>org.apache.xalan.xsltc.trax.TransformerFactoryImpl</transformer-factory>
... (some more elements for configuration)
</map:transformer>

The transformer-factory must not be commented out for working!! Then you 
are using XSLTC.

Now to the stylesheet: Everything seems to be ok, I can't see any 
obvious (silly) thing.

Try to change the transformer in the sitemap in this pipeline, where the 
problem occurs, by adding type="xalan":

<map:transform src="psi.xsl" type="xalan"/>

Does this solve your problem?

Regards,

Joerg

Phil Blake wrote:
> Hi Joerg,
> 
> Thanks for your reply.
> 
> I'm using cocoon 2.1-dev and xalan 2.3.1. I don't know what you mean by 
> "Is XSLTC already used by default?".
> 
> The problem is this:
> 
> I have a stylesheet with the following matcher:
> 
> <xsl:template match="psi:pageContent" name="psi_pageContent" 
> mode="psi_pageContent">
> <xsl:apply-templates select="psi:pageHead" mode="psi_pageHead"/>
> <xsl:apply-templates select="psi:pageBody" mode="psi_pageBody"/>
> <xsl:apply-templates select="psi:pageFoot" mode="psi_pageFoot"/>
> </xsl:template>
> 
> and another stylesheet that imports the above stylesheet with an 
> overriding matcher:
> 
> <xsl:template match="psi:pageContent" name="psi_pageContent" 
> mode="psi_pageContent">
> <body>
> <xsl:apply-imports/>
> </body>
> </xsl:template>
> 
> However, the apply-imports on the second stylesheet does not appear to 
> work - ie. the matcher in the imported sheet is not called. Have I done 
> something obviously silly?
> 
> Thanks again,
> 
> Phil
> On Tuesday, November 19, 2002, at 04:58 AM, Joerg Heinicke wrote:
> 
>     Phil Blake wrote:
> 
>         Hi all,
>         I'm having a problem with <apply-imports> applying any imports.
>         Can someone in-the-know assure me that <apply-imports> is
>         functional? Also, if there is any trick to using it as I haven't
>         seen it work yet and I think I've got a pretty simple example.
>         Thanks in advance,
>         Phil
> 
> 
>     It should work in general, what's your problem? What Cocoon and
>     Xalan version are you using? Is XSLTC already used by default?
> 
>     Joerg


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

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


Re: Does work?

Posted by Phil Blake <ph...@tcp.net.au>.
Hi Joerg,

Thanks for your reply.

I'm using cocoon 2.1-dev and xalan 2.3.1. I don't know what you mean by 
"Is XSLTC already used by default?".

The problem is this:

I have a stylesheet with the following matcher:

     <xsl:template match="psi:pageContent" name="psi_pageContent" 
mode="psi_pageContent">
          <xsl:apply-templates select="psi:pageHead" 
mode="psi_pageHead"/>
          <xsl:apply-templates select="psi:pageBody" 
mode="psi_pageBody"/>
          <xsl:apply-templates select="psi:pageFoot" 
mode="psi_pageFoot"/>
     </xsl:template>

and another stylesheet that imports the above stylesheet with an 
overriding  matcher:

     <xsl:template match="psi:pageContent" name="psi_pageContent" 
mode="psi_pageContent">
	<body>
             <xsl:apply-imports/>
         </body>
     </xsl:template>

However, the apply-imports on the second stylesheet does not appear to 
work - ie. the matcher in the imported sheet is not called. Have I done 
something obviously silly?

Thanks again,

Phil
On Tuesday, November 19, 2002, at 04:58 AM, Joerg Heinicke wrote:

> Phil Blake wrote:
>> Hi all,
>> I'm having a problem with <apply-imports> applying any imports.
>> Can someone in-the-know assure me that <apply-imports> is functional? 
>> Also, if there is any trick to using it as I haven't seen it work yet 
>> and I think I've got a pretty simple example.
>> Thanks in advance,
>> Phil
>
> It should work in general, what's your problem? What Cocoon and Xalan 
> version are you using? Is XSLTC already used by default?
>
> Joerg
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>

Re: Does work?

Posted by Joerg Heinicke <jo...@gmx.de>.
Phil Blake wrote:
> Hi all,
> 
> I'm having a problem with <apply-imports> applying any imports.
> 
> Can someone in-the-know assure me that <apply-imports> is functional? 
> Also, if there is any trick to using it as I haven't seen it work yet 
> and I think I've got a pretty simple example.
> 
> Thanks in advance,
> 
> Phil

It should work in general, what's your problem? What Cocoon and Xalan 
version are you using? Is XSLTC already used by default?

Joerg


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

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