You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Binkley, Peter" <Pe...@ualberta.ca> on 2007/02/05 17:50:17 UTC

Cocoon Plumber

I've just released a tool that other Cocoon users might find useful.
It's a Firefox extension that shows your current pipeline in a sidebar
when you view a Cocoon-generated page. (Some simple extra pipelines have
to be added to your sitemap to provide the sidebar view.) Within the
sidebar, you can click to view stylesheets, intermediate views (by
clicking on a label), and profiling information if you've got profiling
turned on. 

It's still fairly primitive but it works. It could really use some help
from someone who knows Cocoon's sitemap management well enough to come
up with a more efficient and reliable way to identify and display the
pipeline that is serving a given request.

http://www.wallandbinkley.com/quaedam/?p=72

Feedback and patches are welcome!

Peter


Peter Binkley
Digital Initiatives Technology Librarian
Information Technology Services
4-30 Cameron Library
University of Alberta Libraries
Edmonton, Alberta
Canada T6G 2J8
Phone: (780) 492-3743
Fax: (780) 492-9243
e-mail: peter.binkley@ualberta.ca


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


Re: Cocoon Plumber

Posted by Mark Lundquist <lu...@gmail.com>.
Thanks a lot!  I look forward to trying this out as soon as I can...

cheers,
—ml—


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


Re: Fwd: Cocoon Plumber

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> fwd: from users@cocoon
> 
> I haven't checked this out, but if it works as advertised, it looks
> pretty useful.

I tried this a few days ago, but it froze Firefox. It sounds great, but 
if it kills the browser it needs to mature (I sent details of the error 
message to the author of course).

Ross

Fwd: Cocoon Plumber

Posted by Tim Williams <wi...@gmail.com>.
fwd: from users@cocoon

I haven't checked this out, but if it works as advertised, it looks
pretty useful.

--tim

---------- Forwarded message ----------
From: Binkley, Peter <Pe...@ualberta.ca>
Date: Feb 5, 2007 11:50 AM
Subject: Cocoon Plumber
To: users@cocoon.apache.org


I've just released a tool that other Cocoon users might find useful.
It's a Firefox extension that shows your current pipeline in a sidebar
when you view a Cocoon-generated page. (Some simple extra pipelines have
to be added to your sitemap to provide the sidebar view.) Within the
sidebar, you can click to view stylesheets, intermediate views (by
clicking on a label), and profiling information if you've got profiling
turned on.

It's still fairly primitive but it works. It could really use some help
from someone who knows Cocoon's sitemap management well enough to come
up with a more efficient and reliable way to identify and display the
pipeline that is serving a given request.

http://www.wallandbinkley.com/quaedam/?p=72

Feedback and patches are welcome!

Peter


Peter Binkley
Digital Initiatives Technology Librarian
Information Technology Services
4-30 Cameron Library
University of Alberta Libraries
Edmonton, Alberta
Canada T6G 2J8
Phone: (780) 492-3743
Fax: (780) 492-9243
e-mail: peter.binkley@ualberta.ca


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

RE: Xsp logicsheet method invocation

Posted by "Schmitz, Jeffrey A" <Je...@boeing.com>.
Thanks,
   That seems like a lot of work since I already have a nice java
utility that I was hoping to use as my generator to create xml from
database data.  How is something like this usually done with Cocoon?
i.e. My generator already produces regular xml which I'd like to feed to
an xsl stylsheet.  I guess I could do it using files instead of trying
to pass it directly from generator to transformer, but that seems kind
of kludgy.

Jeff 

-----Original Message-----
From: Tobia [mailto:tobia.conforto@linux.it] 
Sent: Tuesday, February 06, 2007 8:35 AM
To: users@cocoon.apache.org
Subject: Re: Xsp logicsheet method invocation

Schmitz, Jeffrey A wrote:
> My logicsheet function which serves as my generator produces (and
> returns) an xml string.  Why, before it gets passed to my xsl 
> transformer are all the angle brackets converted to &lt; and &gt;, and

> is there a way to stop this behavior?

Because your "xml string" is just a text node (a string) inside the xml
document you're generating.  You cannot write literal < and > in xml
text nodes, because they delimit tags, so Cocoon escapes them for you.

The only reason you would need to output literal < and > is to create
output elements, but that is done with <xsp:element> and
<xsp:attribute>.  
See the samples in src/blocks/xsp/samples/java/

  <xsp:element>
    <xsp:param
name="name"><xsp:expr>"P".toLowerCase()</xsp:expr></xsp:param>
    <xsp:attribute name="align">left</xsp:attribute>
    Hello
  </xsp:element>

generates:

  <p align="left">Hello</p>
  

Tobia

---------------------------------------------------------------------
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: Xsp logicsheet method invocation

Posted by Tobia <to...@linux.it>.
Schmitz, Jeffrey A wrote:
> My logicsheet function which serves as my generator produces (and
> returns) an xml string.  Why, before it gets passed to my xsl
> transformer are all the angle brackets converted to &lt; and &gt;, and
> is there a way to stop this behavior? 

Because your "xml string" is just a text node (a string) inside the xml
document you're generating.  You cannot write literal < and > in xml
text nodes, because they delimit tags, so Cocoon escapes them for you.

The only reason you would need to output literal < and > is to create
output elements, but that is done with <xsp:element> and <xsp:attribute>.  
See the samples in src/blocks/xsp/samples/java/

  <xsp:element>
    <xsp:param name="name"><xsp:expr>"P".toLowerCase()</xsp:expr></xsp:param>
    <xsp:attribute name="align">left</xsp:attribute>
    Hello
  </xsp:element>

generates:

  <p align="left">Hello</p>
  

Tobia

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


RE: Xsp logicsheet method invocation

Posted by "Schmitz, Jeffrey A" <Je...@boeing.com>.
Ok, let me try to phrase it simpler.

My logicsheet function which serves as my generator produces (and
returns) an xml string.  Why, before it gets passed to my xsl
transformer are all the angle brackets converted to &lt; and &gt;, and
is there a way to stop this behavior? 

I've searched for an answer and read through all the xsp/logicsheet
stuff and don't see this described anywhere.

Thanks,
Jeff

-----Original Message-----
From: Schmitz, Jeffrey A 
Sent: Monday, February 05, 2007 3:12 PM
To: users@cocoon.apache.org
Subject: RE: Xsp logicsheet method invocation

In a related question, my java code is generating XML code to return to
the cocoon pipeline via the xsp generator.  However, somewhere along the
way all the angle brackets are getting converted into &lt; and &gt;,
before getting sent to my xsl transformer.  Is there a way to make
cocoon NOT do this conversion on my generator output so that my xsl
transform will properly transform the code?

Thanks
Jeff 

-----Original Message-----
From: Schmitz, Jeffrey A
Sent: Monday, February 05, 2007 1:49 PM
To: users@cocoon.apache.org
Subject: Xsp logicsheet method invocation

Hello,
   I'm trying use and xsp generator that uses a logic sheet, and I'm
almost there, but there's something I don't understand.  For some
reason, in my logicsheet xsl file, I have to put xml tags around my java
function invocation, otherwise, when I try to invoke the associated
sitemap pipeline, cocoon returns immediately with no data, without ever
invoking my function.  

Here's what I have to make my logicsheet xsl look like in order to get
it to run:

<xsl:template match="MyTag:runFunc">
<junkTag>
	<xsp:expr>runfunc()</xsp:expr>
</junkTag>
</xsl:template>

However, I don't want the junkTags returned as I don't want to process
them in my xml transform.  I'd rather be able to just do:

<xsl:template match="MyTag:runFunc">	
	<xsp:expr>runfunc()</xsp:expr>
</xsl:template>

Here is the xsp file that references the logicsheet xsl.
 <xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:util="http://apache.org/xsp/util/2.0"
	xmlns:DiagML="http://www.boeing.com/MyTag">
   <MyTag:runFunc>
   </MyTag:runFunc>
</xsp:page>

Again, it works fine as long as I have the junkTag's, so I must have
everything configured ok for the logicsheet.

Thanks,
jeff

---------------------------------------------------------------------
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


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


RE: Xsp logicsheet method invocation

Posted by "Schmitz, Jeffrey A" <Je...@boeing.com>.
In a related question, my java code is generating XML code to return to
the cocoon pipeline via the xsp generator.  However, somewhere along the
way all the angle brackets are getting converted into &lt; and &gt;,
before getting sent to my xsl transformer.  Is there a way to make
cocoon NOT do this conversion on my generator output so that my xsl
transform will properly transform the code?

Thanks
Jeff 

-----Original Message-----
From: Schmitz, Jeffrey A 
Sent: Monday, February 05, 2007 1:49 PM
To: users@cocoon.apache.org
Subject: Xsp logicsheet method invocation

Hello,
   I'm trying use and xsp generator that uses a logic sheet, and I'm
almost there, but there's something I don't understand.  For some
reason, in my logicsheet xsl file, I have to put xml tags around my java
function invocation, otherwise, when I try to invoke the associated
sitemap pipeline, cocoon returns immediately with no data, without ever
invoking my function.  

Here's what I have to make my logicsheet xsl look like in order to get
it to run:

<xsl:template match="MyTag:runFunc">
<junkTag>
	<xsp:expr>runfunc()</xsp:expr>
</junkTag>
</xsl:template>

However, I don't want the junkTags returned as I don't want to process
them in my xml transform.  I'd rather be able to just do:

<xsl:template match="MyTag:runFunc">	
	<xsp:expr>runfunc()</xsp:expr>
</xsl:template>

Here is the xsp file that references the logicsheet xsl.
 <xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:util="http://apache.org/xsp/util/2.0"
	xmlns:DiagML="http://www.boeing.com/MyTag">
   <MyTag:runFunc>
   </MyTag:runFunc>
</xsp:page>

Again, it works fine as long as I have the junkTag's, so I must have
everything configured ok for the logicsheet.

Thanks,
jeff

---------------------------------------------------------------------
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


Xsp logicsheet method invocation

Posted by "Schmitz, Jeffrey A" <Je...@boeing.com>.
Hello,
   I'm trying use and xsp generator that uses a logic sheet, and I'm
almost there, but there's something I don't understand.  For some
reason, in my logicsheet xsl file, I have to put xml tags around my java
function invocation, otherwise, when I try to invoke the associated
sitemap pipeline, cocoon returns immediately with no data, without ever
invoking my function.  

Here's what I have to make my logicsheet xsl look like in order to get
it to run:

<xsl:template match="MyTag:runFunc">
<junkTag>
	<xsp:expr>runfunc()</xsp:expr>
</junkTag>
</xsl:template>

However, I don't want the junkTags returned as I don't want to process
them in my xml transform.  I'd rather be able to just do:

<xsl:template match="MyTag:runFunc">	
	<xsp:expr>runfunc()</xsp:expr>
</xsl:template>

Here is the xsp file that references the logicsheet xsl.
 <xsp:page language="java"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:util="http://apache.org/xsp/util/2.0"
	xmlns:DiagML="http://www.boeing.com/MyTag">
   <MyTag:runFunc>
   </MyTag:runFunc>
</xsp:page>

Again, it works fine as long as I have the junkTag's, so I must have
everything configured ok for the logicsheet.

Thanks,
jeff

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