Re: CLI in 2.1.9: Cannot find ServletContext object

2006-12-19 Thread Simon Mieth
On Tue, 19 Dec 2006 11:14:26 -0600
J.D. Williams [EMAIL PROTECTED] wrote:

 I have Googled for this exception, read the docs for 2.1, and cannot
 figure this out.
 
 I did a ./build.sh clean, then built a minimal webapp and verified
 that it worked. No blocks, no samples, bare minimum.
 
 Then, I copied servlet-2.3.jar from
 $COCOON_INSTALL_DIRECTORY/tools/jetty/lib to
 $COCOON_INSTALL_DIRECTORY/build/webapp/WEB-INF/lib
 
 I even added $COCOON_INSTALL_DIRECTORY/build/webapp/WEB-INF/lib to my
 classpath.
 
 The cli.xconf contains the following:
 
context-dirbuild/webapp/context-dir
config-fileWEB-INF/cocoon.xconf/config-file
work-dirbuild/work/work-dir
dest-dirbuild/dest/dest-dir
 
 I ran the CLI using the demo cli.xconf and got the following fatal
 error.
 
 [EMAIL PROTECTED]:~/cocoon-2.1.9$ ./cocoon.sh cli -x cli.xconf
 ./cocoon.sh: using ./build/webapp as the webapp directory
 
 cocoon 2.1.9
 Copyright (c) 1999-2006 Apache Software Foundation. All rights
 reserved.
 

Hi,

you can comment out  the logging inside the cli.xconf or use an own
logkit.xconf  (WEB-INF/logkit.xconf) where you comment out all servlet
related stuff (ServletTargetFactory and servlet format description).

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: links in svg

2005-07-20 Thread Simon Mieth
On Tue, 19 Jul 2005 13:01:04 -0500 (CDT)
Andres Taborda [EMAIL PROTECTED] wrote:

 hello list
 some user can help me 
 I have an code of svg and applied an transformation
 to png. my code svg have various LINK by example in 
 
 g id=background
 rect x=0 y=0 height=195 width=370  
 style=fill:red/
 /g
 
 and addition:
 use xlink:href=#background x=0 y=15/
 
 after display in the browser not have the reference
 (href).
 
 some can say how make it.
  

Hi Andres,

make sure you have the g element inside the defs element and the
xmlns setup for xlink. Normally you can test your svg's with the
squiggle (svgviewer)  from batik. If Squiggle shows the correct the
svg, the svg should be rendered correct by the svg serializers.  

example:

svg width=380 height=220
 defs
  !-- referenced elements should be placed inside 
 the defs-container element  (container for referenced
 elements) --
   g id=background
   rect x=0 y=0 height=195 width=370  
  style=fill:red/
   /g
 /defs
 use xmlns:xlink=http://www.w3.org/1999/xlink;
 xlink:href=#background x=0 y=15/
/svg


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Cocoon as a command line tool

2005-05-13 Thread Simon Mieth
On Fri, 13 May 2005 19:03:02 +0200
Jean-Claude Moissinac [EMAIL PROTECTED] wrote:

 If I add 
  servlet_2_2.jar
 and
 openjms-0.7.6.1.jar
 to my config in WEB-INF/lib
 
 not only my CLI attempt fails, but also my standard use of Cocoon as a
 server doesn't start
 With just the openjms-0.7.6.1.jar, the start process stop on
 - Scheduler Cocoon_$_Fri_May_13_19:00:09_CEST_2005 started.

Hi Jean-Claude,

I thought the CLI of 2.1.7 run out-of-box, but I get the same problem. 
The problem is the Loader class of the CLI environment, which only
point to the WEB-INF/lib directory. 
There is a patch in bugzilla (not in the svn), which fixes this. But
you can use a work-around:

* got to the WEB-INF/classes directory and create a jar-archiv with 
   all entries like:
 jar -cf ..\lib\cli-fix.jar *

that should fix your problem. You can enable all blocks in your build
(the default), maybe you make a clean build (remove the
local.build.properties and call build.bat clean webapp) and the copy
the servlet.jar again and the work-around (see above).

Best Regards,

Simon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI Recursion Again

2005-01-14 Thread Simon Mieth
On Fri, 14 Jan 2005 00:15:14 +0100
Alexander Schatten [EMAIL PROTECTED] wrote:


 
 http://localhost:/my/site/index.html?cocoon-view=links
 
 This should give a list off all links in the page.
 
 
   
 
 no, it does not: the page is rendered as usual, no difference; but the

 page is rather simple; just a series of html links... so it should
find 
 a lot of sub-pages...
 
 
 really, have no further idea...?
 
 
 
 Alex
 

Hi,

have you inside your sitemap.xmap the following view:

map:sitemap

map:components/

!-- add this in all subsitemaps too --

map:views
 map:view from-position=last name=links
 map:serialize type=links/
 /map:view
/map:views

map:pipelines/

/map:sitemap

This is needed in a subsitemap.xmap too.

This view gives back a list of all links (plain-text).

You can try this with

http://localhost:/docs/index.html?cocoon-view=links

gives a list of all links of the cocoon-docmentation.


The serializer normally find all html-links and image-src.

Maybe you can test your pipeline with map:serialize type=links/
instead of map:serialize type=html/ to test if the serializer works.


Are there  errors or exceptions inside the logs?

Best Regards,

Simon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI Recursion Again

2005-01-13 Thread Simon Mieth
On Thu, 13 Jan 2005 15:10:59 +0100
Alexander Schatten [EMAIL PROTECTED] wrote:

 Dear other CLI users
 
 
 maybe someone can give me a hint: after some configuration effort 
 (blocks) the CLI with cli.xconf is *basically* working, but I am not 
 able to solve one problem, which should be simple, I assume:
 
 I want to create an off line site *recursively*, meaning, that the
links 
 should be followed; I try to do this with the following entry in the 
 cli.xconf:
 
 
 uri
 type=append
 follow-links=true
 src=buch/index.html
 dest=build/dest/
 /
 
 
 but the problem is: *only* the index.html document is created and no

 sub documents...?
 
 any ideas or suggestions?
 
 
 thanks a lot!
 
 
 
 Alex

Hi,

the uri-element itself does not suüüpport follow-links only the
uris-element. Simple enclose the uri with:

uris follow-links=§true
 uri
 type=append
 src=buch/index.html
 dest=build/dest/
 /

/uris.

In the servlet mode you can view all links by append the
cocoon-view=links like:

http://localhost:/my/site/index.html?cocoon-view=links

This should give a list off all links in the page.


If there are no links in the list, the CocoonBean has nothing to follow.


Best Regards,

Simon






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI at Cocoon 2.1.6 working somewhere?

2005-01-04 Thread Simon Mieth
On Tue, 04 Jan 2005 14:28:16 +0100
Alexander Schatten [EMAIL PROTECTED] wrote:

 I try (again) to get Cocoon CLI under Control. But it seems, that
there
 are severe problems in version 2.1.6; actually not even the default
 cli.xconf example is working.
 
 I receive a multitude of  Erorrs/Exceptions (unknown resource,
 InvocationTargetException...) all details can be found at:
 
 http://schatten.info/info/misc/cli-out.txt
 
 
 moreover, hsqldb is started and not ended; so one has to terminate the
 job...
 
 
 ideas anyone?
 
 
 
 thanks in advance!
 
 
 
 Alex

Hi,

this problem can simple be solved by copy lib/optional/servlet.jar 
to build/webapp/WEB-INF/ölib.

My local 2.1.6 works only without the taglib-block in the
CLI-environment. 
So if you are running in exception after copying 'servlet.jar' try to
build cocoon without the taglib-block.


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI

2004-12-07 Thread Simon Mieth
On Tue, 07 Dec 2004 16:10:24 +
Upayavira [EMAIL PROTECTED] wrote:

 Nandakumar Mounasamy wrote:
 
 Has anyone got the CLI working for compiling xsp pages offline? I
 recall it had an issue in version 2.1.5. 
   
 
 I can't remember what version it was that had the problem, but it is
 not yet fixed. Feel free to have a play at fixing it - it isn't very
 deep into the code that the problem occurs.
 
 Regards, Upayavira
 
Hi,

I thought some month ago about a patch. Maybe I get it wrong, but the
XSP-precompiling was deep integrated and all was removed, since XSP
was moved to a block. 

The precompiling was former delegated to CocoonWrapper and 
org.apache.cocoon.Cocoon.  As I understand it the core-Cocoon should not
depends on blocks, so I played around with something like a XSPBean
inside the XSP-Block without success :-( 

So I'm not sure, but it looks like a solution could be harder.

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI

2004-12-07 Thread Simon Mieth
On Tue, 07 Dec 2004 20:44:01 +
Upayavira [EMAIL PROTECTED] wrote:

 My understanding of this bug is that it is simply a matter of how it 
 handles its configuration - i.e. it won't let you run it without any 
 targets configured, but you don't want to configure targets when 
 precompiling XSPs.
 
 I did make one stab at fixing it, but failed. In some months I'll get 
 another chance, but can't look at it immediately.
 
 Regards, Upayavira
 

Hi Upayavira,

the old precompiling uses the XSP - ProgramGenerator and all needed
stuff from XSP and the old Cocoon-class  used this components in order
to compile the xsp, but this is moved.

Here are the diffs:

Cocoon:
http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/java/org/apache/cocoon/Cocoon.java?rev=27653r1=27559r2=27653diff_format=h
CocoonWrapper:
http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonWrapper.java?rev=27653r1=27559r2=27653diff_format=h
CocoonBean:
http://svn.apache.org/viewcvs.cgi/cocoon/trunk/src/java/org/apache/cocoon/bean/CocoonBean.java?rev=27653r1=27559r2=27653diff_format=h

It looks for me that the XSP-prcompiling was done in the Cocoon-class
with the XSP-components.

A new implementation needs the XSP-components and should be inside the
XSP-block?

My problem was to extend the CocoonWrapper, where I have no access to
the private Cocoon, which is needed. 
So if I change the private to protected it could work or copy and paste
all together to new XSPWrapper (this will not touch the CocoonWrapper).

But anyway it looks like the precompiling can only be done with a new
CLIWrapper inside the XSP-block.


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: svg2png question

2004-11-01 Thread Simon Mieth
On Fri, 29 Oct 2004 09:30:59 -0600
Craig Christophersen [EMAIL PROTECTED] wrote:

 Derek;
 Thanks again for your reply.
 In my tomcat(version5) webapps folder my cocoon application is navCoc.
 SVG is a subfolder of that (as is
 WEB-INF,.metadata,.settings,style(xsl),Graphics, Menus, and more).
 All the cocoon jars are in WEB-INF/lib. Classes(generators, actions,
 etc.)in WEB-INF/classes.
 I have several actions, generators that work fine(many of which are
 aggregated in the sitemap).
 ( this is a fairly large J2EE application).
 Sitemap, static html files in the same level(directly under navCoc).
 I did as you suggested, put in that sitemap entry, called the xml
 serializer directly (http://localhost:9080/navCoc/SVG/wire.xml), I got
 the svg data as xml in IE.
 
 This works fine in my xsl to call the applet
 xsl:attribute
 name=urlhttp://localhost:9080/navCoc/SVG/xsl:value-of
 select=$appletImage/.svg/xsl:attribute
 
 This does not work for calling the serializer from my xsl
 img src=SVG/wire.png/
 
 
 
 map:match pattern=SVG/*.svg  !-- used for calling applet  --
 
map:read src=SVG/{1}.svg mime-type=image/svg+xml/
 
 /map:match
 
 
 map:match pattern=SVG/*.png
 
map:generate src=SVG/{1}.svg/
 
 map:serialize type=svg2png/
 
 /map:match
 
 map:match pattern=SVG/*.gif !-- can get static files from the
 folder with this --
 
 map:read src=SVG/{1}.gif mime-type=image/gif/
 
 /map:match
 
 I really appreciate your help on this, thank you.  Craig

Hi,

maybe you have run your tomcat in a headless environment (server
without X), than this can help you. 

http://cocoon.apache.org/2.1/installing/index.html#Headless+UNIX+and+PJA

Often there are some usefull infos in the tomcat-logs too.

Best Regards,

Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Out of Memory error base64 encoded to SVG to JPG

2004-09-14 Thread Simon Mieth
On Mon, 13 Sep 2004 23:27:34 +0200
Joerg Heinicke [EMAIL PROTECTED] wrote:


 It seems to be heavy to do this transformation multiple times though
 you need to do it only once using the FragmentExtractorTransformer.
 Could help to reduce the memory needs.

Well, after looking for some docs, it's of course  the most elegant
method, but less documented for this beautiful solution. 




From reading the source here a example for Lincoln:
In the sitemap or subsitemap:
inside the map:component-section/map:transformars
map:transformer name=wordimgextractor
   src=org.apache.cocoon.transformation.FragmentExtractorTransformer
   logger=sitemap.transformer.extractor  
 extract-urihttp://schemas.microsoft.com/office/word/2003/wordml/extr
act-uri  
 extract-elementpict/extract-element  
/map:transformer


the wordml2html-pipeline
   map:match pattern=.
 map:generate src=.../
 map:transform type=wordimgextractor/
 map:transform src=wordml2html/
 map:serialize type=html/
   /map:match

This will remove all w:pict-elements from the wordml-document and store
it inside the cocoon-cache  and instead of the pict-elements you will
get something like:
fe:fragment xmlns:fe=http://apache.org/cocoon/fragmentextractor/2.0;
fragment-id=8b5dcbaa795d39f5/
with this fragment-id you can query (as ImageID for the next pipeline)
the stored image-data like

map:match pattern=*.jpg
map:generate type=extractor src={1}/
map:transform src=stylesheets/wordml2svg.xsl
map:parameter name=image value={1}/
/map:transform
map:serialize type=svg2jpeg/
/map:match

where you get the w:pict-element back from the cocoon-cache and only
this, so there is no more the whole wordml-document as DOM in the
memory (with all the other images) like Joerg pointed out.


In any cases (448MB or 2GB)  this will spare your(Lincoln's) memory.


Best Regards,

Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Out of Memory error base64 encoded to SVG to JPG

2004-09-11 Thread Simon Mieth
On Sat, 11 Sep 2004 10:15:08 +0800
Lincoln Mitchell [EMAIL PROTECTED] wrote:

 I need to convert multiple wordml images (base64 encoded) to JPG.
 I am currently using the following code but get an Out of Memory error. If
 I am lucky I get 2 images appear on screen.
 I will try importing low quality JPEG into word to see if that helps and
 also thinking of upgrading RAM or PC current spec is Celeron 2.4GHz, 448MB
 RAM, Running Windows XP (home edition).
 
 
 Any clues/recommendations?

Hi Lincoln,

It looks like the cocoon.bat set no parameter for the memory usage, if so the VM only 
use 64M.
 
maybe this can help

set JAVA_OPTIONS='-Xms32M -Xmx350M'

add this to your cocoon.bat on top? (I dont know  much about BATCH-scripts)


Or:


You can try to use the stx-transformer instead of the xslt-transformer.
The xslt-transformation build a DOM-Document,which consume many memory and you only 
need to extract a fragment of this document. 
The stx-transformation is SAX-based and can extract the fragment too without building 
a DOM-Document. 
Based on your document-structure of wordml, the w:binData-element has the attribute 
w:name which looks like it is a unique  id. If so you could try to work with this id 
to extract the binData. This could be done with the following stx-stylesheet.

?xml version=1.0?
stx:transform xmlns:stx=http://stx.sourceforge.net/2002/ns; 
xmlns=http://www.w3.org/1999/xhtml; 
xmlns:w=http://schemas.microsoft.com/office/word/2003/wordml; version=1.0

  stx:param name=image select=''/

  stx:template match=w:[EMAIL PROTECTED]:name = $image]
svg:svg xmlns:svg=http://www.w3.org/SVG; width=40 height=30
  svg:g
svg:image xmlns:xlink=http://www.w3.org/1999/xlink; width=40 height=30
  stx:attribute name=xlink:href
stx:textdata:image/png;base64,/stx:text
stx:value-of select=./
  /stx:attribute
/svg:image
  /svg:g
/svg:svg
  /stx:template
/stx:transform


and a pipeline like this
map:match pattern=*.jpg
map:generate src=content/content.xml/
map:transform src=stylesheets/wordml2svg.stx type=stx
map:parameter name=image value=wordml://{1}.jpg/
/map:transform
map:serialize type=svg2jpeg/
/map:match

inside your html-xsl you have to extract the w:binData/@w:name
and with the string-functions of xsl you can get substring (remove the 'wordml://' and 
'.jpg') for your imageid.


The different of stx and xsl is in this case small, but stx is limited
look at http://stx.sourceforge.net 

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WordML image to jpeg/gif via cocoon?

2004-09-05 Thread Simon Mieth
Hi Licoln,

 
 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:w=http://schemas.microsoft.com/office/word/2003/wo
 rdml
 xmlns:wx=http://schemas.microsoft.com/office/word/2003/a
 uxHint xmlns:v=urn:schemas-microsoft-com:vml
 xmlns:o=urn:schemas-microsoft-com:office:office
   xsl:param name=image/




 /xsl:stylesheet
 
 
 
 XML (snipped)
 
 ?xml version=1.0 encoding=UTF-8 standalone=yes?
 ?mso-application progid=Word.Document?
 w:wordDocument
 xmlns:w=http://schemas.microsoft.com/office/word/2003/wo
 rdml xmlns:v=urn:schemas-microsoft-com:vml
 xmlns:w10=urn:schemas-microsoft-com:office:word
 xmlns:sl=http://schemas.microsoft.com/schemaLibrary/2003
 /core
 xmlns:aml=http://schemas.microsoft.com/aml/2001/core;
 xmlns:wx=http://schemas.microsoft.com/office/word/2003/a
 uxHint xmlns:o=urn:schemas-microsoft-com:office:office
 xmlns:dt=uuid:C2F41010-65B3-11d1-A29F-00AA00C14882
 w:macrosPresent=no w:embeddedObjPresent=no
 w:ocxPresent=no xml:space=preserve
   ...
   w:body
   wx:sect
   w:p
   w:r
   w:pict
   ...
   w:binData
 w:name=wordml://0201.jpg
   !--base64 data --
   /w:binData
   v:shape id=_x_i1025
 type=#_x_t75 style=width:415.5pt;height:311.25pt
   v:imagedata
 src=wordml://0201.jpg o:title=Tulips/
   /v:shape
   /w:pict
   /w:r
   /w:p
   ...
   /wx:sect
   /w:body
 /w:wordDocument
 ---
 
 Also, I have never used xsl:match before only
 xsl:template match and can't find it in any xslt books.
 Is this an extension function in cocoon?
 
 
 Regards,
 
 Linc

Yes, thats correct this was a stupid typo by me:
Use the right:
 xsl:template
match=/w:wordDocument/w:body/wx:sect/w:p/w:r/w:pict/v:
 shape/v:imagedata[@ o:title=$image]
   xsl:variable name=height select=100/
   xsl:variable name=width select=100/
   svg:svg xmlns:svg=http://www.w3.org/SVG;
   svg:g
   svg:image
 xmlns:xlink=http://www.w3.org/1999/xlink;
 height={$height}px width={$width}px
   xsl:attribute
 name=xlink:hrefxsl:textdata:image/png;base64,/xsl:t
 extxsl:value-of
 select=../../w:binData//xsl:attribute
   /svg:image
   /svg:g
   /svg:svg
/xsl:template

The xsl:pattern match is tosh ;-) and you will only get
a error-message from any xslt-processor, sorry.
 


If all work you can try to use  the stx-block, this should
make the transformation for the image much faster. 

Best Regards,
Simon












-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: WordML image to jpeg/gif via cocoon?

2004-09-02 Thread Simon Mieth
On Thu, 02 Sep 2004 15:41:05 +0200
Gerald Aichholzer [EMAIL PROTECTED] wrote:

 On Thu, 2 Sep 2004 20:59:51 +0800, Lincoln Mitchell
 [EMAIL PROTECTED]  wrote:
 
  How would I convert an image in wordML to a jpeg or gif
  via Cocoon?
 
  So far I have only found this .net solution by Oleg
  Tkachenko:In WordML images are embedded into document
  (Base64 encoded). So when producing HTML, images have to
  be decoded and serialized out as external files to link
  from the generated HTML. This cannot be done in pure
  XSLT  1.0.
  But it's piece of cake using extensions, e.g. take a
  look at my sample implementation for .NET:
  http://www.tkachenko.com/blog/archives/000195.html;
 
 
 Hi Lincoln,
 
 here are some ideas which came just to my minds:
 
 - convert your WordML to HTML with links for images
(similar to the following):
 
html
  ...
  img
  src=http://localhost:/getimg.html?imgno=nn/...
/html
 
 - getimg.html is a pipeline which returns the nn'th image
from the WordML document (of course you need some
method to specify the WordML document, too).
 
Because this is base64 encoded you need to decode it.
I don't know if this will be possible using XSLT only,
because also in the sample provided by you an external
function is used.
 

Hi,

I know nothing about WordML, but i have worked with
OpenOffice FlatXML. There are the images embedded as
base64-data elements too.

The solutions was like Gerald, create a pipeline where you
can extract the image. You will need to pass the document
and an image-ID like:

map:match pattern=test/*/*.jpg
  map:generate src=docs/{1}.wordml/
  map:transform src=xsl/wordml2svg.xsl
 map:parameter name=image value={2}/
  /map:transform
  map:serialize type=svg2jpeg/
/map:match


You need an XSL-Stylesheet, which extract the image data
and create a SVG-document. The SVG-image-element can hold
the data as base64 endcoded xlink.

Here is a snipped
xsl:match pattern=[EMAIL PROTECTED] = $image]
svg:svg
svg:g
  svg:image xmlns:xlink=http://www.w3.org/1999/xlink;
   width=3cm height=2cm 
  xsl:attribute name=xlink:href   
xsl:textdata:image/png;base64,/xsl:text 
   !-- pass the base64 here --  
 xsl:value-of
   select=yourBase64/  
/xsl:attribute 
  /svg:image
/svg:g
/svg:svg
/xsl:match

The SVG-serializer will generate the image. Inside your HTML
you can generate a relative uri too, like image
src=foo/0.jpg/ if your page is foo.html from
foo.wordml. 


Best Regards,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error in offline site generation

2004-06-18 Thread Simon Mieth
On Fri, 18 Jun 2004 08:30:41 -0400
Riddim Dread [EMAIL PROTECTED] wrote:

 Thanks a lot for your help. I was able to resolve that
 problem and it runs without any error messages. However, I
 now have another problem. I am trying to explicitly
 generate an html file from an xml one, but it's creating
 the file as a directory with nothing in it :
 
 
 
 -bash-2.05b$ ls -l ts/dest
 total 4
 drwxr-xr-x2 femibyte femibyte 4096 Jun 18 04:39
 languages.html/
 
 -bash-2.05b$ ls -l ts/dest/languages.html/
 total 0
 
 
 Here's what my cli.xconf file looks like:
 
 context-dir./context-dir
config-filebuild/webapp/WEB-INF/cocoon.xconf/config
-filework-dirts/work/work-dir
dest-dirts/dest/dest-dir
 
 ...
 
 uri type=replace src-prefix=techsite/documents/tech/
src=languages.xml dest=ts/dest/languages.html/
 
 Here's the matcher in the sitemap :
 
 !-- pages --
   map:match pattern=*/*/*/*.*
 map:generate
 src=techsite/documents/{3}/{4}.xml/map:transf
 orm src=techsite/stylesheets/techarea.xsl
   !--map:parameter name=section value={1}/
   --!--map:parameter name=toc-file
   value=techsite/documents/toc.xml/--
 map:serialize type=html/
   !-- map:parameter name=base-url
   value=techsite/ --
 /map:transform
 ...
 map:serialize type=html/
 /map:match
 
 
 The weird thing is that the file is created properly when
 I use cocoon in a servlet container. Can anyone help me
 out here?
 
 Thanks,
 Femi

Hi,

maybe you should use context-dirbuild/webapp/context-dir
if this is the directory where your webapp is located.

the uri  dest=.. points normally to a directory where the
cli stores the generated files and subdirectories.

Maybe you want uri src=languages.html
src-prefix=techsite/documents/tech/ dest=ts/dest/

This is the what you do with a browser (
techsite/documents/tech/languages.html
 = src-prefix + src = sitemap-url )


It looks like you have a map:serialize inside the
map:transform element in your sitemap, you should remove
it (the map:serialize/ at the end of the pipeline is
correct)

I hope that helps,
Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error in offline site generation

2004-06-18 Thread Simon Mieth
On Fri, 18 Jun 2004 15:57:35 -0400
Riddim Dread [EMAIL PROTECTED] wrote:

 I don't think so because I'm trying to generate an html
 file from an xml file using an xsl stylesheet so I believe
 src should point to the source xml file.

Hi,

the CLI works uri-based like the CocoonServlet. The
source-file and the other processing-steps are defined in
the sitemap.xmap (your map:match). 
The CLI invokes the normal Cocoon, which tries to process
the given uri. If your page works in the servlet mode, then
simple use the uri after http://localhost:/ as the uri
for the CLI.

You can simple use this:
uri src=techsite/documents/tech/languages.html
dest=ts/dest/ 

or as example: the whole cocoon-docs are generated simple by

uri src=docs/index.html dest=out/

where the CLI crawls throught every page-link and generate
all sites.

The CLI is only another environment for Cocoon, but it works
like the servlet (most). 

You can look at the WEB-INF/logs to see what happend too.

Best Regards,
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: request for CLI-only build

2004-06-15 Thread Simon Mieth
On Mon, 14 Jun 2004 15:05:20 -0400
Murphy, Thomas H. (Newport News) [EMAIL PROTECTED]
wrote:

 Partly because Cocoon comes with just about everything
 except the kitchen sink (scheduled for Cocoon 2.2?), I'm
 interested in exploring Cocoon as a standalone,
 command-line application, *separate* from any use of
 Cocoon as a webapp.
 
 I realize that Cocoon can currently be used from the
 command line (although I'm getting a bunch of ugly errors
 at the moment).  What I'd like to see is a build option to
 make a Cocoon dist *solely* for use from the command line.
 There are already 10-20 build options; it would be nice to
 add a ./build.sh cli option to build a cli-only version
 of Cocoon, without references to webapp, WEB-INF, Jetty,
 etc.  However, such a version would still be able to
 create XSP, JSP, HTML, portal pages, etc.

Hi,

I'm not sure if I understand you correct. 
The CLI is an Wrapper (with some offline-goodies) around the
same Cocoon, which works in an servlet-environment. 
So the CLI needs the same infrastructure (the
component-configuration, logkit-configuration ...). 
You can exclude blocks, which you dont need in the
CLI-environment like portal-fw. I think there is an option
for building a clean-webapp (whithout the samples and docs)
too.

For working with the CLI or the CocoonBean you need a
working webapp. 
Jetty is not build, it is a binary version and only started
by ./cocoon.sh servlet. 

Best Regards,
Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon CLI Command Line Interface - Basic Question

2004-05-14 Thread Simon Mieth
On Thu, 13 May 2004, David Swearingen wrote:

 I'm trying to get Cocoon CLI to work.  I've scoured all the documents on this, but 
 can't figure out how cli knows where to find my sitemap.  I have cocoon up and 
 running just fine under Tomcat as a web application.
  
 What I need is a very basic command line -- which commands are REQUIRED to simply 
 process a request through the sitemap and output to a file?  I'd rather just put all 
 the required parameters on the command line rather than have to build an xconf file. 
  It seems to me that the minimum parameters needed if I DON'T reference an xconf 
 file are:
  
 -c contextdir (unless I use default)
 -d destination
  
 Part of my confusion in part stems from the fact that I have my sitemap under my 
 Tomcat folder (c:\jakarta-tomcat-4.1.30) but the docs say to run cocoon.bat residing 
 in my cocoon install directory, c:\cocoon-2.1.4. So, should my 'contextdir' be under 
 the jakarta path or the cocoon path?  What is the purpose of the contextdir?  That's 
 not explained in the docs.
  
 Finally, it's not clear to me what the difference is between -x and -C.
  
 The page that ostensibly explains all this is 
 http://cocoon.apache.org/2.1/userdocs/offline/cli.html
  
 Thanks,
 David

Hi David,

the usage of cocoon cli -c ... -d ... myuri.html will only works inside 
the directory of cocoon source distribution. 
You dont need (it is not possible) point to your sitemap.xmap, the 
main-sitemap should be in the contextdir, so you have to point to the 
right contextdir. 
If you want to use your deployed webapp under tomcat, you have 3 options 
to do this.

1.) you have the same cocoon-version as source package somewhere on the 
filesystem (c:\cocoon-2.1.4?) and it is build. You can use the cocoon.bat 
script there. Go to 
this folder and try cocoon -c c:\jakarta-tomact-4.1.30\webapps\cocoon -d 
c:\myoutput mystarting-uri.html

2.) You can use java org.apache.cocoon.Main -c ... -d  myhtml, 
but you have to put all libs from the webapp (WEB-INF\libs) to the classpath 
(by a script). 

3.) You can use the ant-task (see the user-doc), where ant will add all 
libs to the classpath/classloader.

The difference between -x and -C:

-C: point to the cocoon.xconf, where the cocoon-components are confiured

-x: point to a CLI-configuration-file, where you have setup all options 
and uris for the Cocoon-CLI, so you dont need any switches then.


If you run in a ClassNotFound exception you have to add the 
servlet_2_2.jar form c:\cocoon-2.1.4\lib\optional to the 
build\webapp\WEB-INF\lib if you use option 1)

Yes, the -c and the -d switch are only required. 


I hope it helps.

Best Regards,

Simon


 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon CLI: order of page generation

2004-04-06 Thread Simon Mieth
On Tue, 6 Apr 2004 11:24:15 +0200 (MEST)
Stephanie Zohner [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm using the cocoon cli with the xconf file for
 configuration. I use an text file to list the uris I want
 to get generated. This text file is set in xconf file. So
 far so good.
 
 Here's the problem: The urls are not processed in the
 order I set in the text uri file.  However, this is
 importent, because the first uri generates the input file
 for the following uris. How can I ensure that the first
 uri I set in the uri file is generated before the
 following ones? Right now, I call the cocoon cli twice
 (first time with only the first uri and the second time
 with the remaining uris), but isn't there a better way?
 
 Thanks in advance,
 
 Stephanie
 

Hi,

the BeanConfigurator add the uri list line by line, so it
should work.
Maybe you have switched on the followLinks-option, then
the CLI crawls through the first uri and all included links.
All the linked pages are generated. 
If that is your problem you can try switch of the
followLink-option or if you need this, place a uri-element
with your first uri before the uri-list element in the
xconf-file with followlink of.
Every uri and uris element can switch on/off the followLink
and confirmExtensions option. And all is processed like the
order in the xconf-file.

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon CLI: order of page generation

2004-04-06 Thread Simon Mieth
Hi Stephanie,

On Tue, 6 Apr 2004 18:15:42 +0200 (MEST)
Stephanie Zohner [EMAIL PROTECTED] wrote:

 It might start the generation in the right order, but then
 it does not wait until the first uri generation is
 finished before it starts the second one(and so forth).
 Could this be the reason? Follow-links=false does not
 solve the problem. It is logical because there are no
 links in the generated files.
 In the first pipeline I call an xml-file is written that
 is the input(generator source) for the following 2
 pipelines. So for me it's importent that the first url in
 the list has been generated before the second one starts.
 
 Is this behaviour a bug or a feature?
 
 I'm using cocoon 2.1.3
 
 Regards,
 
 Stephanie

If I unterstand you and you use the result from the first
uri  (the generate from the CLI to disk) as input for your
following uris:

Normally the CLI (so the CocoonBean) write the result to the
filesystem, before the next uri is processed (the same with
switched on/off the follow-link and confirm-extensions).

(So I'm right with Java a OutputStream.flush() and
OutputStream.close() generate a existing file to the
filesystem, and it should be available for the next uri as
input.)

 
Is there some output in the log-files, the CLI write
normally to the cli.log. 
If the CLI generate a Output like
* [1/3] [0/0] 2.212s 335b  foo/my.html
the page is written then to disk. 

If nothing helps (like the confirm-extensions from
Upayavira), maybe the next can do it, if there is something
buffered and not write to disk.

If the you can generate the first url and see the output and
all is correct, maybe a workaround is to write 2 cli.xconf
files. The first file generate only your first uri and the
second cli-2.xconf generate the following. Put both to a
script (batch or shell) like


#!/bin/sh
./cocoon.sh cli -x cli-1.xconf
./cocoon.sh cli -x cli-2.xconf

or as batch

cocoon cli -x cli-1.xconf
cocoon cli -x cli-2.xconf


Best Regards,
Simon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon Ant Task

2004-04-01 Thread Simon Mieth
On Wed, 31 Mar 2004 16:33:36 -0500
Corey Keith [EMAIL PROTECTED] wrote:

 I'm trying to use the CocoonTask from ant and when I
 include the load-class element in the cocoon target I get
 the following error. Below is my build.xml.
  
 BUILD FAILED
 C:\vets\build.xml:10: Class
 org.apache.cocoon.CocoonTask$ElementWrapper doesn't
 support nested text data.
  
 Is this a bug or should I be loading database driver
 classes differently with ant?
  
 Thanks,
 Corey
  
 project default=generate basedir=.
  property name=cocoon.context
  value=/cocoon-2.1.4/build/webapp/path
  id=cocoon.classpath
   dirset dir=${cocoon.context}/WEB-INF/classes/
   fileset dir=${cocoon.context}/WEB-INF/lib
   includes=*.jar/
  /path
  taskdef name=cocoon
  classname=org.apache.cocoon.CocoonTask
 classpathref=cocoon.classpath/
  target name=generate
   cocoon verbose=true classpathref=cocoon.classpath
 follow-links=true precompile-only=false
 confirm-extensions=false context-dir=${cocoon.context}
 config-file=WEB-INF/cocoon.xconf work-dir=build/work
 dest-dir=build/dest default-filename=hello.html
 accept=*/*
broken-links type=xml file=brokenlinks.xml
generate=false
 extension=.err/
load-classsun.jdbc.odbc.JdbcOdbcDriver/load-class
logging
log-kit=${cocoon.context}/WEB-INF/logkit.xconf
 logger=cli level=DEBUG/
uris name=vets follow-links=true
 uri type=append src-prefix=vets/
 src=vetslist.html
 dest=C:\mets/
/uris
   /cocoon
  /target
 /project
 

Hi,

the CocoonTask doesnt support text-nodes like load-class,
you have to add this to cocoon-task element as attribute.
like:
 cocoon ...
 load-class=   


 /cocoon

But unfortunalety it is impossible to use then more
load-class-elements in this way, or is there a another way? 
Or must this add to the CocoonTask with NestedElement for
load-class and other (Upayavira? ;-))? 

Best Regards,

Simon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: static web site creation by ant - error

2004-02-26 Thread Simon Mieth
On Wed, 25 Feb 2004 22:28:19 -0800 (PST)
yangontha Maung [EMAIL PROTECTED] wrote:

 Cocoon 2.1.4
 Trying to create static web pages by ant
 
 Mounted the /usr/local/spider at the main
 sitemap.xmap.
 
 I can run cocoon servlet and server the page
 http://myserver:/spider/hello.html
 
 Now I want that hello.html to save somwhere on the
 server.
 

Hi,

i think you must build cocoon-2.1.4 without portal-block and
portal-fw-block (see INSTALL.txt Choosing blocks). It
should work then.


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI with Modifiable Source

2004-02-18 Thread Simon Mieth
On Wed, 18 Feb 2004 17:57:05 +0100
Boris Althaus [EMAIL PROTECTED] wrote:

 Hello everyone,
 
 i tried out the offline-generation capabilities of Cocoon.
 To generate the project to local disk is no problem at
 all. But how I can invoke the generation with a 
 Modifiable Source for a ftp-transfer?
 
 Boris

Hi,

i think you should ude the ant-task. Ant can publish with
ftp.

Best regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Referencing inline images - How to?

2004-02-17 Thread Simon Mieth
On Mon, 16 Feb 2004 22:54:09 +
beyaNet Consultancy [EMAIL PROTECTED] wrote:

 Simon,
 could you just confirm to me that i am using the correct
 syntax
 
 sitemap:
   map:serializers default=html
   map:serializer name=svg2jpeg  
 src=org.apache.cocoon.serialization.SVGSerializer  
 mime-type=image/jpeg
 logger=sitemap.serializer.svg2jpeg/
   /map:serializers
   



Hi,

it  looks ok.  You can try to use the svg2png serializer
(you must only change the type= in the serializer
section). Try our svg with an static image from filesystem
(href:xlink=file:///my/image/here/test.jpg).

Argh, i see now you use the src-attribute in image-element,
use image
xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=data:
image/jpeg;base64,.. width  /. 

Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: e-mail Transformer

2004-02-17 Thread Simon Mieth
On Tue, 17 Feb 2004 07:33:57 +
Russell Geraghty [EMAIL PROTECTED] wrote:

 Dear all,
 
 I've started down a route to generate XSP pages from a SQL
 query to send e-mails to the users of our system about
 updates.
 
 I have subsequently realised that a mail transformer would
 be better, and seem to remember it used to exist.
 
 Assuming it is still available (Cococoon 2.1.2) I wonder
 if there are any examples of how to use it.
 
 Many thanks for any help.
 
 Russell Geraghty
 

Hi Russell,

if you look for a short description:

http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/mail/transformation/SendMailTransformer.html



I hope that helps.

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Referencing inline images - How to?

2004-02-17 Thread Simon Mieth
On Tue, 17 Feb 2004 14:25:13 +
beyaNet Consultancy [EMAIL PROTECTED] wrote:

 Simon,
 I am doing something wrong here. explain to me exactly what attributes  
 should be made available in the image tag? I think it would be better  
 if you just show me the code you are using to generate the image tag.  
 Do you mean

xsp:attribute name=xlink:hrefdata:image/jpeg;base64

Hi,
take this and put the xmlns:xlink=.. to the image-element or document-root,
where other xmlns are defined. But i'm not sure how to handle namespace-attributes
correct in xsp, try it. Maybe you can find it in the docs.

xsp:attribute name=xlink:hrefdata:image/jpeg;base64

Best Regards,
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SVG broken images.....HELP!!

2004-02-17 Thread Simon Mieth
Hi,


On Tue, 17 Feb 2004 17:02:43 +
beyaNet Consultancy [EMAIL PROTECTED] wrote:
 
   map:serializers default=html
   map:serializer name=svg2jpeg  
 src=org.apache.cocoon.serialization.SVGSerializer  
 mime-type=image/jpeg
 logger=sitemap.serializer.svg2jpeg/
   /map:serializers


That is ok.

 
   map:match pattern=frame/*.jpg
   map:generate type=serverpages
   src=xsp/artist-details.xsp
   /map:serialize type=svg2jpeg/
   /map:match




You have an XSL (your point 2), but in the sitemap-snipped
is no 
map:transform src=mystylesheet.xsl/. Have you one in
your sitemap and forgotten here? 

To debug: change the map:serialize type=svg2jpeg/ to 
map:serialize type=xml/ and point  your browser to
http://localhost:/frame/artist1.jpg (or what your url
is). You get now a XML-File. Look if the XML-SVG is ok. 
Save this file to disk.

Download batik from:
http://www.apache.org/dyn/closer.cgi/xml/batik
(the bin-distri) and unpack, change to batik directory
and call java -jar batik.jar.
This should launch squiggle a svg-viewer. 
Open your XML-SVG-file and see if it works.

If it works change your back to map:serialize
type=svg2jpeg/ and try again.



Best Regards,

Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Referencing inline images - How to?

2004-02-16 Thread Simon Mieth
On Mon, 16 Feb 2004 07:46:26 +
beyaNet Consultancy [EMAIL PROTECTED] wrote:

 Hi,
 so far I have been making reference to images via my
 sitemap as   standard:
 
   map:match pattern=*.jpg
   map:read mine-type=text/jpeg
   src=images/{1}.jpg /
   /map:match
 
 As I am now using inline images I have changed my sitemap
 to the  following:
 
   map:match pattern=artist1
   map:read mine-type=image/jpeg
   src=artist1 /
   /map:match
 
 My image structure is:
 
   xsp:element name=object
   xsp:attribute
   name=idartist1/xsp:attributexsp:attr
   ibute
   name=width200/xsp:attributexsp:attri
   bute
   name=height200/xsp:attributexsp:attr
   ibute
   name=typeimage/jpeg/xsp:attributexsp
   :attribute  
 name=datadata:image/jpeg;base64,xsp:exprbase64-strin
 g/xsp:expr/ xsp:attribute
   /xsp:element
 
 When viewed in the browser the image is broken, i.e. it
 cannot find it.  How do i resolve this? Do I reference
 back to the xsl page the image  sits in?
 
 The sitemap structure for the page the image sits in is:
 
   map:generate type=serverpages
   src=xsp/{../1}.xsp /map:transform
   type=xslt src=style/frame-page.xsl
   /map:serialize type=html/
 
 many thanks in advance

Hi,

the map:read can only read images direct. If you want to get
your images from your db, then you have to create an own
reader (java-component, no xsp) that query your db and write
the image to the reponse-stream direct.

But i see you have the images base64 endcoded, isnt it?
You can now simple create a pipeline like this.

map:match pattern=*.jpg
   map:generate type=serverpages src=my.xsp / 
!-- your xsp, that get the images from db and make a
svg here--   
   map:serialize type=svg2jpeg/
/map:match

Your XSP should give a SVG-XML-document like:

svg width= height=..
image xmlns:xlink=http://www.w3.org/1999/xlink
xlink:href=data:image/png;base64,!!!your base64 string
here !!!/
/svg


Best Regards,

Simon










-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Referencing inline images - How to?

2004-02-16 Thread Simon Mieth
Hi,


On Mon, 16 Feb 2004 16:51:27 +
beyaNet Consultancy [EMAIL PROTECTED] wrote:

 Simon,
 thanks for the tip you gave earlier. It works fine in
 Netscape but is a  broken image in IE. What am I doing
 wrong?
 
 My xsp looks like this:
 
   byte[] photoa = artist.getArtistPhoto1();
   
   !-- base64 encode byte array --
   String newPhoto =
   Base64.encodeBytes(photoa);
 
   !-- remove spaces from string --
   String newPhoto1 =
   spaceRemover.trim(newPhoto);

I think you dont need this. If your byte-array holds the
image, then the encoded String hold this bytes without
erasable whitespaces and if there a Whitespace it should be
there. ;-)




   /xsp:logic
page
   
   svg width=200 height=200
   xsp:element name=image
   xsp:attribute
   name=width200/xsp:attributexsp:attri
   bute
   name=height200/xsp:attributexsp:attr
   ibute  
 name=srcdata:image/jpeg;base64,xsp:exprnewPhoto1/xs
 p:expr/xsp: attribute
   /xsp:element
   /svg
   /page
 
 My sitemap looks like this:
 
   map:match pattern=frame/*.jpg
   map:generate type=serverpages
   src=xsp/artist-details.xsp
   /map:serialize type=svg2jpeg/
   /map:match
 
 many thanks in advance
 

Can you save the image in Netscape or use something like
wget and open in IE with the same error?
You can test the svg with a static image from the
filesystem?

I use encode images with filter, that works in IE. So i dont
now where the problem is. I remember there were problems
with IE and the svg/jpeg/png serializer, but i thing this is
solved. Maybe the mail-archive can help you.


Best Regards,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Offline generation Exception can't find component

2004-02-15 Thread Simon Mieth
On Sun, 15 Feb 2004 11:27:45 +
Alex S [EMAIL PROTECTED] wrote:

 Hi Thanks for the reply.
 Yes that makes some sense. But I am still having
 dificulties. Something about CatalogManager.properties or
 server.properties can't be found .
 
 a) I am now just going to try using the CL to pass in all
 the arguments directly.  easier for troubleshooting I
 think. b) Also with a fresh build of cocoon 2.1. I am
 working on Linux redhat 9 by the way.
 Thus I will try to build the samples having added pattern 
 welcome-test.html to the root sitemap instead of 
 because I do not know how to represent the latter as an
 argument on the [EMAIL PROTECTED] cocoon-2.1]#
 ./cocoon.sh cli welcome-test.html -C
 build/webapp/WEB-INF/cocoon.xconf -c build/webapp/ -w
 ../tmp/ -d ../tmp/docs/
 
 
 Gives me this response on the command line:
 
 
 Cannot find CatalogManager.properties
 Exception in thread main
 java.lang.reflect.InvocationTargetException
 at
 sun.reflect.NativeMethodAccessorImpl.invoke0(Nati
 ve Method) at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodA
 ccessorImpl.java:39)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegatin
 gMethodAccessorImpl.java:25)
 at
 java.lang.reflect.Method.invoke(Method.java:324)
 at Loader.invokeMain(Unknown Source) at
 Loader.run(Unknown Source) at Loader.main(Unknown
 Source)
 Caused by: java.lang.NoClassDefFoundError: 
 javax/servlet/http/HttpSessionBindingListener
 at java.lang.ClassLoader.defineClass0(Native
 Method)

Hi Alex,

the problem is the java.lang.NoClassDefFoundError, the
CatalogManager.properties and server.properties not found
message is no problem, ignore this.

You must only cp tools/jetty/lib/servlet*.jar
build/webapp/WEB-INF/lib in the cocoon-2.1 directory.


If you use the current-CVS-version or the cocoon-2.1.4, you
can run in trouble again. The portal-framework and
portal-block break the CLI. I'm not sure if it fixed now,
the bug is still open in bugzilla. 

You have 2 options to solve this.

1.) Build cocoon without portal and portal-fw-block, by:
copy blocks.properties to local.blocks.properties and edit
this file:
comment out the
exclude.block.portal-fw=true
and 
exclude.block.portal=true
properties.
Then rebuild cocoon.


2.) You can comment out in the portal-related-stuff in the
cocoon.xconf file. That is a little bit tricky, to find
components. Maybe it is a good idea to make a copy like
cocoon-cli.xconf and edit this file. 
Later you can use this file with the -C
where/the/is/cocoon-cli.xconf-switch

You dont need this if you use cocoon-2.1.3.


I hope that helps. ;-)

Best Regards,

Simon









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Offline generation Exception can't find component

2004-02-14 Thread Simon Mieth
On Sat, 14 Feb 2004 17:30:31 +
Alex S [EMAIL PROTECTED] wrote:

 
 
 Also if I do this:
 cocoon-2.1]# ./cocoon.sh cli wscott/index.html -C ws.xconf
 
 I get an error about specifying a destination directory
 but I have done that in the ws.xconf file like so:
   context-dirbuild/webapp//context-dir
config-filebuild/webapp/WEB-INF/cocoon.xconf/config
-filework-dirwork/work-dir
dest-dirwork/docs/dest-dir


Hi Alex,

if your ws.conf holds the configuration for the cli, you
must use the -x ws.xconf-switch.
With -C you point to the cocoon.xconf, this is the
main-cocoon-configuration-file.
Try ./cocoon.sh cli -help to get an overview off all
switches.

Best Regards,

Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: offline generation - NullPointerException in release()

2004-02-04 Thread Simon Mieth
On Wed, 4 Feb 2004 15:02:32 -0800 (PST)
[EMAIL PROTECTED] wrote:

 Hi everyone and especially the helpful cocoon experts,
 I think I really need help on this one. 
 The NullPointerException I'm getting in the release() method (see
 below) does seem to have an effect. When I generate the site I do get a
 correct /index.html for the site and it traverses the first
 subdirectory /about/index.html, /about/contact.xml,
 /about/pressrelease/index.html, /about/pressrelease/pr0001.html
 correctly. 
 But when the algorithm seem sto return to the second (and all following
 subdirectories (for example /product/index.html) it does generate the
 /index.html into /product/index.html. 
 It also does not generate /product/technology.html (only the index.html
 per subdirectory.
 It looks like it traverses the site correctly for the first depth first
 cycle and then does fall into this error.
 Has anyone experienced this before? Any idea where best to start
 looking?
 
 All help is very much appreciated!
 Kaj
 
 

Hi,

which cocoon-version you are using and how (cli.xconf or commandline-switches)?
If you have an older version, there were often excpetions, but the build was correct.

If you use an older version, try the current CVS-version and build without the 
portal-fw
and portal-block (otherwise the CLI is not running). 
Is your site running  in tomcat or jetty correct?

Best Regards,

Simon



 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CocoonBean

2004-01-31 Thread Simon Mieth
On Sat, 31 Jan 2004 07:57:34 +
Upayavira [EMAIL PROTECTED] wrote:


 A crawler is not re-entrant. You need a new one each time.
 So you would call bean.process(crawler) with a newly
 created crawler.
 
 Obviously all of your 'set' javabean properties of the
 bean would need to be set and left alone before going into
 a multithreaded mode, so the bean isn't strictly
 threadsafe, at least until the bean is initialised. To
 make it properly threadsafe would probably require quite a
 redesign.

 As I say above, you'd call process(crawler) passing it a
 new crawler each time.
 
 With CheckSumURI, there is a controller over processed
 URI's too.
   
 
 The checksum stuff is pretty basic, and a bit of a hack.
 That wouldn't work in a multithreaded environment without
 some work.
 
 Other question ;)
 
 Is there a way to stop the processing? I have only found
 dispose(), but this need then a new CocoonBean-instance.
   
 
 To stop processing? How would you like to stop processing?
 From another thread? You could have crawler.setStop(true)
 which the process() method would check isStop == true to
 find out whether it should continue or not. That wouldn't
 be too hard.
 
 Simon, if you're doing this sort of work with the bean,
 and understanding how it works, then send in patches. Make
 it do what you want it to do. We can then commit those
 patches and everyone benefits. That's how I got involved
 with it, I just started sending in patches.
 
 Regards, Upayavira


Hi Upayavira,

The process(Crawler crawler) is a good idea. 


Ok, i will try to add  a process(Crawler crawler), which
will do the same as process(). This will break nothing and
the CLI and your ANT-Task will work without changes.

I control the Bean from a GUI, so stop processing with
CTRL+C is not that what i want ;-). I have a
Cancel-button there, to stop the processing (the
cocoon-documentation is build in 3-4 minutes, it will be
fine to stop this, if someone want this).

I will try to add a stop/interrupt-flag in the process, test
it and add all as PATCH to bugzilla.

I hope this will help you.

Best Regards,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CocoonBean

2004-01-30 Thread Simon Mieth
On Fri, 30 Jan 2004 22:11:27 +
Upayavira [EMAIL PROTECTED] wrote:


 
 It is currently untested. Try it and report back please.
 
 As to is it 're-entrant'? Well, adding the Crawler class
 took it a lot further to being rentrant, but it isn't
 there yet. At the moment, the Bean is configured using
 cocoonBean.addTarget(). For it to be re-entrant, each call
 would need to use a different Crawler, with
 crawler.addTarget() used to add new targets. We'd have to
 decide what interface we want to expose, but when we've
 done that, I think the code changes should be pretty easy.
 
 Regards, Upayavira

Hi Upayavira,

i hope i understood this. A 're-entrant' Target need a new
Crawler, an 'new Target' (which was not processed before)
can add to the old Crawler and processed with it? 
If there any benefit to distinguish these cases? 
In most cases someone add Targets to the Bean an call
process(). All Targets in the Crawler now process and cannot
processed again with this Crawler. If i add now one of the
processed Targest, i want process this Target again.

Is so, then it is possible, the Crawler is replaced after
every process()-call with a new empty Crawler?

With CheckSumURI, there is a controller over processed URI's
too.


Other question ;)

Is there a way to stop the processing? I have only found
dispose(), but this need then a new CocoonBean-instance.


Best Regards,

Simon Mieth

BTW: i will release a 0.1 of my cocoon-app next week.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



realpath module - subsitemap

2004-01-27 Thread Simon Mieth
Hi all,


i try to access the realpath to my subsitemap. With the
realpath module i can get the contextPath.

How can i access the path of a subsitemap? 
The request module doesnt give the correct path, when i do
this:

map:match pattern=foo/**

  map:mount check-reload=yes src=otherdir/
uri-prefix=foo//  

/map:match


with the servletPath/URI i only get the foo-part, but
i need the otherdir-path. 

I would write an input-module like realpath or extend this,
but i didnt find the way to access the subsitemap path.

Any hint there, which component holds the path?

Thanx for any tip,

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CocoonBean

2004-01-27 Thread Simon Mieth
On Tue, 27 Jan 2004 12:29:52 -0500
Jeffrey Winter [EMAIL PROTECTED] wrote:

 
 I have been exploring using Cocoon in a standalone,
 event-driven, multi-threaded application via the
 CocoonBean.
 
 Is it possible to use the CocoonBean to handle individual
 transformation requests in this manner?  From what I can
 tell, a request for an individual transformation can be
 made by calling addTarget(), but these requests appear to
 accumulate even after disposition in the Crawler. Is
 there anyway to remove the targets once the request is
 complete?
 
 Is there a more practical way to request a transformation
 besides calling addTarget() then process(), perhaps using
 lower-level mechanisms?
 
 Is the CocoonBean re-entrant, or must there be a new
 instance of a CocoonBean bound to each thread? 
 
 Thanks

Hi Jeffrey,

i had the same problem. my solution (discussed on the
dev-list some weeks before):

add to CocoonBean 


public void removeAllTarget(){
this.crawler = new Crawler();
}


then you can add the same targest as before and build the
pipelines with the followlink,... -features from the
CocoonBean.

But if you only need a single result from the pipeline,
maybe CocoonBean.processURI(uri,OutputStream) (from
CocoonWrapper). I have not tried this before, but found in
the java-docs.

Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: content aggregation + links to used files

2004-01-05 Thread Simon Mieth
On Mon, 5 Jan 2004 14:41:09 +0100 (CET)
Nele Vogel [EMAIL PROTECTED] wrote:

 Hello Koen!
 
 Koen wrote:
  I think your original approach is correct, but we need
  to determine whypath is not returing a value.
 
  Just to get things straight: the snippet you mentioned
  *does* match file(and outputs following file was
  added:), but just the ./@path is not resolved;
  correct?
 
 Unfortunately it *does not* match file.
 
 I don't understand why!
 
 *WITHOUT* the line map:transform
 src=content2page.xsl/ (in the sitemap snippet) the
 output looks like this:
 
 news
   file path=news/news1.xml
 article
   [...]
 /article
   /file
 /news
 
 *WITH* line map:transform src=content2page.xsl/
 neither element news nor element file is processed
 - they are missing. But I am able to process every element
 inside article. There has to be an error in my XSL file!
 
 Thank you for your help, Koen!
 
 Nele
 
Hi Nele,

are you sure there is no namespace on your
root/news-element? Is so, the stylesheet will not match your
elements. You can see this in the page-source of your
browser.

Best regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to get the user agent in an xsp page?

2004-01-03 Thread Simon Mieth
On Sat, 03 Jan 2004 01:54:59 +0100
Davide [EMAIL PROTECTED] wrote:

 Hi, my question il simple:
 
 how to get the user agent in an xsp page?
 
 Best Regards, Davide
 
Hi,

 xsp-request:get-header name=user-agent as=xml/

 or this

 xsp:exprrequest.getHeader(user-agent)/xsp:expr


Best regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to get the request parameters in a transformer?

2003-12-31 Thread Simon Mieth
On Wed, 31 Dec 2003 10:51:50 +0100
Davide [EMAIL PROTECTED] wrote:

 Thanks a lot, I'll consider it, but now I would like to
 build my own transformer. My problem is to get into the
 transformer a parameter of the http request...
 
Hi,

you can get it in the setup(..) method from your transformer



import org.apache.cocoon.environment.ObjectModelHelper

public void setup(SourceResolver resolver, Map map,..){

 Request request =
(Request)ObjectModelHelper.getRequest(map);
 
 //get the parameters from request;
 
}



Best regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to put {1}, {2}... into XSP

2003-12-29 Thread Simon Mieth
On Mon, 29 Dec 2003 02:25:39 +0100
[EMAIL PROTECTED] wrote:

 Hi, I have a this problem. I'd like to put parsed pieces
 of URI into serverpages as parameters. For example: I have
 URI html/english/article/102 (it means, that I want to
 get article with ID=102 in english language and in HTML
 format). Sitemap could look like as 
 
 map:match pattern=*/*/*/*
   map:generate type=serverpages src=logic/{3}.xsp
 map:parameter name=format value={1}/
 map:parameter name=language value={2}/
 map:parameter name=id value={4}/
   /map:generate
   map:transform src=stylesheets/{3}to{1}.xsl/
   map:serialize type={1}/
 /map:match
 
 I know, that map:parameter tag is nonsense, but how to
 get the pieces of URI {1}, {2}... into serverpages? (and
 how to read them in xsp script?). Yes, needed informations
 could be theoretically obtained by parsing URI in xsp
 script, but in this case will be not URL scheme
 transparent to scripts. (I can decide in the future, that
 URI will be not html/english/article/102 but for example
 english/html/article/102 - and then I will have to
 rewrite all the xsp scripts).

Hi,

have not tried this, but found it in the mail-archiv


xsp:logic
String format =
this.parameters.getParameter(format);

// and all other parameters

/xsp:logic

this works, becouse all XSP's are Generators.



Regards Simon




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Quick Install Question

2003-12-16 Thread Simon Mieth
On Tue, 16 Dec 2003 07:02:23 -0500
Charles Williams [EMAIL PROTECTED] wrote:

 Sorry for the repeat...

your question is answered yet (look your older mail).
Again ;-)

only point your browser to http://localhost:/;,
thats all,


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Quick Install Question

2003-12-16 Thread Simon Mieth
On Tue, 16 Dec 2003 07:33:53 -0500
Charles Williams [EMAIL PROTECTED] wrote:

 When I try http://localhost:/ I get the same result:
 
 HTTP ERROR: 404 Not Found
 RequestURI=/ 
 
 The startup from cocoon servlet shows that Jetty is
 listening to 0.0.0.0:
 
 
  Loading 
 Processing repository: .\tools\jetty\lib
 Adding jar: .\tools\jetty\lib\jetty-4.2.9.jar
 Adding jar: .\tools\jetty\lib\servlet-2.3.jar
 Processing repository: .\lib\endorsed
 Adding jar: .\lib\endorsed\xalan-2.5.2.jar
 Adding jar: .\lib\endorsed\xercesImpl-2.5.0.jar
 Adding jar: .\lib\endorsed\xml-apis.jar
  Executing -
 Main Class: org.mortbay.jetty.Server
 07:29:51.034 EVENT  Checking Resource aliases
 07:29:51.645 EVENT  Starting Jetty/4.2.9
 07:29:51.775 WARN!! No WEB-INF/web.xml in .\build\webapp.
 Serving files and defa
 ult/dynamic servlets only

Hi,

sorry i have not seen this, there is something missing.
Have you a build\webapp - folder with files and
directories? 
What was your build-command?

Normally the following build cocoon correct:

1.) build.bat
2.) cocoon servlet 

Sometimes peaple have build-problems if the use winzip,
which not handle empty directories correct.


Best Regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: 2 generators in a request

2003-12-02 Thread Simon Mieth
On Tue, 2 Dec 2003 11:46:08 +0100
Carmona Perez, David [EMAIL PROTECTED] wrote:

 Hi all,
 
 I'm using DocBook under Cocoon.
 
 In the chunked version of the standard DocBook
 stylesheets, the transformation step generates a set of
 files..
 
 map match=**.html
 map:generate src=my-source.xml
 !-This steps generates in myTempDirectory/ the chunks--
 map:transform src=html/chunk.xsl
 map:parameter name=base.dir value=myTempDirectory//
 /map:transform
 map:generate src=myTempDirectory/{0}
 map:serialize/
 /map match
 
 I know I can't do that because I can generate twice.
 
 Any suggestion will be welcome.
 
 
 David
 
 
Hi,

maybe the CInclude-Transformer can do this job.
look at
http://cocoon.apache.org/2.1/userdocs/transformers/cinclude-transformer.html

Best regards,
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SendMailTransfomer question

2003-12-02 Thread Simon Mieth
Hi Rui,

i tried your example with my enviroment and it works, but i
use postfix as MTA. Maybe there is a problem by sendmail.




On 02 Dec 2003 12:15:44 +
Rui Alberto L. Gonçalves [EMAIL PROTECTED]
wrote:

 I'm getting the message in /var/log/maillog:
 
 Dec  2 11:44:43 localhost sendmail[4960]: hB2BigJP004960:
 localhost.localdomain [127.0.0.1] did not issue
 MAIL/EXPN/VRFY/ETRN during connection to MTA
 

Which version of java-mail you use (1.3 by me)?


 It seems that the connection is established to sendmail,
 but after that the connection is aborted without trying to
 send the email.
 
 At the end of pipeline I have:
 htmlbody/body/html
 
 I can't understand the reason of this html tags as the
 result of the pipeline!!

This is done by your browser i think, not by the
cocoon-pipeline. So there is no result from your pipeline
(empty). 


 org.apache.cocoon.acting.Sendmail is working!!
 
 Rui

Ok, i have found a difference in the Action and Transformer.
The Action use the static method Transport.send(Message)
from javamail and the Transformer use a
Transport.sendMessage(). I'm not sure, becouse it works for
me here. 
From JAVAMAIL-FAQ: befor sending with do a
Session.saveChanges(), if needed. 

This part is done in the Transformer, only the there is
setting the Message.setRecipients() before sending. 
Maybe you can try to add a saveChanges() in the code before
sending, but i'm not sure if is needed there.

in
cocoon-2.1.x/src/blocks/mail/java/org/apache/cocoon/mail/tr
ansformation/SendmailTransformer.java

insert at line 525 a this.smtpMessage.saveChanges();
before trans.sendMessage(this.smtpMessage, iaArr); 

//but this will slow down the process 

and rebuild cocoon and try again. 


This is the point i can see, maybe it helps you.


Best regards,
Simon





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SendMailTransfomer question

2003-12-02 Thread Simon Mieth
Hi Rue,


On 02 Dec 2003 12:15:44 +
Rui Alberto L. Gonçalves [EMAIL PROTECTED]
wrote:

 I'm getting the message in /var/log/maillog:
 
 Dec  2 11:44:43 localhost sendmail[4960]: hB2BigJP004960:
 localhost.localdomain [127.0.0.1] did not issue
 MAIL/EXPN/VRFY/ETRN during connection to MTA
 
 It seems that the connection is established to sendmail,
 but after that the connection is aborted without trying to
 send the email.
 
 At the end of pipeline I have:
 htmlbody/body/html

This is done by your browser, your pipeline serialize
nothing. Is there no exception in your error.log or (if you
use tomcat in the tomcat-logs)?




 I can't understand the reason of this html tags as the
 result of the pipeline!!
 
 org.apache.cocoon.acting.Sendmail is working!!
 
 Rui

Regards,
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SendMailTransfomer question

2003-11-28 Thread Simon Mieth
On 28 Nov 2003 18:21:23 +
Rui Alberto L. Gonçalves [EMAIL PROTECTED]
wrote:

 I'm sending in attachment the result log of a request that
 matches this pipeline with DEBUG level.
 In fact the match pattern this time is sendmail-x :)
 I'm using cocoon 2.1.2. I tryed to use SendMailTransformer
 that is shiped with cocoon-2.1.3, but the result is the
 same!! :(
 
 Thanks again!
 


Ok, as i see from your log-file the sendMail-method from the
sendmailtransformer should be invoked and there is no
exception in the log-file.

What get you as result from your pipeline? 
Can you take a look at your mail.log (linux? then
/var/log/mail.log). Is there a connection from localhost (
the messageID should contain JavaMail?
Maybe a look in error.log and core.log (in WEB-INF/logs) can
give more details.

Best regards,

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon and interaction with the Shell

2003-11-18 Thread Simon Mieth
On Tue, 18 Nov 2003 12:10:15 +0100
Yves Vindevogel [EMAIL PROTECTED] wrote:

 I agree that it something very useful.
 
 I think, but I'm not an export, that we need something like this:
 An XSP, with parameter target-platform for Linux / Windows choice.
 The XSP should be able to do this, eg.
 
 xsp-shell:execute-commandrm -f xsp-request:get-parameter
 name=file/xsp-shell:execute
 (platform dependant but flexible)
 
 OR
 
 xsp-shell:delete-filexsp-request:get parameter
 name=filexsp-shell:delete-file
 (this would be platform independant, but limited to a number of methods)
 

Hi,

could File file = new File(name);
file.delete(); //platform independend

from java.io.File not do this job, or i'm misunderstandig you?

Regards,
Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: offline page generator

2003-11-15 Thread Simon Mieth
On Sat, 15 Nov 2003 14:07:50 +0100
Next Design | Luca Mascaro ::. [EMAIL PROTECTED] wrote:

 buongiorno they are newbye
 
 excused my English, but I speak Italian
 
 I ave a problem whit offline page generator
 
 I ave one directory _dotinfo on build/webapp folder, whit pipeline
 default index.html
 
 I want to generate of the content offline whit cli, but I do not succeed
 to shape cli.conf
 
 and it is continued to block with this message: listening for
 connection
 
 how I must make?
 
 Tks and sorry for my English
 
hi,

if you can get your site in servlet-mode. You can first quick try

1.) copy servlet-2.3.jar from tools/jetty/lib to 
2.) build/webapp/WEB-INF/lib
 ./cocoon.sh cli -c build/webapp -d DestinationDir -C 
build/webapp/WEB-INF/cocoon.xconf dotinfo/index.html !-- what ever your uri is-- 
look if -e false can help you too

you will get many exceptions, but the site should generated and you can see if your 
sitemap.xmap/uri is setup correct.

Look at this thread 
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=106866427220663w=2 some days 
befor, there are some tips, from Upayavira how you can setup your cli.xconf.


regards,
Simon (sorry for my English too)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Install Problem

2003-11-13 Thread Simon Mieth
On Fri, 14 Nov 2003 07:20:28 +0100
[EMAIL PROTECTED] (Simon Mieth) wrote:


 There is the servlet installed by default, you can try cocoon by ./cocoon.sh 
 servlet and point your browser to http://localhost:.

Sorry,
i mean the servlet-engine jetty is include by default.

Simon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CLI Still not working ... :-(

2003-11-12 Thread Simon Mieth
On Wed, 12 Nov 2003 20:11:07 +0100
Alexander Schatten [EMAIL PROTECTED] wrote:

 Upayavira tried to help me the last days to get the Cocoon CLI running 
 to generate the website for a Cocoon-Tutorial Day. Thanks again, I made 
 some steps forward but:
 
 after meanwhile days of work, I unfortunately still have no result. I 
 came so far, that
 
 (1) I downloaded the recent CVS sources
 
 (2) I modified the local.blocks.properties by excluding all unstable 
 blocks as well as hsqldb
 
 (3) cocoon compiles then.
 
 (4) I install my webapplication, start cocoon in servlet mode--for test 
 purpose---and it displays correctly with the url:
 
 http://localhost:/cocoon-day/index.html
 
 so this works fine.
 
 (5) then I use the default cli.xconfig but add/modify:
 
uri type=replace
 src-prefix=samples/
 src=hello-world/hello.html
 dest=build/dest/hello-world.html/
  
   
 
 uris name=CocoonDay follow-links=true
 uri type=replace
 src-prefix=
 src=cocoon-day/index.html
 dest=build/dest/cocoon-day/
 /uris
  

 
 (btw. the default installed example does not work, but this is no 
 miracle, as there is no /hello-world/hello.html. I believe, again, that 
 at least the default exmaple should work)
 
 o.k. then
 
 (6) ./cocoon.sh cli -x cli.xconf
 
 (7) cli now runs at least without exceptions, with the result:
 
 * [1/0] [0/0] 3.186s 4.6Kb   cocoon-day/index.html
 Total time: 0 minutes 6 seconds,  Site size: 4,752 Site pages: 1
 
 
 
 as a matter of fact, not a single result page is created :-(
 
 I tried various combinations in the uri statement, but always with the 
 same null result...
 
 
 to be honest, I have no further idea how to proceed.
 
 -+-+-+-+-+-+-+-+-+-
 I really would be glad if someone could help me: I added the cocoonday 
 website to:
 
 http://www.schatten.info/info/cocoon-day.tar.gz
 
 additionally I copied the cli.xconf into this tar. So if anyone would 
 like to check this this would be really glad.
 -+-+-+-+-+-+-+-+-+-
 
 
 I would have liked to present this offline feature next week, but I have 
 to drop it otherwise, as I cannot present something to new users, that 
 not even I was able to get up and running in more than a week of hard 
 trying...
 

Hi Alex,

i tested it with a CVS-build from last friday/sunday

the steps i did:

1.) copy your cocoon-day directory to build/webapp
2.) add to the main-sitemap in build/webapp
as first pipeline in map:pipelines
map:pipeline
map:match pattern=cocoon-day**
map:mount check-reload=yes src=cocoon-day/  uri-prefix=cocoon-day /
   /map:match 
  /map:pipeline   
3.) copy servlet-2.3.jar from tools/jetty/lib to build/webapp/WEB-INF/lib
4.) ./cocoon.sh cli -c build/webapp -e false -d simon -C 
build/webapp/WEB-INF/cocoon.xconf cocoon-day/index.html

and the site was build after one trail without the -e false option, there was only 
generated the index.html.
Maybe that is the problem in your cli.xconf is this setting to true
cocoon verbose=true
follow-links=true
precompile-only=false
confirm-extensions=true  !-- this on set to false  --



there was some exceptions, but the build was ok.

I didn't comment out blocks, just a ./build.sh webapp.

I tested it with my pre-pre-alpha cocoon-Desktop (an GUI-Interface with FTP-Client) 
application it works too.

The site looks fine.

Regards,
Simon









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: problem embedding images

2003-11-08 Thread Simon Mieth
On Sat, 8 Nov 2003 23:57:53 +0500 (GMT)
Ashish Kumar [EMAIL PROTECTED] wrote:

 hi all,
 i want to simply embed an image in my pdf document.
 
 i m using following codes:
   
 xsl:template match=hello
   fo:block
   hello there!
   fo:external-graphic src=hello.jpg/
   /fo:block
 /xsl:template
 
 while the pdf displays hello there!, it doesn't displays the image.
 (i have checked 100 times that image is in the current directory with
 correct name!)

Hi,

i think you have to take an absolute path to your image or often used an reader 
pipeline,where you can access your image via

http://localhost:/pics/myimage.jpg 

and use this url for your fo:external-graphic

sitemap.xmap snipped for reader pipeline

map:match pattern=pics/**.jpg
   map:read mime-type=image/jpg src=pics/{1}.jpg/
/map:match

the last solution will not work for offline-generation via CLI,
there you must use absolute path.
Or you encode your images with base64 in the xml-file an then use the
fo:instream-foreign-object,where you can use embedding svg-images

example
---
svg width= heigth=
g
image width= height= xlink:href=data:image/png;base64,!-- encoded image here 
--/
/g
/svg
/fo:instream-foreign-object

Look in the mailing-lists archives, there are many solutions there too.

Regards (and sorry for my english),
Simon



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Command line interface

2003-10-21 Thread Simon Mieth
On Tue, 21 Oct 2003 07:19:13 +0100
Upayavira [EMAIL PROTECTED] wrote:

 Try recompiling Cocoon without the Deli block (and exclude session-fw 
 whilst you're at it).
 
 Regards, Upayavira

Hi,

another solution is to strip down the cocoon.xconf file to related components, which 
are needed for CLI-processing.

I removed all deli,portal-framework,session,hsqldb-components and it works fine for 
me. 

I think with a modified cocoon.xconf, rebuilding without some blocks will not needed.


Regards,

Simon  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]