You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Cindy Girard <cl...@virginia.edu> on 2006/08/01 20:06:30 UTC

sitemap chaining

Hi,

  I'm trying to use the cocoon sitemap to preprocess an XML file
  (using XSLT - an XML to XML transformation), then immediately use
  another XSLT stylesheet to transform the result to HTML. This is my
  pipeline match:


     <map:match pattern="utc_childrn_*.xml">
       <map:generate type="file" src="xml/utc/media/childrn/{1}.xml"/>
          <map:transform type="xslt" src="stylesheets/utc/hltest.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
          </map:transform>
          <map:transform type="xslt" src="stylesheets/utc/utc_display.xsl">
          <map:parameter name="use-request-parameters" value="true"/>
          </map:transform>
       <map:serialize type="html"/>
          <!-- map:serialize type="xml"/ -->
     </map:match>
  

     The first part is working (when I take out the utc_display.xsl
     step), but when I add the utc_display transform, I get a blank
     page. It starts to render it, because it uses the appropriate
     background jpg, but no text comes out.

     Is my sitemap wrong?

     Any help would be appreciated.

     Thanks,
     
  

----- 
- Cindy  

Cynthia M. Girard
IATH, University of Virginia
clm6u@virginia.edu

"Danger? I laugh in the face of danger!
...and then I hide until it goes away."


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


Re: sitemap chaining

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Aug 1, 2006, at 11:06 AM, Cindy Girard wrote:

>      <map:match pattern="utc_childrn_*.xml">
>        <map:generate type="file" src="xml/utc/media/childrn/{1}.xml"/>
>           <map:transform type="xslt" src="stylesheets/utc/hltest.xsl">
>           <map:parameter name="use-request-parameters" value="true"/>
>           </map:transform>
>           <map:transform type="xslt" 
> src="stylesheets/utc/utc_display.xsl">
>           <map:parameter name="use-request-parameters" value="true"/>
>           </map:transform>
>        <map:serialize type="html"/>
>           <!-- map:serialize type="xml"/ -->
>      </map:match>
>
>
>      The first part is working (when I take out the utc_display.xsl
>      step), but when I add the utc_display transform, I get a blank
>      page. It starts to render it, because it uses the appropriate
>      background jpg, but no text comes out.
>
>      Is my sitemap wrong?

Probably not... more likely the problem is with your stylesheets.  It 
actually kind of sounds like it could be a namespaces issue.  Can you 
post your utc_display.xsl stylesheet as well as the output from the 
hltest.xsl?

—ml—

P.S.  I don't like use-request-parameters.  I think you should use 
<parameter name="foo" value="{request-param:foo}", but whatever... 
different strokes for different etc.


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


Re: Re[2]: sitemap chaining

Posted by Nicolas Duroc <ni...@gmail.com>.
yeahhhhh, I helped someone, it's my first time !! wooOOooo !!

sorry for this totally useless message :-)


2006/8/1, Cindy Girard <cl...@virginia.edu>:
>
> Thanks, Nicolas,
> I think that did it!
>
> ND> I'm not sure about the line <map:parameter
> ND> name="use-request-parameters" value="true"/> in the "match part",
> ND> I would put it in the "transformer part" :
> ND>
> ND> [...]
> ND> <map:transformer name="xsl" src="....">
> ND> <use-request-parameters>true</use-request-parameters>
> ND> </map:transformer>
> ND> [...]
> ND> <map:match pattern="utc_childrn_*.xml">
> ND> <map:generate type="file"
> ND> src="xml/utc/media/childrn/{1}.xml"/>
> ND> <map:transform type="xslt"
> ND> src="stylesheets/utc/hltest.xsl"/>
> ND> <map:transform type="xslt"
> ND> src="stylesheets/utc/utc_display.xsl"/>
> ND> <map:serialize type="html"/>
> ND> <!-- map:serialize type="xml"/ -->
> ND> </map:match>
> ND>
> ND> I'm not sure this will solve your problem, but you can try :-)
>
> ND>
> ND> 2006/8/1, Cindy Girard <cl...@virginia.edu>:
> ND> Hi,
>
> ND> I'm trying to use the cocoon sitemap to preprocess an XML file
> ND> (using XSLT - an XML to XML transformation), then immediately use
> ND> another XSLT stylesheet to transform the result to HTML. This is my
> ND> pipeline match:
>
>
> ND> <map:match pattern="utc_childrn_*.xml">
> ND> <map:generate type="file"
> ND> src="xml/utc/media/childrn/{1}.xml"/>
> ND> <map:transform type="xslt"
> ND> src="stylesheets/utc/hltest.xsl">
> ND> <map:parameter name="use-request-parameters" value="true"/>
> ND> </map:transform>
> ND> <map:transform type="xslt"
> ND> src="stylesheets/utc/utc_display.xsl">
> ND> <map:parameter name="use-request-parameters" value="true"/>
> ND> </map:transform>
> ND> <map:serialize type="html"/>
> ND> <!-- map:serialize type="xml"/ -->
> ND> </map:match>
>
>
> ND> The first part is working (when I take out the utc_display.xsl
> ND> step), but when I add the utc_display transform, I get a blank
> ND> page. It starts to render it, because it uses the appropriate
> ND> background jpg, but no text comes out.
>
> ND> Is my sitemap wrong?
>
> ND> Any help would be appreciated.
>
> ND> Thanks,
>
>
>
> ND> -----
> ND> - Cindy
>
> ND> Cynthia M. Girard
> ND> IATH, University of Virginia
> ND> clm6u@virginia.edu
>
> ND> "Danger? I laugh in the face of danger!
> ND> ...and then I hide until it goes away."
>
>
> ND> ---------------------------------------------------------------------
> ND> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> ND> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>
>
>
>
> --
> - Cindy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re[2]: sitemap chaining

Posted by Cindy Girard <cl...@virginia.edu>.
Thanks, Nicolas,
I think that did it!

ND> I'm not sure about the line <map:parameter
ND> name="use-request-parameters" value="true"/> in the "match part",
ND> I would put it in the "transformer part" :
ND>  
ND> [...]
ND> <map:transformer name="xsl" src="...."> 
ND>     <use-request-parameters>true</use-request-parameters> 
ND> </map:transformer>
ND> [...]
ND> <map:match pattern="utc_childrn_*.xml">
ND>       <map:generate type="file"
ND> src="xml/utc/media/childrn/{1}.xml"/>
ND>          <map:transform type="xslt"
ND> src="stylesheets/utc/hltest.xsl"/>
ND>          <map:transform type="xslt"
ND> src="stylesheets/utc/utc_display.xsl"/>
ND>       <map:serialize type="html"/>
ND>          <!-- map:serialize type="xml"/ -->
ND> </map:match>
ND>  
ND> I'm not sure this will solve your problem, but you can try :-)

ND>  
ND> 2006/8/1, Cindy Girard <cl...@virginia.edu>:
ND> Hi,

ND> I'm trying to use the cocoon sitemap to preprocess an XML file
ND> (using XSLT - an XML to XML transformation), then immediately use
ND> another XSLT stylesheet to transform the result to HTML. This is my
ND> pipeline match:


ND>     <map:match pattern="utc_childrn_*.xml">
ND>       <map:generate type="file"
ND> src="xml/utc/media/childrn/{1}.xml"/>
ND>          <map:transform type="xslt"
ND> src="stylesheets/utc/hltest.xsl">
ND>          <map:parameter name="use-request-parameters" value="true"/>
ND>          </map:transform>
ND>          <map:transform type="xslt"
ND> src="stylesheets/utc/utc_display.xsl">
ND>          <map:parameter name="use-request-parameters" value="true"/>
ND>          </map:transform>
ND>       <map:serialize type="html"/>
ND>          <!-- map:serialize type="xml"/ -->
ND>     </map:match>


ND>     The first part is working (when I take out the utc_display.xsl
ND>     step), but when I add the utc_display transform, I get a blank
ND>     page. It starts to render it, because it uses the appropriate
ND>     background jpg, but no text comes out.

ND>     Is my sitemap wrong?

ND>     Any help would be appreciated.

ND>     Thanks,



ND> -----
ND> - Cindy

ND> Cynthia M. Girard
ND> IATH, University of Virginia
ND> clm6u@virginia.edu

ND> "Danger? I laugh in the face of danger!
ND> ...and then I hide until it goes away."


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








-- 
- Cindy 


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


Re: sitemap chaining

Posted by Josias Thöny <jo...@wyona.com>.
On Tue, 2006-08-01 at 11:26 -0700, Mark Lundquist wrote:
> On Aug 1, 2006, at 11:20 AM, Nicolas Duroc wrote:
> 
> > I'm not sure about the line <map:parameter 
> > name="use-request-parameters" value="true"/> in the "match part", I 
> > would put it in the "transformer part"
> 
> oh yeah, I totally missed that.  Details... :-)
> 
> What your <parameter> element did was to pass a parameter name 
> "use-request-parameters" with value "true" into the XSLT stylesheet 
> itself.

Does that mean that the docu on
http://cocoon.apache.org/2.1/userdocs/default/xslt-transformer.html
is wrong?

It says:
The "use-request-parameters" and "use-browser-capabilities-db"
configuration of a transformer can be changed for one single pipeline by
specifying parameters with the same name:

  <map:transform src="stylesheet.xsl">
    <map:parameter name="use-request-parameters" value="true"/>
  </map:transform>
     

-- Josias

> 
> The way Nicolas wrote it is correct.
> 
> —ml—
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Re: sitemap chaining

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Aug 1, 2006, at 11:20 AM, Nicolas Duroc wrote:

> I'm not sure about the line <map:parameter 
> name="use-request-parameters" value="true"/> in the "match part", I 
> would put it in the "transformer part"

oh yeah, I totally missed that.  Details... :-)

What your <parameter> element did was to pass a parameter name 
"use-request-parameters" with value "true" into the XSLT stylesheet 
itself.

The way Nicolas wrote it is correct.

—ml—


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


Re: sitemap chaining

Posted by Nicolas Duroc <ni...@gmail.com>.
I'm not sure about the line <map:parameter name="use-request-parameters"
value="true"/> in the "match part", I would put it in the "transformer part"
:

[...]
<map:transformer name="xsl" src="....">
    <use-request-parameters>true</use-request-parameters>
</map:transformer>
[...]
<map:match pattern="utc_childrn_*.xml">
      <map:generate type="file" src="xml/utc/media/childrn/{1}.xml"/>
         <map:transform type="xslt" src="stylesheets/utc/hltest.xsl"/>
         <map:transform type="xslt" src="stylesheets/utc/utc_display.xsl"/>
      <map:serialize type="html"/>
         <!-- map:serialize type="xml"/ -->
</map:match>

I'm not sure this will solve your problem, but you can try :-)


2006/8/1, Cindy Girard <cl...@virginia.edu>:
>
> Hi,
>
> I'm trying to use the cocoon sitemap to preprocess an XML file
> (using XSLT - an XML to XML transformation), then immediately use
> another XSLT stylesheet to transform the result to HTML. This is my
> pipeline match:
>
>
>     <map:match pattern="utc_childrn_*.xml">
>       <map:generate type="file" src="xml/utc/media/childrn/{1}.xml"/>
>          <map:transform type="xslt" src="stylesheets/utc/hltest.xsl">
>          <map:parameter name="use-request-parameters" value="true"/>
>          </map:transform>
>          <map:transform type="xslt" src="stylesheets/utc/utc_display.xsl">
>          <map:parameter name="use-request-parameters" value="true"/>
>          </map:transform>
>       <map:serialize type="html"/>
>          <!-- map:serialize type="xml"/ -->
>     </map:match>
>
>
>     The first part is working (when I take out the utc_display.xsl
>     step), but when I add the utc_display transform, I get a blank
>     page. It starts to render it, because it uses the appropriate
>     background jpg, but no text comes out.
>
>     Is my sitemap wrong?
>
>     Any help would be appreciated.
>
>     Thanks,
>
>
>
> -----
> - Cindy
>
> Cynthia M. Girard
> IATH, University of Virginia
> clm6u@virginia.edu
>
> "Danger? I laugh in the face of danger!
> ...and then I hide until it goes away."
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>