Re: inserting doctype from xsl

2002-11-16 Thread Alessio Sangalli

Jeremy Quinn wrote:



On Saturday, Nov 16, 2002, at 19:10 Europe/London, Alessio Sangalli 
wrote:

> Perhaps it has already been discussed, but I didn't find any
> reference  to this in the mail list archives.


Set it up in the relevant serializer in the
map:components/map:serializers section of your sitemap like this:

good I've set it up on the html serializer like this:



  1024
 -//W3C//DTD HTML 4.01 
Transitional//EN




shouldn't it be inserted by default in a default sitemap from the cocoon 
installations? should we write this to the developers mailing list?

bye
as





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

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



inserting doctype from xsl

2002-11-16 Thread Alessio Sangalli
Perhaps it has already been discussed, but I didn't find any reference 
to this in the mail list archives.

I wanted to check my code with the w3c validator; I get a fatal error 
because I didn't put the DOCTYPE thing at the beginning of the page.

However I can't put it from inside xsl because I get


 The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode 
notifies that org.apache.cocoon.ProcessingException says:

doctype not allowed in content.

More precisely:

org.apache.cocoon.ProcessingException: Exception in creating Transform 
Handler: org.xml.sax.SAXParseException: doctype not allowed in content.



how can I do? I've tried few solutions found in dejanews but none worked...

bye & thank you
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: link rel=

2002-11-14 Thread Alessio Sangalli

Jeremy Quinn wrote:

yours code is quite different than mine because I use a different 
approach: this is the xml data I Xinclude in all files:


 Indexindex.html
 Toolstools.html
 Partsparts.html
 Circuitcircuit.html
 0101.html
 0202.html
 0303.html
 0404.html
 0505.html
 Linkslinks.html


and this is the xsl code wich generates the link rel things:














bye! and thank you you example gave me inspiration (is it the correct 
english word? boh)

bye
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: inserting comment in html

2002-11-14 Thread Alessio Sangalli

Upayavira wrote:



#exec cgi="/cgi-bin/counter.pl"

should do it.



perfect, thank you and sorry for such a stupid question.

bye
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




inserting comment in html

2002-11-14 Thread Alessio Sangalli
Hi, I'm using cocoon to generate static html for a plain webserver.
However this server has a 'counter' which needs the following code
inside the html:



How can I insert such a string from an xsl trasformation?

bye thank you
as






-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




command line usage - FINALLY SOLVED

2002-11-14 Thread Alessio Sangalli
But not as I expected at the beginning. Instead it's much simpler to
write all the url inside a file:

$ cat url-list
http://localhost:8080/cocoon/lirc/index.html
http://localhost:8080/cocoon/lirc/tools.html
http://localhost:8080/cocoon/lirc/parts.html
http://localhost:8080/cocoon/lirc/circuit.html
http://localhost:8080/cocoon/lirc/01.html
http://localhost:8080/cocoon/lirc/02.html
http://localhost:8080/cocoon/lirc/03.html
http://localhost:8080/cocoon/lirc/04.html
http://localhost:8080/cocoon/lirc/05.html
http://localhost:8080/cocoon/lirc/links.html
http://localhost:8080/cocoon/lirc/pdfgen

and give the following command line:

$ wget -nd -i url-list

what should I say, it's way too difficult to use cocoon from command
line (and not for syntax or semantic problems, but only related to the
system setup) so I use it through a command line browser (wget).

bye
as






-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Using Cocoon from the command

2002-11-13 Thread Alessio Sangalli

boris wrote:


I had to put all this jar to the classpath to work with the cli, without
java-errors. (win98)
I think a sidemap with minimum components don't needs all that stuff to
compile correctly.
A good trick to look into the jar-files is to rename it to a zip-file 
and to
open it with winzip. So you can find, that 'org/apache/log/Priority' 
belongs
to logkit-20020529.jar.


I don't have window but for the tests I used:

for i in `ls *.jar`; do echo "~$i"; jar tvf $i | grep 
KEYWORD; done

to find where needed classes are located.

I've also patched the sources, writing the needed classes inside the 
Manifest file _*IN ONLY ONE ROW*_ and not in that ugly way + updating 
all the filenames, etc (and yes, I've also commented out a lot of stuff 
from sitemap - cocoon.xconf), but I was stopped when I got the following 
error:

Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/servlet/ServletConfig
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
at java.lang.Class.getConstructor0(Class.java:1762)
at java.lang.Class.newInstance0(Class.java:276)
at java.lang.Class.newInstance(Class.java:259)
at 
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:102)
at 
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
at 
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:158)
at org.apache.cocoon.Cocoon.initialize(Cocoon.java:270)
at org.apache.cocoon.Main.main(Main.java:397)

ps I've included in CLASSPATH servlet.jar from common/lib directory of 
tomcat..

I'm frustrated, I don't know what to do. Luckily I have a lot of spare 
time, on the train when I come back from Milan, ... any other 
suggestion? Where can I find this class or whatever it can't find?


bye
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: Using Cocoon from the command

2002-11-13 Thread Alessio Sangalli

Darren Petrie wrote:


Looks like you need to add more to your classpath.  (logkit-20020529.jar)
Try adding all the .jar files in cocoon/WEB-INF/lib to your classpath.



I promise when I'll get this working I will prepare a website with the 
instructions, I thoutgh it would have been much simplier using Cocoon 
from the command line than through a server



bye! thank you
as






-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: link rel=

2002-11-13 Thread Alessio Sangalli

Joerg Heinicke wrote:


Hmm, what exactly do you mean? You request an XML page, but you don't
see anything? Mozilla has no built-in stylesheet by default like IE. But
you can see the source of the document (Ctrl + u).


no, I mean when I reply an email like yours, containing a piece of xml 
code. All your message is quoted, but the lines with code are blank.

bye
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: link rel=

2002-11-12 Thread Alessio Sangalli

Joerg Heinicke wrote:


that's ok ;-) It was more a general statement than a need for the numbers.


:) ok I wanted to be precise!



>  >  Maybe it's an alternative to aggregate the XML source
>  > with the navigation XML.
>
> I don't understand this, could you explain?


example of sitemap aggregation:


I use Mozilla 1.2b. When I quote xml code it doesn't appear. Is this a 
know bug?

Back to aggragation: I see I can use it like a 'multiple generator' now 
I should read the docs/references. There is not so much difference than 
a Xinclude I think, and I'm going to (hopefully) use Cocoon by command 
line to generate static html, pdf, so performance isn't a key feature.

Many thanks, this discussion clarified my ideas!


bye
as




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: Using Cocoon from the command

2002-11-12 Thread Alessio Sangalli


Darren Petrie wrote:

unfortunately, I've talked too early. Althought an invocation with a 
simple --help parameter works, when I try it with all the arguments:

$ java org.apache.cocoon.Main -c 
~/java/jakarta-tomcat-4.1.12-LE-jdk14/webapps -d ~/lirc/cocoon/ -w /tmp/ 
-l ~/lirc/cocoon-log.txt -uINFO -f ~/lirc/uri-list
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/log/Priority
at org.apache.cocoon.Main.main(Main.java:312)

I've tried to patch Manifest.mf in the sources and rebuild, but it's 
always the same... :(

Why such a powerful interface, the command line, should be so difficult 
to use?

bye, thank you...
as




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: link rel=

2002-11-12 Thread Alessio Sangalli

Jeremy Quinn wrote:


what I do to deal with this kind of thing is to have a menu.xml
structure, that is imported into all my pages via CInclude, then xslt


mh, I've never understood the difference between Xinclude and Cinclude...


(having been provided with the 'id' of the page via the sitemap) makes
two structures from the menu.xml, 1) my html navigation 2) the meta
links you mention.


yes, cool; I would like to prepare accurate documentation about the way 
my website was built. This could also be a useful how-to for cocoon 
newbies. If you want to contribute, I'd accept some pieces of code from 
your xsl-transformations...!


 I also output rel="Chapter" (of sub-pages) links so
all nav can be done from the site nav toolbar. Mozilla also handles
rel="Section" and rel="SubSection".



my data is rather simple so I don't need chapters and subchapters. Maybe 
I will use those features in the future, thank you!

bye
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: link rel=

2002-11-12 Thread Alessio Sangalli


Joerg Heinicke wrote:


Exactly the way I would do it. But beware: XSLTs are chached with their
parameters. So it's interesting to know, how many pages you have or how
big the XSLTs are.



$ ls *.xml | wc -l
 12
(to be honest two xml pages are only tests)

$ wc -ml html.xsl
 862055 html.xsl
$ grep -c "  Maybe it's an alternative to aggregate the XML source
> with the navigation XML.

I don't understand this, could you explain?


bye
as




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: Using Cocoon from the command

2002-11-12 Thread Alessio Sangalli


Darren Petrie wrote:

[alesan@valkyrie lib]$ pwd
/home/alesan/java/jakarta-tomcat-4.1.12-LE-jdk14/webapps/cocoon/WEB-INF/lib

[alesan@valkyrie lib]$ export CLASSPATH=".:/home/alesan/java/cocoon-2.0.
.3/build/cocoon/classes/:avalon-framework-20020627.jar:avalon-excalibur-vm1
4-20020705.jar"

[alesan@valkyrie lib]$ java org.apache.cocoon.Main --help

Apache Cocoon 2.0.3
Copyright (c) 1999-2002 Apache Software Foundation. All rights reserved.


Usage: java org.apache.cocoon.Main [options] [targets]


ok now it works. What a chaos however!!!

bye
as




-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




link rel=

2002-11-11 Thread Alessio Sangalli
Hi I've a little problem because I want to automatically generate the 
"link" header (if you use Mozilla, it's very useful, if you want to show 
it: menu -> view - show-hide - site navigation toolbar - show [as needed]).

Here is an example:






I wrote an howto about building a serial IR receiver 
(http://www.manoweb.com/alesan/lirc); there are few pages describing the 
process:
index.shtm
tools.html
parts.html
circuit.html
01.html
02.html
03.html
04.html
05.html
links.html

The above html code sample is from 01.html: "home" links to index.shtm, 
"prev" to circuit.html, "next" to 02.html, "last" to links.html.

Until now I wrote my html by hand but I wanted to automate it with 
Cocoon. It's quite finished (simple xml files trasformed with xsl in 
html (pdf)) but now I need to generate automatically those links in the 
header.

How can I implement it? Perhaps on the sitemap a parameter to the xsl 
transformer wich tells the actual file name; the xsl-t should then check 
it against an xml file where I wrote the exact order of the pages, and 
write the link headers accordingly.

What do you think?
Thank you
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Re: Using Cocoon from the command

2002-11-11 Thread Alessio Sangalli

Ugo Cei wrote:


It SHOULD be possible to just unpack the cocoon.war file from the binary
distribution, cd to WEB-INF/lib and run:

java -jar cocoon-2.0.3.jar

However, the Manifest in the JAR is wrong, since it contains:

Class-Path: avalon-framework-4.1.2.jar avalon-excalibur-4.1.jar batik-
 libs-1.1.1.jar bsf-2.2.jar fop-0.20.3rc.jar jakarta-regexp-1.2.jar js
 tyle.jar logkit-1.0.1.jar rhino-1.5r3.jar xalan-2.3.1.jar xercesImpl-
 2.0.0.jar xml-apis.jar xt-19991105.jar

But the versions of the libraries are not those. For instance, it should
be avalon-framework-20020627.jar instead.


I've tried to modify the MANIFEST file but at the end it didn't work the 
same. It's likely I'm not able to build a JAR, however it seems Cocoon 
can't be used from the command line right now out-of-the-box, am I wrong?

boh
ciao
as





-
Please check that your question  has not already been answered in the
FAQ before posting. 

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



Using Cocoon from the command

2002-11-10 Thread Alessio Sangalli
For the first time in a year and a half I want to use Cocoon from the 
command line. I will be able to use the results in an environment 
without Cocoon or Java and I won't have to generate every time the data 
etc etc.

I use Sun's JDK 1.4.1_01, Cocoon 2.0.3, on Linux.

I've found at least of informations on dejanews and the mail list archives:

http://groups.google.com/groups?q=cocoon+command+line&hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=jPAd8.9020%240C1.767012%40newsread1.prod.itd.earthlink.net&rnum=4

Uh, I should have looked at the code!
I answered my own simple question. For reference:
java -classpath . org.apache.cocoon.Main  --help

-Mark

and:

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=100439206023213&w=2

You can use Cocoon command line interface.

java org.apache.cocoon.Main -c -d  -w \
-l  -uINFO -f

sourcepath : where your cocoon files are, with the sitemap and so on
resultpath : where tour HTML files go
tmppath: a directory for tmp files
logfilename : the log file
list.uris : a file containing the list of URI your want to build using 
Cocoon


good, however WHERE should I give those command lines?

I've never compiled Cocoon by sources because in the early days of the 
2.0beta it was a pain in *** ***, and I used to download the binary 
.war. However this time I had to, because Main.class wasn't avaiable 
anywhere on a binary distribution only.

$ sh build all

will create cocoon.jar but I can't get it working; at best I get a


$ java -classpath . org.apache.cocoon.Main
Exception in thread "main" java.lang.NoClassDefFoundError: 
org/apache/avalon/framework/CascadingException
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
etc etc etc..


I tried to unzip the jar, to go directly inside and call Main.class from 
its own dir, etc


what can I do...!

bye & thank you
as






-
Please check that your question  has not already been answered in the
FAQ before posting. 

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