You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stefano Mazzocchi <st...@apache.org> on 2003/04/23 19:43:37 UTC

[FYI] Stefano's Linotype

Yep, I now have a blog.

Find it on

 http://www.betaversion.org/~stefano/linotype/

Besides the shameless plug, I'm writing about it here because I've
written my own blogging tool using the micro-CMS stuff I used for my
dad's web site that I previously announced.

The tool is called "Linotype". It features inline XHTML editing using
Mozilla Midas. fully based on flowscript. no use of databases.

You can find the whole package here:

  http://www.betaversion.org/~stefano/dist/linotype_1.0.tar.gz [52Kb]

just add all the cocoon libraries (including scratchpad!!) from your
latest CVS HEAD build into /WEB-INF/lib and deploy on your favorite
servlet container.

Enjoy.

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Bernhard Huber <be...@a1.net>.
hi,

>Yep, I now have a blog.
>
>Find it on
>
> http://www.betaversion.org/~stefano/linotype/
>  
>
very nice stuff,
you put a lot of work into css stuff, very nice,
its especially a lot of work to cover from gui design,
cocoon flow programming, and designing directory filesystem, and sitemap
very cool, very nice,
thx for your sharing.



Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/23/03 8:39 PM Christopher Oliver wrote:

> Uh, sorry, but I think I broke you. 

uh, well, that's the joy of the bleeding edge ;-)

> I recently blasted JXPathTransformer 
> and JXPathTemplate from the scratchpad. If the below still works for 
> you, you  probably still have the old class files in your build 
> directory.  

Right.

> There was a lot of code duplication between 
> JXPathTransformer, JexlTransformer, JXPathTemplate and JexlTemplate that 
> needed to be eliminated. So I created a new generator called JXTemplate 
> (which includes JXPath and Jexl) and removed the others. You should use 
> this instead. There is no transformer, however. Do you really need one? 
> If so, I guess it would be easy enough to create a transformer adapter 
> for JXTemplate.

I use it just for one thing: evaluating the continuation ID for the form
action of the editor. I'd be *totally* happy to blast it in favor of a
generator-oriented approach, but I couldn't find how.

This is what I'm doing:

 1) you have an XHTML document on your disk
 2) the document is processed by an XSLT stylesheets that wraps it with
with the inline editor.

As you see, it's not the generation's concern to know about the
continuation, but it's the wrap-up stage that knows about that since the
document might well come from any source (in the future, hopefully, an
XMl database or versioned repository).

The best solution, IMO, would be to allow the XSLT transformer to have
access to flow-injected parameters. This would allow me to avoid that
transformation stage just to expand one single variable.

Another alternative is to write a sitemap input module which the same
functionality so i can do

 <map:generate src="document.xhtml">
 <map:transform src="document2editor.xslt">
  <map:parameter name="continuationID" value="{flow:continuation/id}"/>
 </map:transform>
 ...

So, at the end, I don't need a jxpath transformer, but I *DO* need
flow-injected variable expansion at transformation time.

You probably didn't find those needs because you had total control of
your generation stage, but in my case the document is not a template,
but a datasource fragment and it's my transformation the real template.

[BTW, this duality of generation/transformation templating capabilities
is an *awesome* power. extremely powerful indeed.]

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Tony Collen <tc...@neuagency.com>.
On Wed, 23 Apr 2003, Christopher Oliver wrote:

> Uh, sorry, but I think I broke you. I recently blasted JXPathTransformer
> and JXPathTemplate from the scratchpad. If the below still works for
> you, you  probably still have the old class files in your build
> directory.  There was a lot of code duplication between
> JXPathTransformer, JexlTransformer, JXPathTemplate and JexlTemplate that
> needed to be eliminated. So I created a new generator called JXTemplate
> (which includes JXPath and Jexl) and removed the others. You should use
> this instead. There is no transformer, however. Do you really need one?
> If so, I guess it would be easy enough to create a transformer adapter
> for JXTemplate.
>

Hmmm... I'm just starting to wrap my head around the Flow, and I'm not
really understanding why we only get the generator.  IMO, it's getting a
little complicated templating our XML, which will just be transformed
using XSL anyway... I think a JXTemplate transformer would be more useful,
especially when we want to generate our XML in other ways, and then pull
the JXTemplate values into the XML instead of the other way around.

Forgive me if I don't sound like I know what I'm talking about, because
all this JXTemplate stuff is new to me, as is all the Flowscript, and I'm
having a helluva time learning how to use the JXTemplate generator, let
alone making sure my Flow is working correctly.


Tony


Re: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)

Posted by Tony Collen <tc...@neuagency.com>.
On Thu, 24 Apr 2003, Christopher Oliver wrote:

> Tony,
>
> You can find examples in the PetStore sample in the scratchpad.


Aha.  Cripes.   Thanks for the pointer.  I didn't mean to rip so hard into
the work you've done on the JXTemplate stuff.. I was getting at the end of
my rope.


Thanks again,

Tony

--
Tony Collen
ICQ: 12410567
--
Cocoon: Internet Glue (A Cocoon Weblog)
http://manero.org/weblog/
--


Re: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)

Posted by Christopher Oliver <re...@verizon.net>.
Tony,

You can find examples in the PetStore sample in the scratchpad.

Tony Collen wrote:

>Alright, now that I'm fresh from a night of sleep, and I'm not all dizzy
>and tired, I'll take another poke at this:
>
>I'm starting to dig into actually using the Flow, and I'm having a hard
>time understanding using the JXTemplate(Generator).
>
>Rather, I'm having a hard time understanding why we need a templating
>language inside our nice XSLT templating system.
>
>>>From a user's perspective, I already invested a lot of time learning XSLT
>(and I do not even claim to be extremely comfortable with that, too!), so
>why should I take the time to learn another templating language?  Argh!!
>This was supposed to be easy, but now it feels like it's getting horribly
>complex again.
>
>It's nice the Generator is fast [1], but it still feels like it's doing
>the work of a Generator and a Transformer, which pokes me in a weird way
>for some reason.
>
>Maybe I'm stupid, and just not seeing the advantages.
>
>Last night, when I dove into all of the Flow stuff, I got to the point
>to where I had to reference "bizData" in my view pages.  I was following
>the patterns in Stefano's Linotype code, using <map:generate
>type="jxpath"/>.  My problem then came around to where I couldn't even get
>the Continuation ID, due to the difference between Stefano's code and the
>JXTemplate(Generator) in CVS.
>
>So I go looking for docs, and all I find is the Javadocs for JXTemplate,
>but the Javadocs weren't built for the things in Scratchpad! Argh!
>
>I digress.  It's been a long week and finals are about to hit.  I guess
>I'm just frustrated at not having working samples and not getting the docs
>for the JXTemplate(Generator).  Which reminds me.  I think the JXTemplate
>generator in scratchpad should be named JXTemplateGenerator for
>consistency's sake.
>
>So here's my plea, can someone who's "in-the-know" about JXTemplate whip
>up a nice sample that uses the tags (choose, import, etc) in a meaningful
>and useful way for the annoying n00bs (me)?  Or perhaps another sample in
>the Flow directory that correctly uses the new Generator?  .. I'll promise
>to chill out, and get over the bump in complexity and having to learn
>Yet Another Templating Language... hopefully sooner rather than later   :)
>
>
>Regards,
>
>Tony
>
>[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105029949912114&w=2
>
>--
>Tony Collen
>ICQ: 12410567
>--
>Cocoon: Internet Glue (A Cocoon Weblog)
>http://manero.org/weblog/
>--
>
>
>
>
>  
>



RE: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)

Posted by Reinhard Pötz <re...@gmx.net>.
Tony,

I recommend you to have a look at the Petstore. Christopher has done a
great job providing the examples in 4 different ways (jxpath, jexl, xsp
and velocity).

My first impression is that it looks very clear, simple and well-thought
to me: 
You control the flow using the Cocoon control flow and "send" data to
the pipeline which is responsible for the view using the object model.
Additionally you have access to some common objects like request or the
continuation (and some more). This data can be accessed with those 4
"languages" which provide some simple control structures like choose,
if, and some more.

And here Christopher compared the 4 languages:
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105029949912114&w=2

Hope this helps!

Cheers
Reinhard

> -----Original Message-----
> From: Tony Collen [mailto:tcollen@neuagency.com] 
> Sent: Thursday, April 24, 2003 7:18 PM
> To: cocoon-dev@xml.apache.org
> Subject: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)
> 
> 
> Alright, now that I'm fresh from a night of sleep, and I'm 
> not all dizzy and tired, I'll take another poke at this:
> 
> I'm starting to dig into actually using the Flow, and I'm 
> having a hard time understanding using the JXTemplate(Generator).
> 
> Rather, I'm having a hard time understanding why we need a 
> templating language inside our nice XSLT templating system.
> 
> From a user's perspective, I already invested a lot of time 
> learning XSLT (and I do not even claim to be extremely 
> comfortable with that, too!), so why should I take the time 
> to learn another templating language?  Argh!! This was 
> supposed to be easy, but now it feels like it's getting 
> horribly complex again.
> 
> It's nice the Generator is fast [1], but it still feels like 
> it's doing the work of a Generator and a Transformer, which 
> pokes me in a weird way for some reason.
> 
> Maybe I'm stupid, and just not seeing the advantages.
> 
> Last night, when I dove into all of the Flow stuff, I got to 
> the point to where I had to reference "bizData" in my view 
> pages.  I was following the patterns in Stefano's Linotype 
> code, using <map:generate type="jxpath"/>.  My problem then 
> came around to where I couldn't even get the Continuation ID, 
> due to the difference between Stefano's code and the
> JXTemplate(Generator) in CVS.
> 
> So I go looking for docs, and all I find is the Javadocs for 
> JXTemplate, but the Javadocs weren't built for the things in 
> Scratchpad! Argh!
> 
> I digress.  It's been a long week and finals are about to 
> hit.  I guess I'm just frustrated at not having working 
> samples and not getting the docs for the 
> JXTemplate(Generator).  Which reminds me.  I think the 
> JXTemplate generator in scratchpad should be named 
> JXTemplateGenerator for consistency's sake.
> 
> So here's my plea, can someone who's "in-the-know" about 
> JXTemplate whip up a nice sample that uses the tags (choose, 
> import, etc) in a meaningful and useful way for the annoying 
> n00bs (me)?  Or perhaps another sample in the Flow directory 
> that correctly uses the new Generator?  .. I'll promise to 
> chill out, and get over the bump in complexity and having to learn
> Yet Another Templating Language... hopefully sooner rather 
> than later   :)
> 
> 
> Regards,
> 
> Tony
> 
> [1] 
> http://marc.theaimsgroup.com/?l=xml-> cocoon-dev&m=105029949912114&w=2
> 
> --
> Tony Collen
> ICQ: 12410567
> --
> Cocoon: Internet Glue (A Cocoon Weblog) http://manero.org/weblog/
> --
> 
> 
> 


[Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)

Posted by Tony Collen <tc...@neuagency.com>.
Alright, now that I'm fresh from a night of sleep, and I'm not all dizzy
and tired, I'll take another poke at this:

I'm starting to dig into actually using the Flow, and I'm having a hard
time understanding using the JXTemplate(Generator).

Rather, I'm having a hard time understanding why we need a templating
language inside our nice XSLT templating system.

>From a user's perspective, I already invested a lot of time learning XSLT
(and I do not even claim to be extremely comfortable with that, too!), so
why should I take the time to learn another templating language?  Argh!!
This was supposed to be easy, but now it feels like it's getting horribly
complex again.

It's nice the Generator is fast [1], but it still feels like it's doing
the work of a Generator and a Transformer, which pokes me in a weird way
for some reason.

Maybe I'm stupid, and just not seeing the advantages.

Last night, when I dove into all of the Flow stuff, I got to the point
to where I had to reference "bizData" in my view pages.  I was following
the patterns in Stefano's Linotype code, using <map:generate
type="jxpath"/>.  My problem then came around to where I couldn't even get
the Continuation ID, due to the difference between Stefano's code and the
JXTemplate(Generator) in CVS.

So I go looking for docs, and all I find is the Javadocs for JXTemplate,
but the Javadocs weren't built for the things in Scratchpad! Argh!

I digress.  It's been a long week and finals are about to hit.  I guess
I'm just frustrated at not having working samples and not getting the docs
for the JXTemplate(Generator).  Which reminds me.  I think the JXTemplate
generator in scratchpad should be named JXTemplateGenerator for
consistency's sake.

So here's my plea, can someone who's "in-the-know" about JXTemplate whip
up a nice sample that uses the tags (choose, import, etc) in a meaningful
and useful way for the annoying n00bs (me)?  Or perhaps another sample in
the Flow directory that correctly uses the new Generator?  .. I'll promise
to chill out, and get over the bump in complexity and having to learn
Yet Another Templating Language... hopefully sooner rather than later   :)


Regards,

Tony

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=105029949912114&w=2

--
Tony Collen
ICQ: 12410567
--
Cocoon: Internet Glue (A Cocoon Weblog)
http://manero.org/weblog/
--




Re: [FYI] Stefano's Linotype

Posted by Christopher Oliver <re...@verizon.net>.
Uh, sorry, but I think I broke you. I recently blasted JXPathTransformer 
and JXPathTemplate from the scratchpad. If the below still works for 
you, you  probably still have the old class files in your build 
directory.  There was a lot of code duplication between 
JXPathTransformer, JexlTransformer, JXPathTemplate and JexlTemplate that 
needed to be eliminated. So I created a new generator called JXTemplate 
(which includes JXPath and Jexl) and removed the others. You should use 
this instead. There is no transformer, however. Do you really need one? 
If so, I guess it would be easy enough to create a transformer adapter 
for JXTemplate.

Regards,

Chris

Stefano Mazzocchi wrote:

>Yep, I now have a blog.
>
>Find it on
>
> http://www.betaversion.org/~stefano/linotype/
>
>Besides the shameless plug, I'm writing about it here because I've
>written my own blogging tool using the micro-CMS stuff I used for my
>dad's web site that I previously announced.
>
>The tool is called "Linotype". It features inline XHTML editing using
>Mozilla Midas. fully based on flowscript. no use of databases.
>
>You can find the whole package here:
>
>  http://www.betaversion.org/~stefano/dist/linotype_1.0.tar.gz [52Kb]
>
>just add all the cocoon libraries (including scratchpad!!) from your
>latest CVS HEAD build into /WEB-INF/lib and deploy on your favorite
>servlet container.
>
>Enjoy.
>
>  
>



Re: [FYI] Stefano's Linotype

Posted by Carlos Araya <ca...@cvc.edu>.
It looks very interesting.
--
Carlos E. Araya
WebCT Administrator - Trainer
California Virtual Campus, Region 1
C/O De Anza College
21250 Stevens Creek Blvd.
Cupertino, CA 95014
(p) 408 257 0482 (f) 408 255 4406
<icq> 5140783  <aim>carlosed1974
web (work): http://www.cvc1.org
web (personal): http://silverwolf-net.net/
Sig:
Computers are like airconditioners: They stop working properly if you open
windows.
----- Original Message -----
From: "Stefano Mazzocchi" <st...@apache.org>
To: "Apache Cocoon" <co...@xml.apache.org>
Sent: Wednesday, April 23, 2003 10:43
Subject: [FYI] Stefano's Linotype


> Yep, I now have a blog.
>
> Find it on
>
>  http://www.betaversion.org/~stefano/linotype/
>
> Besides the shameless plug, I'm writing about it here because I've
> written my own blogging tool using the micro-CMS stuff I used for my
> dad's web site that I previously announced.
>
> The tool is called "Linotype". It features inline XHTML editing using
> Mozilla Midas. fully based on flowscript. no use of databases.
>
> You can find the whole package here:
>
>   http://www.betaversion.org/~stefano/dist/linotype_1.0.tar.gz [52Kb]
>
> just add all the cocoon libraries (including scratchpad!!) from your
> latest CVS HEAD build into /WEB-INF/lib and deploy on your favorite
> servlet container.
>
> Enjoy.
>
> --
> Stefano.
>
>
>


Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
> Stefano,
> 
> Your link to midas (on your site) is 404... the URL seems to be
> http://www.mozilla.org/editor/midas-spec.html now.

Uh, thanks for spotting this. I'm fixing right away.

-- 
Stefano.



RE: [FYI] Stefano's Linotype

Posted by Christopher Watson <c....@zen.co.uk>.
Ias, others

I'm fascinated by the linotype stuff, but can't get it to work.

I get exactly the same error as did Ias (see below) . Whether I 

1)	add the latest 2.1-dev built libraries with the expanded
linotype tar.gz, and endorsed stuff, into tomcat/webapps/linotype 

Or 

2)	take the expanded linotype tar.gz and add it on top of
build/webapp and try running 
cocoon servlet
with jetty

[I've also changed my sitemap to reflect the latest names for the
ever-changing ;-) JXPATH stuff]

Can anyone help with this?

If there's a cocoon dev snapshot that works with linotype, I'd be very
grateful for it.

Christopher

> -----Original Message-----
> From: iasandcb@apache-korea.org [mailto:iasandcb@apache-korea.org]
> Sent: 26 April 2003 13:22
> To: cocoon-dev@xml.apache.org
> Subject: RE: [FYI] Stefano's Linotype
> 
> 

<snip>

> 
> "resource://org/apache/cocoon/components/flow/javascript/syste
> m.js", line
> 31: uncaught JavaScript exception:
> org.apache.cocoon.ProcessingException:
> Failed to execute pipeline.: java.lang.RuntimeException: 
> java.lang.NullPointerException
> 
> org.apache.avalon.framework.CascadingRuntimeException:
> "resource://org/apache/cocoon/components/flow/javascript/syste
> m.js", line
> 31: uncaught JavaScript exception:
> org.apache.cocoon.ProcessingException:
> Failed to execute pipeline.: java.lang.RuntimeException: 
> java.lang.NullPointerException
> 
> The stacktrace is
> 
> org.apache.avalon.framework.CascadingRuntimeException:
> "resource://org/apache/cocoon/components/flow/javascript/syste
> m.js", line
> 31: uncaught JavaScript exception:
> org.apache.cocoon.ProcessingException:
> Failed to execute pipeline.: java.lang.RuntimeException: 
> java.lang.NullPointerException
> 


RE: [FYI] Stefano's Linotype

Posted by ia...@apache-korea.org.
> -----Original Message-----
> From: news [mailto:news@main.gmane.org] On Behalf Of Stefano Mazzocchi
> Sent: Friday, April 25, 2003 1:16 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: [FYI] Stefano's Linotype
> 
> 
> on 4/24/03 5:35 PM iasandcb@apache-korea.org wrote:
> 
> > I tried your Linotype and found that it needed cocoon-2.1. (I
> > attempted to use cocoon-2.0 but Linotype said "invalid 
> configuration
> > schema", so I opened cocoon.xconf and read <cocoon
> version="2.1"> :-)
> 
> As I wrote, you need to copy the WEB-INF/lib after you build
> cocoon our of CVS.
> 
> > I deployed linotype application to Tomcat 4.1.24 with JDK 1.4.1_02,
> > and fixed sitemap.xmap to replace two elements with 
> > org.apache.cocoon.generation.JXTemplate to be compliant with the 
> > latest cocoon-2.1 CVS.
> > 
> > I called http://localhost:8080/linotype/ with Mozilla 1.4 and the
> > following response appeared.
> > 
> > Internal Server Error
> > 
> > Message: null
> > 
> > Description: No details available.
> > 
> > Sender: org.apache.cocoon.servlet.CocoonServlet
> > 
> > Source: Cocoon Servlet
> > 
> > Request URI
> > 
> > cause
> > 
> > java.lang.IllegalArgumentException: The output format must have a
> > '{http://xml.apache.org/xslt}content-handler' property!
> > 
> > request-uri
> > 
> > /linotype/
> > 
> > Do I have to do something else more to run linotype? Thanks
> very much
> > in advance.
> 
> no, this is the good old 'endorsed lib' problem.
> 
> Just place the latest xerces and xalan in your endorsed lib.
> 

Thanks to your instruction, I can see the first page of linotype application
on my Mozilla 1.3. In addition, I modified sitemap.xmap like the following:
...
    <map:generator name="jxpath"
       src="org.apache.cocoon.generation.JXTemplate"
       label="content,data" logger="sitemap.generator.jxpath" 
       pool-min="1" pool-grow="1" pool-max="8"  
    />
...
    <map:transformer name="jxpath" 
      src="org.apache.cocoon.transformation.JXTemplateTransformer" 
      logger="jxpath.sitemap.transformer"
      pool-min="2" pool-grow="2" pool-max="8"  
    />
...
  <map:component-configurations>
    <global-variables>
      <home>http://localhost:8080/linotype</home>
    </global-variables>
  </map:component-configurations>
...

I built today the latest HEAD version of cocoon-2.1 and copied
build/webapp/WEB-INF/lib to linotype's WEB-INF. My Tomcat's endorsed XML
libraries are Xerces 2.4.0 and Xalan 2.5.0.

After entering private zone, request for
http://localhost:8080/linotype/private/edit/news/1/ shows this message:

An Error Occurred

"resource://org/apache/cocoon/components/flow/javascript/system.js", line
31: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Failed to execute pipeline.: java.lang.RuntimeException:
java.lang.NullPointerException

org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/components/flow/javascript/system.js", line
31: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Failed to execute pipeline.: java.lang.RuntimeException:
java.lang.NullPointerException

The stacktrace is

org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/components/flow/javascript/system.js", line
31: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Failed to execute pipeline.: java.lang.RuntimeException:
java.lang.NullPointerException

	at
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunct
ion(JavaScriptInterpreter.java:583)

	at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C
allFunctionNode.java:196)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)

	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1103)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)

	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)

	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)

	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)

	at java.lang.Thread.run(Thread.java:536)

Caused by: org.apache.cocoon.ProcessingException: Failed to execute
pipeline.: java.lang.RuntimeException: java.lang.NullPointerException

	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:303)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:682)

	at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.j
ava:414)

	at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.
java:526)

	at
org.apache.cocoon.environment.http.HttpEnvironment.toSAX(HttpEnvironment.jav
a:305)

	at
org.apache.cocoon.environment.AbstractEnvironment.toSAX(AbstractEnvironment.
java:512)

	at
org.apache.cocoon.environment.wrapper.EnvironmentWrapper.toSAX(EnvironmentWr
apper.java:350)

	at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:140)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLP
ipeline(AbstractProcessingPipeline.java:546)

	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:214)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:490)

	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:150)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

	at
org.apache.cocoon.environment.ForwardRedirector.cocoonRedirect(ForwardRedire
ctor.java:207)

	at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.j
ava:114)

	at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInte
rpreter.java:227)

	at
org.apache.cocoon.components.flow.javascript.JSCocoon.jsFunction_forwardTo(J
SCocoon.java:227)

	at inv2.invoke()

	at
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)

	at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)

	at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:1087)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:173)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:121)

	at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete
dFunctionImpl.java:121)

	at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)

	at
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunct
ion(JavaScriptInterpreter.java:577)

	... 41 more

Caused by: java.lang.RuntimeException: java.lang.NullPointerException

	at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)

	at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:427)

	at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)

	at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer
.java:503)

	at
org.apache.cocoon.components.source.impl.EnvironmentChanger.endDocument(Site
mapSource.java:524)

	at
org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:102)

	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStrea
mInterpreter.java:119)

	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByt
eStreamInterpreter.java:109)

	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:251)

	... 74 more

Clicking "Write a news" (request url is
http://localhost:8080/linotype/private/edit/news/template/) results in this
message:

HTTP Status 500 - No Context configured to process this request

type Status report

message No Context configured to process this request

description The server encountered an internal error (No Context configured
to process this request) that prevented it from fulfilling this request.

(This confilct can be resolved by configuring linotype application to root
context ("") in server.xml of Tomcat.)

Clicking "Log out" (http://localhost:8080/linotype/private/logout) fails
with this message:

An Error Occurred

"resource://org/apache/cocoon/components/flow/javascript/system.js", line
43: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Error while redirecting to screen/logout: java.lang.NullPointerException

org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/components/flow/javascript/system.js", line
43: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Error while redirecting to screen/logout: java.lang.NullPointerException

The stacktrace is

org.apache.avalon.framework.CascadingRuntimeException:
"resource://org/apache/cocoon/components/flow/javascript/system.js", line
43: uncaught JavaScript exception: org.apache.cocoon.ProcessingException:
Error while redirecting to screen/logout: java.lang.NullPointerException

	at
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunct
ion(JavaScriptInterpreter.java:583)

	at
org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(C
allFunctionNode.java:196)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

	at org.apache.cocoon.Cocoon.process(Cocoon.java:640)

	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1103)

	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)

	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)

	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:256)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)

	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:171)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)

	at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)

	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)

	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)

	at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)

	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)

	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)

	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)

	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)

	at java.lang.Thread.run(Thread.java:536)

Caused by: org.apache.cocoon.ProcessingException: Error while redirecting to
screen/logout: java.lang.NullPointerException

	at
org.apache.cocoon.environment.ForwardRedirector.cocoonRedirect(ForwardRedire
ctor.java:229)

	at
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.j
ava:114)

	at
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInte
rpreter.java:227)

	at
org.apache.cocoon.components.flow.javascript.JSCocoon.jsFunction_forwardTo(J
SCocoon.java:227)

	at inv2.invoke()

	at
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)

	at
org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)

	at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:1087)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:173)

	at
org.mozilla.javascript.continuations.ContinuationInterpreter.interpret(Conti
nuationInterpreter.java:121)

	at
org.mozilla.javascript.continuations.InterpretedFunctionImpl.call(Interprete
dFunctionImpl.java:121)

	at
org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1244)

	at
org.apache.cocoon.components.flow.javascript.JavaScriptInterpreter.callFunct
ion(JavaScriptInterpreter.java:577)

	... 41 more

Caused by: java.lang.NullPointerException

	at
org.apache.cocoon.generation.JXTemplate.fillContext(JXTemplate.java:1957)

	at
org.apache.cocoon.generation.JXTemplate.setContexts(JXTemplate.java:2009)

	at
org.apache.cocoon.generation.JXTemplate.setup(JXTemplate.java:1946)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setupPipeli
ne(AbstractProcessingPipeline.java:379)

	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.setupPipeline(AbstractCachingProcessingPipeline.java:651)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipe
line(AbstractProcessingPipeline.java:506)

	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:468)

	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:150)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

	at
org.apache.cocoon.environment.ForwardRedirector.cocoonRedirect(ForwardRedire
ctor.java:207)

	... 54 more

Thanks very much in advance for help and guide.

> --
> Stefano.
> 
> 
> 

Ias.


Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/24/03 5:35 PM iasandcb@apache-korea.org wrote:

> I tried your Linotype and found that it needed cocoon-2.1. (I attempted to
> use cocoon-2.0 but Linotype said "invalid configuration schema", so I opened
> cocoon.xconf and read <cocoon version="2.1"> :-)

As I wrote, you need to copy the WEB-INF/lib after you build cocoon our
of CVS.

> I deployed linotype application to Tomcat 4.1.24 with JDK 1.4.1_02, and
> fixed sitemap.xmap to replace two elements with
> org.apache.cocoon.generation.JXTemplate to be compliant with the latest
> cocoon-2.1 CVS. 
> 
> I called http://localhost:8080/linotype/ with Mozilla 1.4 and the following
> response appeared.
> 
> Internal Server Error
> 
> Message: null
> 
> Description: No details available.
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
> Source: Cocoon Servlet
> 
> Request URI
> 
> cause
> 
> java.lang.IllegalArgumentException: The output format must have a
> '{http://xml.apache.org/xslt}content-handler' property!
> 
> request-uri
> 
> /linotype/
> 
> Do I have to do something else more to run linotype? Thanks very much in
> advance.

no, this is the good old 'endorsed lib' problem.

Just place the latest xerces and xalan in your endorsed lib.

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Steven Noels wrote, On 08/05/2003 21.02:
> On 6/05/2003 23:48 Stefano Mazzocchi wrote:
> 
>>> P.S. Can we have a module for Linotype on some CVS repository? It 
>>> could help
>>> Linotype to evolve.
>>
>> I'm all in favor of donating Linotype to the Cocoon PMC for incubation.
>>
>> Comments?

I'd like to see it as part of the Forrest distro too :-)
It would make an excellent addition.

> Linotype might be a very nice sample and, IIUC, wouldn't add that much 
> weight to Cocoon CVS itself. Wouldn't a block in cocoon-2.1 CVS be 
> sufficient?

I would add it too as a block ATM. In the future blocks themselves could 
become subprojects, and Linotype would be probably the first.

But I'm ok with either solution.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: [FYI] Stefano's Linotype

Posted by Sylvain Wallez <sy...@anyware-tech.com>.
Stefano Mazzocchi wrote:

<snip/>

>Oh, even better. that would ease my development of linotype and cocoon by being integrated :-) I don't mind super-bleeding-edge practices.
>
>A block sound cool. I'll upload it very soon if nobody stops me before. :-)
>

Stop you ? And why ? Do it, do it quick ;-)

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 5/8/03 2:02 PM Steven Noels wrote:

> On 6/05/2003 23:48 Stefano Mazzocchi wrote:
> 
> 
>>>P.S. Can we have a module for Linotype on some CVS repository? It could help
>>>Linotype to evolve.
>>
>>
>>I'm all in favor of donating Linotype to the Cocoon PMC for incubation.
>>
>>Comments?
> 
> 
> Linotype might be a very nice sample and, IIUC, wouldn't add that much 
> weight to Cocoon CVS itself. Wouldn't a block in cocoon-2.1 CVS be 
> sufficient?
> 
> I'm all +1 if you really want to move towards incubation (as a Cocoon 
> sub-project?), but Linotype might need some community on beforehand, and 
> having it inside Cocoon CVS might seed that.
> 
> And if it grows too big, we can spin it off properly.
> 
> My IMHO, of course.

Oh, even better. that would ease my development of linotype and cocoon
by being integrated :-) I don't mind super-bleeding-edge practices.

A block sound cool. I'll upload it very soon if nobody stops me before. :-)

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Tony Collen <tc...@neuagency.com>.
On Thu, 8 May 2003, Steven Noels wrote:

> On 6/05/2003 23:48 Stefano Mazzocchi wrote:
>
> >>P.S. Can we have a module for Linotype on some CVS repository? It could help
> >>Linotype to evolve.
> >
> >
> > I'm all in favor of donating Linotype to the Cocoon PMC for incubation.
> >
> > Comments?
>
> Linotype might be a very nice sample and, IIUC, wouldn't add that much
> weight to Cocoon CVS itself. Wouldn't a block in cocoon-2.1 CVS be
> sufficient?
>
> I'm all +1 if you really want to move towards incubation (as a Cocoon
> sub-project?), but Linotype might need some community on beforehand, and
> having it inside Cocoon CVS might seed that.

I'd like to see it in samples, too..

Tony

--
Tony Collen
ICQ: 12410567
--
Cocoon: Internet Glue (A weblog about Apache Cocoon)
http://manero.org/weblog/
--


Re: [FYI] Stefano's Linotype

Posted by Steven Noels <st...@outerthought.org>.
On 6/05/2003 23:48 Stefano Mazzocchi wrote:

>>P.S. Can we have a module for Linotype on some CVS repository? It could help
>>Linotype to evolve.
> 
> 
> I'm all in favor of donating Linotype to the Cocoon PMC for incubation.
> 
> Comments?

Linotype might be a very nice sample and, IIUC, wouldn't add that much 
weight to Cocoon CVS itself. Wouldn't a block in cocoon-2.1 CVS be 
sufficient?

I'm all +1 if you really want to move towards incubation (as a Cocoon 
sub-project?), but Linotype might need some community on beforehand, and 
having it inside Cocoon CVS might seed that.

And if it grows too big, we can spin it off properly.

My IMHO, of course.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


RE: [FYI] Stefano's Linotype

Posted by Ias <ia...@apache-korea.org>.

> -----Original Message-----
> From: news [mailto:news@main.gmane.org] On Behalf Of Stefano Mazzocchi
> Sent: Wednesday, May 07, 2003 6:48 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: [FYI] Stefano's Linotype
> 
> 
> on 5/6/03 3:08 AM Ias wrote:
> 
> > At last, I'm running my Linotype on
> > Cocoon-2.1-M2-dev
> > Tomcat 4.1.24-LE
> > JDK 1.4.1_02
> > Windows XP Pro SP1
> > at
> > http://168.126.185.211/linotype/ .
> 
> well, I'm almost ready to release Linotype 1.1 expect it in a
> few days. Changes include:
> 
>  1) complete semantic wrapping for Midas: you are not allowed
> to modify style, but only markup structure and classes. 
> Things like justify/center/left/right are *WRONG* and should 
> remain so! You should only indicate the "class" of that 
> block, and it's the CSS designer's concern to know if this 
> should be centered, justified and what not.
> 
>  2) in-place image addition, fully integrated with
> multipart/form upload. So you simply include an image from 
> your disk and it automatically uploaded to the server.
> 
> NO MORE COPYING THE IMAGE ON THE SERVER AND CUT/PASTE THE
> URL! THOSE DAYS ARE OVER!
> 
>  3) semantic-aware DOM serializer. This creates a source pane
> which is easier to read and to modify.
> 
> things I'm working on right now:
> 
>  4) versioning: you can resort previous modification of the document.
> 
>  5) client-side image resize: after adding an image, you
> should be able to modify its width/height without having to 
> resize the image with an external image-modification tool.
> 
> > (Sorry not to create patches due to the fact that Linotype is not
> > based on
> > CVS.)
> 
> there is a linotype CVS module on cvs.betaversion.org, but
> it's not available for public access.
> 
> > I hope this wonderful application would be developed and discussed
> > more broadly. Thank Stefano again.
> 
> You are welcome, but I would kindly suggest you to drop
> redistributing it with the same name. I'm more than welcome 
> to incorporate your patches  into the original distribution, 
> but if everybody starts distributing his/her own version of 
> linotype, we never converge.
> 
I fully agree with you on the idea of "convergence". The reason why I
redistributed was to help those who have little patience waiting for the
next version of Linotype and feel like using Linotype. Do you want me to
stop it right now? If not, I'd prefer to continue it before Linotype 1.1 is
released. After that, I hope to have a chance to contribute to Linotype.
> > P.S. Can we have a module for Linotype on some CVS repository? It
> > could help Linotype to evolve.
> 
> I'm all in favor of donating Linotype to the Cocoon PMC for
> incubation.
> 
I'm very glad to hear that. I'm all supporting your great effort.
> Comments?
> 
> --
> Stefano.
> 
> 
> 

Best Wishes,

Ias.

===========================================================
Lee, Changshin (Korean name)
Ias (International name)
               Company Web Site: http://www.tmax.co.kr
               Personal Web Site: http://www.iasandcb.pe.kr
----------------------------------------------------------------------------
------------------------------------------
Senior Researcher, Emerging Technology Evangelist & JCP Activities
Coordinator
JCP member - http://jcp.org/en/participation/members/L
R&D Institute
Tmax Soft, Inc. 
JCP member - http://jcp.org/en/participation/members/T
===========================================================


Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 5/6/03 3:08 AM Ias wrote:

> At last, I'm running my Linotype on
> Cocoon-2.1-M2-dev
> Tomcat 4.1.24-LE
> JDK 1.4.1_02
> Windows XP Pro SP1
> at
> http://168.126.185.211/linotype/ .

well, I'm almost ready to release Linotype 1.1 expect it in a few days.
Changes include:

 1) complete semantic wrapping for Midas: you are not allowed to modify
style, but only markup structure and classes. Things like
justify/center/left/right are *WRONG* and should remain so! You should
only indicate the "class" of that block, and it's the CSS designer's
concern to know if this should be centered, justified and what not.

 2) in-place image addition, fully integrated with multipart/form
upload. So you simply include an image from your disk and it
automatically uploaded to the server.

NO MORE COPYING THE IMAGE ON THE SERVER AND CUT/PASTE THE URL! THOSE
DAYS ARE OVER!

 3) semantic-aware DOM serializer. This creates a source pane which is
easier to read and to modify.

things I'm working on right now:

 4) versioning: you can resort previous modification of the document.

 5) client-side image resize: after adding an image, you should be able
to modify its width/height without having to resize the image with an
external image-modification tool.

> (Sorry not to create patches due to the fact that Linotype is not based on
> CVS.)

there is a linotype CVS module on cvs.betaversion.org, but it's not
available for public access.

> I hope this wonderful application would be developed and discussed more
> broadly. Thank Stefano again.

You are welcome, but I would kindly suggest you to drop redistributing
it with the same name. I'm more than welcome to incorporate your patches
 into the original distribution, but if everybody starts distributing
his/her own version of linotype, we never converge.

> P.S. Can we have a module for Linotype on some CVS repository? It could help
> Linotype to evolve.

I'm all in favor of donating Linotype to the Cocoon PMC for incubation.

Comments?

-- 
Stefano.



RE: [FYI] Stefano's Linotype

Posted by Ias <ia...@apache-korea.org>.
At last, I'm running my Linotype on
Cocoon-2.1-M2-dev
Tomcat 4.1.24-LE
JDK 1.4.1_02
Windows XP Pro SP1
at
http://168.126.185.211/linotype/ .

You can download this very running version from

Full version (i.e. including lib)
http://www.iasandcb.pe.kr/resources/ias-linotype-1.0-full.zip

Compact version (i.e. excluding lib)
http://www.iasandcb.pe.kr/resources/ias-linotype-1.0-compact.zip

Besides the previous modification on flow.js and news2edit.xslt, I made some
changes:

In org.betaversion.linotype.generation.RequestGenerator

    private void parse(String data)
    throws Exception {
        SAXParser parser = null;

data = data.replaceAll("&", "&amp;"); // added for accepting "&" character
at link input.

        try {
            parser = (SAXParser) manager.lookup(SAXParser.ROLE);
            StringReader inputStream = new StringReader(data);
            InputSource is = new InputSource(inputStream);
            parser.parse(is, new FilteringXMLConsumer(super.xmlConsumer));
        } catch (Exception e) {
            throw e;
        } finally {
            if (parser != null) manager.release((Component) parser);
        }
    }

In news2edit.xslt, added several actions for more convenience of editing,

    <div id="toolbar">
	 <span class="imagebutton" id="bold"><img
src="{$home}/images/icons/bold.gif" alt="Bold" title="Bold"/></span>
  	 <span class="imagebutton" id="italic"><img
src="{$home}/images/icons/italic.gif" alt="Italic" title="Italic"/></span>
	 <span class="imagebutton" style="margin-left: 10px"
id="underline"><img src="{$home}/images/icons/underline.gif" alt="Underline"
title="Underline"/></span>
	 <span class="imagebutton" id="insertorderedlist"><img
src="{$home}/images/icons/orderedlist.gif" alt="Ordered List" title="Ordered
List"/></span>
	 <span class="imagebutton" id="insertunorderedlist"><img
src="{$home}/images/icons/unorderedlist.gif" alt="Unordered List"
title="Unordered List"/></span>
	 <span class="imagebutton" style="margin-left: 10px"
id="outdent"><img src="{$home}/images/icons/outdent.gif" alt="Outdent"
title="Outdent"/></span>
	 <span class="imagebutton" id="indent"><img
src="{$home}/images/icons/indent.gif" alt="Indent" title="Indent"/></span>
	 <span class="imagebutton" id="justifyleft"><img
src="{$home}/images/icons/justifyleft.gif" alt="justifyleft"
title="justifyleft"/></span>
	 <span class="imagebutton" id="justifycenter"><img
src="{$home}/images/icons/justifycenter.gif" alt="justifycenter"
title="justifycenter"/></span>
	 <span class="imagebutton" id="justifyright"><img
src="{$home}/images/icons/justifyright.gif" alt="justifyright"
title="justifyright"/></span>
	 <span class="imagebutton" id="undo"><img
src="{$home}/images/icons/undo.gif" alt="undo" title="undo"/></span>
	 <span class="imagebutton" id="redo"><img
src="{$home}/images/icons/redo.gif" alt="redo" title="redo"/></span>
	 <span class="imagebutton" style="margin-left: 10px"
id="createlink"><img src="{$home}/images/icons/link.gif" alt="Insert Link"
title="Insert Link"/></span>
	 <input type="checkbox" name="online">
	  <xsl:if test="@online='on'"><xsl:attribute
name="checked">true</xsl:attribute></xsl:if>
	 </input>
	 <label for="online">published</label>
	</div>

(Sorry not to create patches due to the fact that Linotype is not based on
CVS.)

I hope this wonderful application would be developed and discussed more
broadly. Thank Stefano again.

P.S. Can we have a module for Linotype on some CVS repository? It could help
Linotype to evolve.

> -----Original Message-----
> From: news [mailto:news@main.gmane.org] On Behalf Of Stefano Mazzocchi
> Sent: Tuesday, April 29, 2003 12:15 PM
> To: cocoon-dev@xml.apache.org
> Subject: Re: [FYI] Stefano's Linotype
> 
> 
> on 4/28/03 6:03 PM Bernhard Huber wrote:
> 
> > hi,
> > as i'm using w2k it complains about sharing violation of
> document.xml
> > after editing it.
> > found in flow.js:
> > ....
> >                                 var output = new 
> > java.io.FileOutputStream(document + "/document.xml");
> >                                 process( "linotype/"
> +"action/save-" +
> > type,{},output);
> > ....
> > and i was missing some output.close(); statement, and changed it to:
> >                                 var output = new 
> > java.io.FileOutputStream(document + "/document.xml");
> >                                 process( "linotype/"
> +"action/save-" +
> > type,{},output);
> >                                 output.close();
> 
> uh, that's right. fixed.
> 
> > Moreover in Repository.java the method save(Part part, File
> file) does
> > not close its stream, too; but asfasik
> > it is never used, thus the missing close() is not
> harmfule,yet anyway
> > the correct method:
> >     public static void save(Part part, File file) throws Exception {
> >         log("[save] " + part.getFileName() + " -> " + file);
> >         InputStream in = null;
> >         FileOutputStream out = null;
> >         try {
> >             in = part.getInputStream();
> >             out = new FileOutputStream(file);
> > 
> >             copy(in, out);
> >         } finally {
> >             if (out != null) {
> >                 out.close();
> >             }
> >             if (in != null) {
> >                 in.close();
> >             }
> >         }
> >     }
> 
> This is used in the image upload code that is not yet ported to 
> linotype. I'm working on it.
> 
> --
> Stefano.
> 
> 
> 


Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/28/03 6:03 PM Bernhard Huber wrote:

> hi,
> as i'm using w2k it complains about sharing violation of document.xml 
> after editing it.
> found in flow.js:
> ....
>                                 var output = new 
> java.io.FileOutputStream(document + "/document.xml");
>                                 process( "linotype/" +"action/save-" + 
> type,{},output);
> ....
> and i was missing some output.close(); statement, and changed it to:
>                                 var output = new 
> java.io.FileOutputStream(document + "/document.xml");
>                                 process( "linotype/" +"action/save-" + 
> type,{},output);
>                                 output.close();

uh, that's right. fixed.

> Moreover in Repository.java the method save(Part part, File file) does 
> not close its stream, too; but asfasik
> it is never used, thus the missing close() is not harmfule,yet anyway 
> the correct method:
>     public static void save(Part part, File file) throws Exception {
>         log("[save] " + part.getFileName() + " -> " + file);
>         InputStream in = null;
>         FileOutputStream out = null;
>         try {
>             in = part.getInputStream();
>             out = new FileOutputStream(file);
> 
>             copy(in, out);
>         } finally {
>             if (out != null) {
>                 out.close();
>             }
>             if (in != null) {
>                 in.close();
>             }
>         }
>     }

This is used in the image upload code that is not yet ported to
linotype. I'm working on it.

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Bernhard Huber <be...@a1.net>.
hi,
as i'm using w2k it complains about sharing violation of document.xml 
after editing it.
found in flow.js:
...
                                var output = new 
java.io.FileOutputStream(document + "/document.xml");
                                process( "linotype/" +"action/save-" + 
type,{},output);
...
and i was missing some output.close(); statement, and changed it to:
                                var output = new 
java.io.FileOutputStream(document + "/document.xml");
                                process( "linotype/" +"action/save-" + 
type,{},output);
                                output.close();

Moreover in Repository.java the method save(Part part, File file) does 
not close its stream, too; but asfasik
it is never used, thus the missing close() is not harmfule,yet anyway 
the correct method:
    public static void save(Part part, File file) throws Exception {
        log("[save] " + part.getFileName() + " -> " + file);
        InputStream in = null;
        FileOutputStream out = null;
        try {
            in = part.getInputStream();
            out = new FileOutputStream(file);

            copy(in, out);
        } finally {
            if (out != null) {
                out.close();
            }
            if (in != null) {
                in.close();
            }
        }
    }

bye bernhard



Re: [FYI] Stefano's Linotype

Posted by Stefano Mazzocchi <st...@apache.org>.
on 4/23/03 8:10 PM Pier Fumagalli wrote:

> "Stefano Mazzocchi" <st...@apache.org> wrote:
> 
> 
>>Yep, I now have a blog.
>>
>>Find it on
>>
>>http://www.betaversion.org/~stefano/linotype/
> 
> 
> Ouch... More bandwidth wasted on my poor old DSL line @ home...

wait: the whole thing is about 54Kb. It was 8mb when I started but I
thought about your face and pruned the tar.gz a little ;-)

Amazing what you can do with 50kb of glue code nowadays :-) (leverating
a milion lines of code on the client and another half a million on the
server)

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Tony Collen <tc...@neuagency.com>.
On Wed, 23 Apr 2003, Stefano Mazzocchi wrote:

> Yep, I now have a blog.
>
> Find it on
>
>  http://www.betaversion.org/~stefano/linotype/
>
> Besides the shameless plug, I'm writing about it here because I've
> written my own blogging tool using the micro-CMS stuff I used for my
> dad's web site that I previously announced.
>
> The tool is called "Linotype". It features inline XHTML editing using
> Mozilla Midas. fully based on flowscript. no use of databases.


Stefano,

Your link to midas (on your site) is 404... the URL seems to be
http://www.mozilla.org/editor/midas-spec.html now.

> You can find the whole package here:
>
>   http://www.betaversion.org/~stefano/dist/linotype_1.0.tar.gz [52Kb]
>
> just add all the cocoon libraries (including scratchpad!!) from your
> latest CVS HEAD build into /WEB-INF/lib and deploy on your favorite
> servlet container.


Fun fun fun... I wish it wasn't this close to finals, or I'd have sooo
much fun stuff to play with... *sigh*.. it will all be over soon.


Tony


--
Tony Collen
ICQ: 12410567
--
Cocoon: Internet Glue (A Cocoon Weblog)
http://manero.org/weblog/
--


RE: [FYI] Stefano's Linotype

Posted by ia...@apache-korea.org.
I tried your Linotype and found that it needed cocoon-2.1. (I attempted to
use cocoon-2.0 but Linotype said "invalid configuration schema", so I opened
cocoon.xconf and read <cocoon version="2.1"> :-)

I deployed linotype application to Tomcat 4.1.24 with JDK 1.4.1_02, and
fixed sitemap.xmap to replace two elements with
org.apache.cocoon.generation.JXTemplate to be compliant with the latest
cocoon-2.1 CVS. 

I called http://localhost:8080/linotype/ with Mozilla 1.4 and the following
response appeared.

Internal Server Error

Message: null

Description: No details available.

Sender: org.apache.cocoon.servlet.CocoonServlet

Source: Cocoon Servlet

Request URI

cause

java.lang.IllegalArgumentException: The output format must have a
'{http://xml.apache.org/xslt}content-handler' property!

request-uri

/linotype/

Do I have to do something else more to run linotype? Thanks very much in
advance.

P.S. The attached file is sitemap.log from the request.

> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: Thursday, April 24, 2003 2:44 AM
> To: Apache Cocoon
> Subject: [FYI] Stefano's Linotype
> 
> 
> Yep, I now have a blog.
> 
> Find it on
> 
>  http://www.betaversion.org/~stefano/linotype/
> 
> Besides the shameless plug, I'm writing about it here because I've 
> written my own blogging tool using the micro-CMS stuff I used for my 
> dad's web site that I previously announced.
> 
> The tool is called "Linotype". It features inline XHTML editing using 
> Mozilla Midas. fully based on flowscript. no use of databases.
> 
> You can find the whole package here:
> 
  http://www.betaversion.org/~stefano/dist/linotype_1.0.tar.gz [52Kb]

just add all the cocoon libraries (including scratchpad!!) from your latest
CVS HEAD build into /WEB-INF/lib and deploy on your favorite servlet
container.

Enjoy.

-- 
Stefano.



Re: [FYI] Stefano's Linotype

Posted by Pier Fumagalli <pi...@betaversion.org>.
"Stefano Mazzocchi" <st...@apache.org> wrote:

> Yep, I now have a blog.
> 
> Find it on
> 
> http://www.betaversion.org/~stefano/linotype/

Ouch... More bandwidth wasted on my poor old DSL line @ home...

Jokes apart, it's brillant! (but you already knew that) :-)

    Pier