Hi All.
This is my first post, so don't be angry with me
if I do something wrong.
I am using XSP on Cocoon 2.0.3, and I want to do
the following:
given a name of the htmlfile that contains
javascript, I want to get the result of this javascript and
put it inside some element in XSP. But
/
/map:match
HTH
+Ryan
-Original Message-
From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 21, 2002 7:43 AM
To: [EMAIL PROTECTED]
Subject: Javascript problems in XSP
Hi All.
This is my first post, so don't be angry with me if I do something
wrong.
I am using XSP
No. Look in your cocoon\docs\samples\xsp-js directory,
there are some examples of xsp using Javascript.
You just need to put map:parameter name=programming-language value=js/
into your xsp generator.
- Original Message -
From: Jacob L E Blain Christen [EMAIL PROTECTED]
To: [EMAIL
for automatically creating a
generator - a compiled java class no matter what
language you script your xsp in.
Best of luck,
Geoff Howard
--- Anna Afonchenko [EMAIL PROTECTED] wrote:
Thank you Ryan. Now what I get when I run the
pipeline, what I see is the
result of running the javascript. But what I
Hi. Sorry that I enter your discussion, but I have almost the same problem.
I am trying to read from the html file and output the content as xml.
What I'm writing in xsp is:
xsp:logic
XSPUtil u = new XSPUtil();
String get = u.getFileContents('URL of the file');
/xsp:logic
p This is
it to the client or
transform it ? Give us more info please.
Ludovic
- Original Message -
From: Anna Afonchenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 25, 2002 10:12 AM
Subject: Re: Inserting XML Strings
Hi. Sorry that I enter your discussion, but I have almost the same
Hi all!
I have another question:
I know that HTMLTransformer uses
JTidy to convert to valid HTML.
But I need to set some more options.
For example, in HTMLTidyI can
use boolean option output-xhtml to
produce valid xhtml, or boolean option
quote-marks set to yes to convert all
single quotes
25 November 2002 13:19, Anna Afonchenko wrote:
Hi all!
I have another question:
I know that HTMLTransformer uses JTidy to convert to valid HTML.
But I need to set some more options.
AFAIK the info at
http://outerthought.net/wiki/Wiki.jsp?page=HTMLGenerator
is still valid, you might need
: Monday, November 25, 2002 3:09 PM
Subject: Re: HTML Tidy question
On Monday 25 November 2002 14:00, Anna Afonchenko wrote:
Sorry for being stupid, but I've been to this page before, and I still
don't understand how can I improve HTMLGenerator to allow more
Tidy options to be set
Hi Geoff. Thank you for your help, I appreciate this very much.
I tried the code that you suggested, and I have a few questions/issues:
1. First of all I tried to give the eval() function some simple string that
I declared inside the xsp:logic tag: someStr =
document.write('centerHello/center');
Hi Ludovic.
You were right. The file wasn't valid XML file.
Can you please tell me where I can find the list of all util:tags?
I can't find the complete list anywhere.
Thanks for your help.
Anna
- Original Message -
From: Ludovic de Beaurepaire [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Hi All. It's me again
:-)
Thank you all for answering my
previous questions. You are great!
So I have another question (this one
is probably stupid):
I want to execute some Javascript
file (some.js) through Cocoon pipeline
the code ofthis some.js
file is:
!--
document.write('Hello
below)
--- Anna Afonchenko [EMAIL PROTECTED] wrote:
1. First of all I tried to give the eval() function
some simple string that
I declared inside the xsp:logic tag: someStr =
document.write('centerHello/center');
If I write this string inside the
xsp:exprdocument.text/xsp:expr, the
output
What do you mean by neat?
Sorry if this is an unrelated question
- Original Message -
From: Jacob L E Blain Christen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 10:23 PM
Subject: Re: Javascript problems in XSP
hey that's neat!
Do you mean that I need to download another version of CVS (say, from
today)?
I also want to do a few changes to the source code before recompiling (I
want to add some Jtidy methods to HTMLGenerator - is it OK to do that?)
- Original Message -
From: Antonio Gallardo [EMAIL PROTECTED]
To:
/route/to/jakarta-tomcat/webapps installwar
I hope it will help.
Regards,
Antonio Gallardo.
Anna Afonchenko dijo:
Do you mean that I need to download another version of CVS (say, from
today)?
I also want to do a few changes to the source code before recompiling (I
want to add some Jtidy methods
Hi All.
Another question:
I neeed to pass to XSP some file that
was evaluated previously in some pipeline (can pass it as a string), something
like:
map:generate
src=""
map:parameter
name="content" value="cocoon:/file.html"/
/map:generate
If I use cinclude inside XSP, I can
do nothing
Thanks for the information, Jacob.
Can you tell me where can I find the updated jars?
Thanks for help
Anna
- Original Message -
From: Jacob L E Blain Christen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 27, 2002 6:22 PM
Subject: Re: cvs HEAD bombing out of
Hi all.
I have a very simple and stupid
question.
In the 2.0.4 version of cocoon the
HTMLGenerator now can accept a JTidy configuration file.
The example that is given in the user
documentation is:
map:generator type="html"
src=""
jtidy-configjtidy.properties/jtidy-config
/map:generator
Hi all.
I have an xsl stylesheet that uses a
few saxon extension functions.
When I was applying this stylesheet
on an xml file through command line, everything worked,
but now I am trying to run it through
Cocoon, and I get the message:
The XML page cannot be displayed
Cannot view XML
a fresh cocooon
with saxon support and a little bit more, but it is currently
an internal document. I'm still workming on it ;-)
good luck,
hussayn
Anna Afonchenko wrote:
Hi all.
I have an xsl stylesheet that uses a few saxon extension functions.
When I was applying this stylesheet on an xml
: Configuring JTidy
should be in a file called jtidy.properties in the same directory as the
sitemap? the properties file style would contain each name=value pair on a
separate line.
Geoff Howard
-Original Message-
From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 4
Hi all.
I am getting html file, transform it
and serialize the output as xml.
In the output I get a few lines like
this:
?javax.xml.transform.disable-output-escaping ?
I get this line only if I use
xsl:text tag with disable-output-escaping attributein my
stylesheet.
Can somebody explain
properties ?
quote-marks=yes
uppercase-tags=no
doctype=transitional
regards, hussayn
Anna Afonchenko wrote:
Maybe I do something wrong, but I don't get the result that I want.
I declared the HTMLGenerator with jtidy-config property and created the
jtidy.properties
file in the same directory
I downloaded a new version 2.0.4 of Cocoon this week.
If I change the name of the file in jtidy-config to unexisting file, I get
the following error message:
type fatal
message UnnamedSelector: ComponentSelector could not find the component for
hint [html]
description
I have the following
question:
I know that in Cocoon I can use value
substitution inside a pipeline, e.g. if I have a pipeline
map:pipeline
map:match
pattern="*/*.html"
map:generate
src=""/
map:transform
src=""
map:parameter name="param" value="{1}"/
/map:transform
/map:match
Hello All!
I know that today I ask too many
questions, but since cocoon is new to me,
sometimes I don't even know where to
look for the information, so you are my only help.
Thanks for everyone who took time to
answer my questions. Here is another one:
At the end of the pipeline the result
re about
it.
Hope a better solution exists...
Ludovic
- Original Message -
From:
Anna
Afonchenko
To: cocoon-users
Sent: Tuesday, December 17, 2002 2:19
PM
Subject: Writing output of pipeline to
a file
Hello All!
I know t
OK, thank you, I now understand how to set a doctype.
But what about other settings, like converting quotes to entities.
Not that I need it so much, but I am just curious, why this doesn't work
through
jtidy-config. I just want to know if that's me doing something wrong, or
maybe this is some
Lenya
I tried your example, it prints the parameter for me.
You may have a typo in expression
xsl:value-of select=param
should be
xsl:value-of select=$param
At least, this is the only reason I see.
Anna
- Original Message -
From: Lenya L. Khachaturov [EMAIL PROTECTED]
To: [EMAIL
uration,
so finally i did it in my Action who had to generate the XML.
If you have to duplicate your XML stream, one for
saving, another for the client, i thinkyou have to do this in an action.
It generates the XML file and this one is next
transformed/serialized.
map:match
a little strange what you are trying to do though...
Regards,
Konstantin
- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Tuesday, December 17, 2002 14:55
Subject: value-substitution in Cocoon
I have the following question:
I know that in Cocoon I can use value
-substitution in Cocoon
Hi Anna and Team!
CC-ing this message to Cocoon Dev list, cause it raises a more general
requirement for possibility to combine input modules with other input
modules in sitemap substitution values (see below for a use-case).
From: Anna Afonchenko [EMAIL PROTECTED
Hi all.
I am exploring the action
possibilities in Cocoon now, and I wanted to test some actions.
I took sample action class
RandomAction.java (from book "Cocoon:Building XML Applications" by
Langham Ziegeler), changed the package name to ub, and copied this
file into ub directory under
of
cocoon.
Regards,
Elmar
-Ursprüngliche Nachricht-Von:
Anna Afonchenko [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18.
Dezember 2002 11:22An: cocoon-usersBetreff: problem in
writing Actions
Hi all.
I am exploring the action
possibilities in Cocoon now, and I
t solution is saving these datas in file in an
Action, and use this file for transformation.
Ludovic
- Original Message -
From:
Anna
Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 8:44
AM
Subject: Re: Writing output o
a transformer (in
XSL with redirection or in Java), localized after your transformer in the
pipeline. This onedoes not transform XML datas, but copy (not redirect)
them in a file.
Ludovic
- Original Message -
From:
Anna
Afonchenko
To: [EMAIL PROTECTED
.
This one does not transform XML datas, but copy (not redirect) them in a
file.
Ludovic
- Original Message -
From: Anna Afonchenko
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 11:57 AM
Subject: Re: Writing output of pipeline to a file
Thank you Ludovic.
Just to ensure that I got
Hi all.
Another question for
today:
I wrote a small xsl that matches p
nodes from the input and prints their content.
I wrote it like this:
xsl:template
match="/"
xsl:for-each
select="//p"
xsl:textContent of this tag is /xsl:text
xsl:value-of select="."/
/xsl:for-each
/xsl:template
Cocoon: run Xalan from
the command line with your XML as input and see what happens.
Konstantin
- Original Message -
From: Anna Afonchenko
To: cocoon-users
Sent: Wednesday, December 18, 2002 16:01
Subject: XPath problem in Cocoon?
Hi all.
Another question for today:
I wrote a small xsl
for answering my questions
Anna
- Original Message -
From: Martin Holz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 18, 2002 2:45 PM
Subject: Re: Configuring JTidy
Anna Afonchenko [EMAIL PROTECTED] writes:
OK, thank you, I now understand how to set a doctype
Hi All.
Ok, I hope this is the last question
for today.
In my xsl stylesheet I use some java
extension class ParseTagContent.class.
In my xsl I have declared
xmlns:java="xalan://ParseTagContent"
The class ParseTagContent.class is in
the same directory with the xsl.
When I run this xsl
,
-
Luca Morandini
GIS Consultant
[EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-
-Original Message-
From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December
]
http://utenti.tripod.it/lmorandini/index.html
-
-Original Message-
From: Anna Afonchenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 19, 2002 8:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: XPath problem in Cocoon
Hi all. I am trying to create a stylesheet using
cocoon and then apply this stylesheet to some input. I need to declare a root
element with different namespace declarations.
When I was using batch file instead of Cocoon, I
just wrote it as a string, e.g.:
xsl:text
file?
in my case i want instead of your test.html to have xslInstructions.xml
On Mon, 23 Dec 2002, Anna Afonchenko wrote:
Hi Stavros.
Here are my pipelines for using xsl generated through Cocoon:
map:match pattern=try
map:generate src=ub/violations.html/
map:transform type=xslt-saxon
that
map:transform src=cocoon:/generateXSL/ return an empty .xsl file)
maybe we need the cocoons guru help :-)
stavros
(what a problem 2 days before christmas )
On Mon, 23 Dec 2002, Anna Afonchenko wrote:
Stavros
What happens if you try to generate your xsl outside cocoon (using batch
file
Hi All!
I want to get the http request that will provide
me the URI of the file to generate (and transform).
E.g., the request that I should get will be
something like cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
My pipeline is as following:
map:match pattern="test/**"
map:generate
.
_The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
found_
Where does the ub come from?
Regards,
Joerg
Anna Afonchenko wrote:
Hi All!
I want to get the http request that will provide me the URI of the file
to generate (and transform).
E.g., the request that I should get
Hi All.
I am writing xsl file that will catch some nodes
(according given XPath) and will output these nodes
as a string.
Here is the code snippet that outputs the
matching node:
xsl:textlt;/xsl:text
xsl:value-of
select="concat(name(),' ')"/
xsl:for-each
select="@*"
xsl:value-of
that something is differently
resolved, if it's only 1 slash.
_The requested URI /cocoon/ub/xml.apache.org/faq-xslt.html was not
found_
Where does the ub come from?
Regards,
Joerg
Anna Afonchenko wrote:
Hi All!
I want to get the http request that will provide me the URI of the file
Hi all. I use an HTMLGenerator to tidy up the
pages that I load, and I encountered a very strange behaviour concerning
scripts. This is my input file:
test.html
html
head
titleTesting
JTidypage/title
/head
body
pThis is
test/p
table
tr
tdHello world/td
/tr
script
is ok. We encountered many similar problems with JTidy.
In your case JTidy gets especially confused by tr and td in the
script. Maybe you must fix these pages by hand. Does CDATA exist in
HTML?? If yes, maybe this helps.
Regards,
Joerg
Anna Afonchenko wrote:
Hi all. I use an HTMLGenerator
Hi all.
I am using RequestParameterAction to process
parameters given in http request.
My http request looks something like
this:
http://localhost:8080/cocoon/test?[EMAIL PROTECTED]
here is my pipeline:
map:match pattern="test"
map:act
type="request"
map:parameter name="parameters"
Hi all.
Happy New 2003Year to
everyone!
Here is my first question this year
:-)
I have a small xsl stylesheet that takes in xml
and outputs html.
Since the output method is html, xsl puts in the
output the following meta tag:
meta http-equiv="Content-Type"
content="text/html;
Hi all.
I noticed that if I have pipeline like
this:
map:match pattern="load"
map:generate
src="" type="html"/
map:serialize type="html"/
/map:match
Some of the images on the pageare not loaded, because
they have a relative rather than absolue src,
e.g. something like src="" instead of
the AugmentTransformer handle this?
Quoting Anna Afonchenko [EMAIL PROTECTED]:
Hi all.
I noticed that if I have pipeline like this:
map:match pattern=load
map:generate src=http://xml.apache.org/cocoon; type=html/
map:serialize type=html/
/map:match
Some of the images on the page are not loaded
Hi all.
I need an advice.
I am using HTMLGenerator to tidy the html files
that are requested.
Since JTidy sometimes messes up the original
file (like with scripts inside tables - I posted
a message about it few weeks ago), I
would want to preprocess the original html file
before passing it
at or Cocoon.
Our question is obviously what is the problem,
and how do we go about solving it?
Thank you very much for your help
Anna Afonchenko
Spencer Bruce
PS we will be pleased to supply code snippets,
but we think that any case as described above will cause the
problem
Hi all.
This is not really a Cocoon problem, but maybe
you can help me with this.
I havethe followingXHTML
page:
!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
html xmlns="http://www.w3.org/1999/xhtml"
head
titlePage/title
link
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:html=http://www.w3.org/1999/xhtml;
xsl:template match=node()|@*
xsl:copy
xsl:apply-templates select=node()|@* /
/xsl:copy
/xsl:template
xsl:template match=html:link[@rel='stylesheet']/
/xsl:stylesheet
Regards,
Joerg
Anna Afonchenko
. The system is a
linux box.
I can modify the workers.properties file so that
it mounts http://domain.name/ub to tomcat
and then put a symbolic link in the tomcat web-apps directory to /home/cocoon/ub
but this is both an ugly and not very stable solution.
Thank you very much for your help
Anna
Hi all. I am not sure that this message is
related to Cocoon, so I apologize,
if this is not appropriate here.
I have a very simple html -
test.html:
html
head
titleTest anchors/title
/head
body
ptest anchors/p
a href=""One/a a
href=""Two/a
divseparator/div
a href=""One1/a
br /
a
Derek
I don't get any error message, at least not in
WEB-IN/logs/error.log
I get an xml document in the browser:
?xml
version="1.0" encoding="utf-8" ?
root /
i.e., the stylesheet was applied successfully, it just
didn't match anything.
Maybe my XPath expression is wrong, but then how
I tried it with XPathVisualizer tool, and it gives
right result.
But when I tried to run the stylesheet through the
batch file using Saxon, I also
got empty result.
So I am really confused.
Maybe somebody can suggest another XPath to accomplish
this?
I want to choose all a tags for which
I tried it with XPathVisualizer tool, and it gives
right result.
But when I tried to run the stylesheet through the
batch file using Saxon, I also
got empty result.
So I am really confused.
Maybe somebody can suggest another XPath to accomplish
this?
I want to choose all a tags for which the
will be
suppressed, or what else ? ...
And perhaps I didn't
understood what you want to get exactly ...
Laurent.
-Message d'origine-De: Anna Afonchenko
[mailto:[EMAIL PROTECTED]]Envoyé: jeudi 20 février 2003
12:57À: cocoon-usersObjet: Re: XPath
proble
Robert
You need to create file jtidy.properties and put it into your cocoon
directory (together with sitemap.xmap file).
In this file you set all the tidy properties that you need, e.g.:
output-xml=yes
output-xhtml=no
etc.
In sitemap you need to edit the HTMLGenerator configuration to check the
=xml/
/map:match
I would be happy to hear any suggestions.
Thank you very very much for help.
Anna
- Original Message -
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 20, 2003 11:16 PM
Subject: Re: XPath problems in Cocoon?
Anna Afonchenko wrote
: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 9:21 PM
Subject: Re: XPath problems in Cocoon?
Anna Afonchenko wrote:
But when I tried to apply this stylesheet using cocoon, I still got the
empty root element root/ as a result.
That's because strip-space doesn't
::*][1][self::a]]
First all non-whitespace-character text nodes and all elements are
selected. From these one the first one is tested to be an a/.
Regards,
Joerg
Anna Afonchenko wrote:
Thanks for answering
I agree that my expression is not the cleanest, but it doesn't work in
cocoon anyway
Hi all
I have a pipeline that processes some
url.
map:match
pattern="testing/**
map:generate src=""
href="http://{1}">http://{1} type="html"/
map:transform src=""/
map:serialize type="xml"/
/map:match
I.e. I get some html
page, generate it, run an xsl and serialize. Nothing
Thank you Michael.
Actually, I just need to write {../1}{requestQuery} instead of
{1}{requestQuery}
Thanks for your help.
Anna
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 4:18 PM
Subject: Re: Problem with 'request parameters'
Hi all.
I have written my own transformer, thatgets
in an XML file as a parameter.
If I declare the parameter in the transformers
bit:
map:transformer
name="xsl5complete"src=""
parameter name="xsl5"
value="xsl5new.xml"/
/map:transformer
and then call it in the pipeline:
map:transform
74 matches
Mail list logo