RE: have serialized xml use doctype?

2002-05-06 Thread Matthieu Benéteau

This is a very good idea. I had the same need, and you have solved my
problem.
Thanks !!

Matthieu

PS : here is a Xalan/C2 bug which may be related to this problem :
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1121



 Thanks for the link.  Xalan/C2 doesn't seem to like xsl:output
 doctype-public=... too much. However, the page you posted let me to
 another solution that works as well:

 xsl:text disable-output-escaping=yes
 ![CDATA[
   !DOCTYPE ...
 ]]
 /xsl:text

 ...hope that helps anyone that might be having the same problem.

 -Zack


 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, May 05, 2002 3:43 PM
 To: [EMAIL PROTECTED]
 Subject: Re: have serialized xml use doctype?

 Zack Angelo wrote:
  I'm generating XML that is to be fetched by an external browser. In
 the
  serialized XML file, I need it to specify a DTD to use.how do I do it?


 Check the xsl:output element
   http://www.w3.org/TR/xslt#output
 add doctype-system and doctype-public as needed.

 J.Pietschmann


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

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




RE: dispatch to new window in web browser possible?

2002-05-03 Thread Matthieu Benéteau

Have a look at this tutorial :
http://tech.irt.org/articles/js128/index.htm

It's quite helpful.

Regards,
Matthieu

 -Message d'origine-
 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Envoyé : vendredi 3 mai 2002 08:25
 Objet : dispatch to new window in web browser possible?


 Currently my application consists of cocoon-actions that invoke xsp/xsl
 files upon requests. As normal the new output always refreshes
 the client's
 browser view.
 Based on some calculations at the actions I'm required to delegate the
 response not to the current browser window but to a newly opened
 browser window.
 An examle would be a printable view of a web page. Is this possible with
 cocoon2? How could I accomplish it?

 Thanks for your comments!

 Harald



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

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




RE: Cocoon use

2002-04-26 Thread Matthieu Benéteau

 People,

 I would like to know why you use Cocoon?

 Thank you,

 Edgar


Hi,

I heard about Cocoon when I was searching a solution to a very precise
problem.

The client for whom I'm working uses lots of XML files to define the
characteristics of numerous parameters representing an engine. It looks like
a database, but unfortunately it's not a database. Just a big set of XML
files using a little set of DTDs.

The problem was : to allow someone, who doesn't know XML at all, to edit and
modify the content of these files in an easy way. We could have developed a
specific editor in C++, but the DTDs are still evolving a lot, and there was
also a big need to generate other formats of documents, such as HTML and
XLS.

I first wrote a few XSL stylesheets in order to visualize the content of the
XML files in a nice way, in a web browser (I used IE6). Then I heard about
Cocoon and realised that it could feed my needs, with a little help from
JavaScript.

I now have a nice Cocoon-based editor working in my web browser :
I can display the content of the XML files in HTML pages, edit and modify
them dynamically thanks to HTML forms, and make lots of specific search
requests. It works like a web site, with several sub-sections and lots of
automatically generated hyperlinks. And it's easy to use.

When a DTD is modified, I do not need to recompile anything : I just modify
the corresponding XSL stylesheets and JavaScript scripts. Indeed, it's
really efficient and easily maintainable. And my client is happy ! :)


Matthieu


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

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




RE: Aggregation sample

2002-04-19 Thread Matthieu Benéteau

Hi Volker,


 I have the following pipeline:

map:match pattern=Agg
  map:aggregate element=site
map:part type=file element=part1 src=prototyp/part1.xml/
map:part type=file element=part2 src=prototyp/part2.xml/
  /map:aggregate
  serialize type=xml/
^
I think this element won't be recognized correctly if your default namespace
is not the map namespace. You should replace it with map:serialize.

Regards,
Matthieu

/map:match

 File part1.xml:

 ?xml version=1.0 encoding=UTF-8?

 head
 This is part1
 /head

 File part2.xml:

 ?xml version=1.0 encoding=UTF-8?

 head
 This is part2
 /head

 in the protyp directory below cocoon (that's the location where all my
 xml-files reside on, I also tried it on my local drive with the complete
 path).

 Maybe you can help me?

 Thank you, best regards
 - Volker -

 -Original Message-
 From: Torsten Curdt [mailto:[EMAIL PROTECTED]]
 Sent: Freitag, 19. April 2002 09:35
 To: [EMAIL PROTECTED]
 Subject: Re: Aggregation sample


 On Fri, 19 Apr 2002, Volker Schneider wrote:

  Hi colleagues,
 
  does anybody have a simple aggregation sample where two xml files from
  filesystem are aggregated together?

 Did you have a look into the samples yet?

 aggregate
   part ...
   part ...
 /aggregate

 set up a internal pipeline for the files and use this pipeline in the
 parts...

  Documentation says aggregation is simple - I don't think so...

 It is ;-)
 --
 Torsten


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

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


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

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





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

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




RE: if XSL templates includes another one, then updating the second one will not be detected by Cocoon

2002-04-19 Thread Matthieu Benéteau

 I'm debugging XSL templates. So, when I change the included template, but
 don't change the template which includes it, then Cocoon will not 
 detect it,
 and return me the old results.
 
 I simply re-save the including template. Is there any other way?

I don't think so.

Matthieu

 
 thanks,
 Argyn
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

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

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




RE: Dynamic forms

2002-04-18 Thread Matthieu Benéteau

This is not a Cocoon2 but a DHTML issue.
You have to use JavaScript.

Try this tutorial page :
http://www.pageresource.com/jscript/jforms.htm

Regards,
Matthieu


 -Message d'origine-
 De : Cocoon Newbie [mailto:[EMAIL PROTECTED]]
 Envoyé : mercredi 17 avril 2002 22:31
 Objet : Dynamic forms


 Has anyone been able to create a form where the validation rules for
 some fields dynamically change based on selections made in other fields?
 For example, postalcode would be validated differently based on the
 choice of country? Any ideas would be appreciated.

 Thanks,

 Ed


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

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





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

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




RE: Dynamic forms

2002-04-18 Thread Matthieu Benéteau

Hi Ed,

Sorry, I hadn't really understood what you meant.
Well, I found it easier to process all the form validations on the client
side, because I have large forms with lots of elements. I check and process
them before sending, so the server task is far lighter.

I haven't tried the server-side validation.

Regards,
Matthieu


 I see your point, however since the validation is done on the server
 rather than on the client, I was hoping it to be something that Cocoon
 could accomplish.

 I have played it with it some more and am stuck on the last mile. I
 can switch the validation rules, however, I still need to figure out how
 to reset the validation results from the prior validation attempt before
 re-submitted results are validated again. Otherwise, the validator seems
 to remember the prior validation result for the field, validation rule
 of which has changed, and fails it.

 Regards,

 Ed

 Matthieu Benéteau wrote:

 This is not a Cocoon2 but a DHTML issue.
 You have to use JavaScript.
 
 Try this tutorial page :
 http://www.pageresource.com/jscript/jforms.htm
 
 Regards,
 Matthieu
 


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

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




RE: Encoding question

2002-04-17 Thread Matthieu Benéteau

Hi Heike,

I use these declarations in my sitemap :

  map:serializer name=xmlmime-type=text/xml
logger=sitemap.serializer.xml
  src=org.apache.cocoon.serialization.XMLSerializer
  pool-max=32 pool-min=16 pool-grow=4
encodingiso-8859-1/encoding
  /map:serializer

  map:serializer name=html   mime-type=text/html
logger=sitemap.serializer.html
  src=org.apache.cocoon.serialization.HTMLSerializer
encodingiso-8859-1/encoding
  /map:serializer

and it's all perfect.

Matthieu



 -Message d'origine-
 De : Franosch, Heike [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 16 avril 2002 18:33
 Objet : Encoding question


 Hi all,

 is it possible to set the output encoding?
 I always get a UTF-8, even if I set output encoding to iso-8859-1
 in my stylesheet. Can I influence it somehow in the sitemap?

 Thanks, Heike

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

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





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

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




RE: [C 2.0.3] adding and removing namespaces

2002-03-29 Thread Matthieu Benéteau

 I tried to use exclude-result-prefix in Cocoon to remove a
 ^^
 namespace.  It doesn't work.

Note that the namespace will only be excluded in the output. It will still
be available during the XSL transformation.
This works fine with Cocoon 2.0.2.

 Is there a way to add and remove namespaces in an xsl file?

Why would you like to do that ?

Matthieu


 I'm using Cocoon the latest CVS HEAD.



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

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




RE: SourceWritingTransformer : Cannot get 'xml' serializer

2002-03-27 Thread Matthieu Benéteau

Sorry for being long, I'm just beginning my day.
( 09:40 AM in France :)

I have simply replaced FileWritingTransformer with
SourceWritingTransformer in the sitemap :

1.  map:transformer name=tofile
logger=sitemap.transformer.tofile

src=org.apache.cocoon.transformation.SourceWritingTransformer
  map:parameter name=serializer  value=xml/
/map:transformer

2.  map:match pattern=project/test-write
  map:generate src=test/test-write.xml/
  map:transform type=tofile/
  map:serialize type=xml/
/map:match

3. Inside test-write.xml :

?xml version=1.0 encoding=iso-8859-1?
product xmlns:source=http://apache.org/cocoon/source/1.0;
   functionBlockList
  functionBlock.../functionBlock

  source:write src=test/result-write.xml
functionBlock content /functionBlock
  /source:write

  functionBlock.../functionBlock
  functionBlock.../functionBlock
   /functionBlockList
/product

This used to work with FileWritingTransformer.

Here is my XML serializer declaration :

  map:serializer name=xmlmime-type=text/xml
logger=sitemap.serializer.xml
  src=org.apache.cocoon.serialization.XMLSerializer
  pool-max=32 pool-min=16 pool-grow=4
encodingiso-8859-1/encoding
  /map:serializer


Thanks,
Matthieu


 -Message d'origine-
 De : Jeremy Quinn [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 26 mars 2002 18:43
 Objet : Re: SourceWritingTransformer : Cannot get 'xml' serializer


 At 6:18 pm +0100 26/3/02, Matthieu Benéteau wrote:
 Hi,
 
 I've just installed Cocoon 2.0.2 on Tomcat 4.0.1, and it works
 perfectly :).
 But I've encountered a problem using the scratchpad's
 SourceWritingTransformer.
 
 I used to use revision 1.6 of the old FileWritingTransformer.
 I've just changed xfwt into source and tested it, and I've
 received the
 following error :
 
action: none
result: failed
error message : could not get a ContentHandler and failed to cancel

 May I see the setup you used?

 1. Declaration of SourceWritingTransformer in the SiteMap
 2. Usage of the SourceWritingTransformer in the SiteMap
 3. The actual tag you generate to trigger SourceWritingTransformer

 Here are the 2 exceptions of the sitemap.log :
 
 WARN(2002-03-26) 17:40.48:760
 [sitemap.transformer.tofile](/myproject/request)
 HttpProcessor[8080][0]/SourceWritingTransformer: failed, could not get a
 ContentHandler
 org.apache.cocoon.ProcessingException: Cannot get 'xml' serializer

 Do you have a serializer set up called 'xml', maybe you removed
 the default
 from the main sitemap?


 Thanks in advance,
 Matthieu

 Thanks for trying this out.

 regards Jeremy
 --
___

Jeremy Quinn   Karma Divers
webSpace Design
 HyperMedia Research Centre

mailto:[EMAIL PROTECTED]
http://www.media.demon.co.uk
   phone:+44.[0].20.7737.6831 pager:[EMAIL PROTECTED]

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

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




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

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




RE: XML namespaces and result of RequestGenerator

2002-03-27 Thread Matthieu Benéteau

Hi Volker,

Here is the mail that gave me the answer :
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=100349922300307w=2

Actually, you have to declare the request namespace in your stylesheet :

xmlns:request=http://xml.apache.org/cocoon/requestgenerator/2.0;

then you match the request elements this way :

xsl:template match=request:request
  ...
/xsl:template

xsl:template match=request:requestParameters
  ...
/xsl:template

and so on.


Regards,
Matthieu


 -Message d'origine-
 De : Volker Schneider [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 26 mars 2002 23:33
 À : [EMAIL PROTECTED]
 Objet : RE: XML namespaces and result of RequestGenerator


 Hi Matthieu,

 I don't find this a silly question, because I have exactly this
 problem and
 I'm searching a solution for hours. Please tell me the solution.

 Best regards
 - Volker -

 -Original Message-
 From: Matthieu Benéteau [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 21. März 2002 19:10
 To: Cocoon-Users
 Subject: RE: XML namespaces and result of RequestGenerator


 Sorry, this was a silly question, and I found the answer in the archives.
 My mistake.

 Matthieu



  -Message d'origine-
  De : Matthieu Benéteau [mailto:[EMAIL PROTECTED]]
  Envoyé : jeudi 21 mars 2002 18:46
  À : Cocoon-Users
  Objet : XML namespaces and result of RequestGenerator
 
 
  Hi,
 
  I have a little but annoying problem with the result of the
  RequestGenerator : during the XSL transformation I can't match
  any of the request elements (I can't even match the root
  request element).
 
 
  For instance :
 
?xml version=1.0 encoding=iso-8859-1?
xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 
  xsl:template match=/
one
  xsl:value-of select=request/@target/
  xsl:apply-templates
  select=request/requestParameters/parameter/
  xsl:apply-templates/
/one
  /xsl:template
 
  xsl:template match=parameter
contentinside parameter body/content
  /xsl:template
 
/xsl:stylesheet
 
  will result in an empty element : one/.
 
 
  But on the other hand, if I use the following template :
 
  !-- by default, copy everything as is --
  xsl:template match=@*|node()
xsl:copy
  xsl:apply-templates select=@*|node()/
/xsl:copy
  /xsl:template
 
  the one element contains the whole request.
 
 
  I suppose it's a namespace problem. The transformer doesn't seem
  to match elements with the
  xmlns=http://xml.apache.org/cocoon/requestgenerator/2.0;
  namespace declaration.
 
  Has anyone an idea ?
 
 
  Matthieu
 


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

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


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

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





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

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




RE: SourceWritingTransformer : Cannot get 'xml' serializer

2002-03-27 Thread Matthieu Benéteau

It's working !  :)
Thanks a lot.

Matthieu


 -Message d'origine-
 De : Jeremy Quinn [mailto:[EMAIL PROTECTED]]
 Envoyé : mercredi 27 mars 2002 11:26
 Objet : RE: SourceWritingTransformer : Cannot get 'xml' serializer


 At 9:55 am +0100 27/3/02, Matthieu Benéteau wrote:
 1.  map:transformer name=tofile
 logger=sitemap.transformer.tofile
 
 src=org.apache.cocoon.transformation.SourceWritingTransformer
   map:parameter name=serializer  value=xml/
 /map:transformer


 the serialize parameter is wrong, try this:

   map:transformer name=tofile logger=sitemap.transformer.tofile

 src=org.apache.cocoon.transformation.SourceWritingTransformer
 --   serializerxml/serializer
   /map:transformer

 Why there is this different syntax for setting up, I am not sure.

 Hope this helps

 regards Jeremy
 --
___

Jeremy Quinn   Karma Divers
webSpace Design
 HyperMedia Research Centre

mailto:[EMAIL PROTECTED]
http://www.media.demon.co.uk
   phone:+44.[0].20.7737.6831 pager:[EMAIL PROTECTED]

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

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




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

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




SourceWritingTransformer : Cannot get 'xml' serializer

2002-03-26 Thread Matthieu Benéteau

Hi,

I've just installed Cocoon 2.0.2 on Tomcat 4.0.1, and it works perfectly :).
But I've encountered a problem using the scratchpad's
SourceWritingTransformer.

I used to use revision 1.6 of the old FileWritingTransformer.
I've just changed xfwt into source and tested it, and I've received the
following error :

   action: none
   result: failed
   error message : could not get a ContentHandler and failed to cancel


Here are the 2 exceptions of the sitemap.log :

WARN(2002-03-26) 17:40.48:760
[sitemap.transformer.tofile](/myproject/request)
HttpProcessor[8080][0]/SourceWritingTransformer: failed, could not get a
ContentHandler
org.apache.cocoon.ProcessingException: Cannot get 'xml' serializer
at
org.apache.cocoon.components.source.AbstractStreamWriteableSource.getContent
Handler(AbstractStreamWriteableSource.java:168)
at
org.apache.cocoon.transformation.SourceWritingTransformer.startElement(Sourc
eWritingTransformer.java:293)
at
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.j
ava:858)
[...]

WARN(2002-03-26) 17:40.48:810
[sitemap.transformer.tofile](/myproject/request)
HttpProcessor[8080][0]/SourceWritingTransformer: failed to cancel:
file:/D:/path/to/myfile.xml
java.lang.IllegalArgumentException: The handler is not associated to this
source
at
org.apache.cocoon.components.source.AbstractStreamWriteableSource.cancel(Abs
tractStreamWriteableSource.java:137)
at
org.apache.cocoon.transformation.SourceWritingTransformer.startElement(Sourc
eWritingTransformer.java:299)
at
org.apache.xalan.transformer.ResultTreeHandler.flushElem(ResultTreeHandler.j
ava:858)
[...]


Does anyone know what mistake I've made ?


Thanks in advance,
Matthieu


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

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




RE: Re: XSL question

2002-03-25 Thread Matthieu Benéteau


 Hi Mauri,

 I couldn't forget ;).

Neither could I :).

You can also include both stylesheets and differentiate the templates with
the mode attribute of xsl:template ... /. Then you choose the stylesheet
depending on the value of a parameter (xsl:param ... /), and call the
templates with xsl:apply-templates mode=desired-mode/.

Another way to perform what you want is to include the first stylesheet with
xsl:include ... / and import the second one with xsl:import ... /. Then
you call either xsl:apply-templates ... / or xsl:apply-imports ... /
depending on the value of your parameter.

Have a look at the following tutorial :
http://www.w3schools.com/xsl/xsl_w3celementref.asp,
it's not very detailed but quite useful.


Regards,
Matthieu


 Perhaps you could not *include* the stylesheet but do a second
 transformation after your first one. Depending on your parameter you could
 insert a new processing instruction to do the transformation
 you'd like. It
 could look like

 Kai





 Martin

 Mauri   An:
 [EMAIL PROTECTED], Richard Korthuis
 mmauri@profe[EMAIL PROTECTED]

 si.com.ar   Kopie:

  Thema:  Re: XSL question

 25.03.02

 17:21

 Bitte

 antworten an

 cocoon-users









 Ok, forget it anyway. Here goes another. Does anyone remember how
 to define
 entities inside an xml file without the need of declaring the use
 of a DTD?

 thanks!
  - Original Message -
  From: Richard Korthuis
  To: [EMAIL PROTECTED]
  Sent: Monday, March 25, 2002 12:42 PM
  Subject: Re: XSL question

  Hello,

  What is this outside source? Are you calling the xml with a param (
  http:///index.xml?param=something) or are you passing this parameter
  in some other way?

  Richard
  - Original Message -
  From: Martin Mauri
  To: [EMAIL PROTECTED] ; Richard Korthuis
  Sent: Monday, March 25, 2002 3:40 PM
  Subject: Re: XSL question

  Dear Richard,

  I understand what you say, but here the problem is if I can get a
  parameter from an outside source, right?
   - Original Message -
   From: Richard Korthuis
   To: [EMAIL PROTECTED]
   Sent: Monday, March 25, 2002 11:32 AM
   Subject: Re: XSL question

   A while ago I made an XML (Cocoon 1.8) which requested a
 parameter passed
   on from a form on a webpage. Maybe you can try something
 similar for your
   XSL?

   xsp:page language=java  xmlns:sql=http://www.apache.org/1999/SQL;
xmlns:xsp=http://www.apache.org/1999/XSP/Core;
xmlns:request=http://www.apache.org/1999/XSP/Request;

   dates
sql:execute-query
 
 
 sql:querydelete from rooster where
 uniek='request:get-parameter name
   =uniek/'
 /sql:query
/sql:execute-query
   /dates

   /xsp:page

   Regards

   Richard Korthuis
- Original Message -
From: von Schwerdtner, Thomas (GXS, FPI)
To: '[EMAIL PROTECTED]'
Sent: Monday, March 25, 2002 3:13 PM
Subject: RE: XSL question

Ah, good point.  I have no experience with pre 2.x Cocoon, so I don't
know what would work.  I'm sure others around here can answer that
though.

-T
 -Original Message-
 From: Martin Mauri [mailto:[EMAIL PROTECTED]]
 Sent: Monday, March 25, 2002 9:07 AM
 To: [EMAIL PROTECTED]
 Subject: Re: XSL question

 Hi Thomas,

 That's a good answer, unfortunately I forgot to point that I'm using
 Cocoon 1.8.2. Is there a solution for it? thanks!
 - Original Message -
 From: von Schwerdtner, Thomas (GXS, FPI)
 To: '[EMAIL PROTECTED]'
 Sent: Monday, March 25, 2002 10:53 AM
 Subject: RE: XSL question



 Yes.


 There is a tutorial on this at cocooncenter.org:



 http://www.cocooncenter.de/cc/documents/resources/request-params/i
 ndex.html






 -Tom






  -Original Message-
  From: Martin Mauri [mailto:[EMAIL PROTECTED]]
  Sent: Monday, March 25, 2002 8:56 AM
  To: [EMAIL PROTECTED]
  Subject: XSL question
 
 
  Hi, this is a kind of offtopic question I think but anyway...
 
  Is there a possibility to pass a parameter to a stylesheet?
 
  I'd like to do the following:
 
  Given a stylesheet, I'd like to include another but depending
  on a parameter
  passed by some external source, say an xml page.
 
  thanks in advance.
 
  Martin
 
 
 
 -

  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 










 

RE: Basic idea of creating xml document using a form

2002-03-21 Thread Matthieu Benéteau

It sounds great :))

Thanks a lot for your work.


Matthieu


 Will this transformer be available in the next release ?

 Yes, but it will still be in the scratchpad, until I have solved the known
 problems with it.

 I believe more and more users will want to save information in
 local files
 using this kind of behaviour. I will use this transformer in order to
 dynamically modify my XML files (unfortunately I can not use
 XMLDB because
 of client's restrictions).

 It will really come into it's own when more Sources are converted to
 WritableSources.

 Then all you need to change (to switch from one Source to another) will be
 the URI used.


 regards Jeremy

 --
___

Jeremy Quinn   Karma Divers
webSpace Design
 HyperMedia Research Centre

mailto:[EMAIL PROTECTED]
http://www.media.demon.co.uk
   phone:+44.[0].20.7737.6831 pager:[EMAIL PROTECTED]


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

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




RE: XML namespaces and result of RequestGenerator

2002-03-21 Thread Matthieu Benéteau

Sorry, this was a silly question, and I found the answer in the archives.
My mistake.

Matthieu



 -Message d'origine-
 De : Matthieu Benéteau [mailto:[EMAIL PROTECTED]]
 Envoyé : jeudi 21 mars 2002 18:46
 À : Cocoon-Users
 Objet : XML namespaces and result of RequestGenerator


 Hi,

 I have a little but annoying problem with the result of the
 RequestGenerator : during the XSL transformation I can't match
 any of the request elements (I can't even match the root
 request element).


 For instance :

   ?xml version=1.0 encoding=iso-8859-1?
   xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

 xsl:template match=/
   one
 xsl:value-of select=request/@target/
 xsl:apply-templates
 select=request/requestParameters/parameter/
 xsl:apply-templates/
   /one
 /xsl:template

 xsl:template match=parameter
   contentinside parameter body/content
 /xsl:template

   /xsl:stylesheet

 will result in an empty element : one/.


 But on the other hand, if I use the following template :

 !-- by default, copy everything as is --
 xsl:template match=@*|node()
   xsl:copy
 xsl:apply-templates select=@*|node()/
   /xsl:copy
 /xsl:template

 the one element contains the whole request.


 I suppose it's a namespace problem. The transformer doesn't seem
 to match elements with the
 xmlns=http://xml.apache.org/cocoon/requestgenerator/2.0;
 namespace declaration.

 Has anyone an idea ?


 Matthieu



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

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




RE: Basic idea of creating xml document using a form

2002-03-19 Thread Matthieu Benéteau

Have a look at the following transformer (by Jeremy) in the CVS repository :
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/scratchpad/src/org/apache/
cocoon/transformation/Attic/FileWritingTransformer.java

It may be very useful if you want to create or modify an existing XML file.

Matthieu


 -Message d'origine-
 De : Sreenivasan N. [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 19 mars 2002 09:58
 Objet : Basic idea of creating xml document using a form


 Hi all

 I am new to cocoon. Now i am into a project where i need to
 create xml file
 / or append an exsisting xml file using forms. Can anyone give the basic
 configuration required to do this in sitemap and some example to
 do the same
 I am using Tomcat 4.0.3 and Cocoon 2.0.1

 With regards

 vasan.


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

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




Different behaviours of HTMLSerializer, in attributes and elements.

2002-03-18 Thread Matthieu Benéteau

Hi,

I have a little problem with the HTMLSerializer and accented letters in
French.
I'm working with Cocoon 2.0.1.
All my XML files and stylesheets and all my components use the iso-8859-1
encoding.


In my XML file I have the following element, which has an eacute; letter in
attribute nom :

dimensionPhysique nom='puissance réelle' indexDimension='9'/


This element is correctly processed by a stylesheet to give the following
XHTML :

a name=puissance réelle/a
table
  tr
td bgcolor=#EEDDEE
  bDimension name :/b
  puissance réelle
  br/
  bDimension index :/b
  9
/td
  /tr
  ...
/table

So now the accented letter appears twice : once in the name attribute of
an anchor, and once in the content of a table row. No problem here.


The problem appears after serialization with the HTMLSerializer, which gives
the following HTML :

META http-equiv=Content-Type content=text/html; charset=iso-8859-1
...
a name=puissance r%C3%A9elle/a
table
  tr
td bgcolor=#EEDDEE
  bDimension name : /b
  puissance reacute;elle
  br/
  bDimension index : /b
  9
/td
  /tr
  ...
/table

In the name atribute of the anchor, the eacute; letter has been replaced
by %C3%A9, so the following instruction will fail :
parent.centerFrame.location.hash='#puissance reacute;elle';


IMHO, this is not a correct behaviour of the HTMLSerializer.
Am I right ?


Matthieu




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

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




RE: Different behaviours of HTMLSerializer, in attributes and elements.

2002-03-18 Thread Matthieu Benéteau

No, the problem is not there : this script line is generated automatically
and correctly by the stylesheet. It generates the character itself :

parent.centerFrame.location.hash='#puissance réelle';

and the character is then correctly replaced by eacute; by the
HTMLSerializer.


The problem is that this character is replaced by %C3%A9 (instead of
eacute;) when it is inside the name attribute of an anchor. Is this a
correct behaviour ?


Matthieu


 -Message d'origine-
 De : KOZLOV Roman [mailto:[EMAIL PROTECTED]]
 Envoyé : lundi 18 mars 2002 12:36
 Cc : Cocoon-Users
 Objet : Re: Different behaviours of HTMLSerializer, in attributes and
 elements.


 Hello,

 IMHO, in the script line you have to put the character itself and
 not eacute;
 because such an entity will not be substituted. So try the following:

 parent.centerFrame.location.hash='#puissance réelle';

 PS: I've not checked if the %C3%A9 in an element's name will be
 translated by
 script interpreter (and I don't know exactly a kind of
 interpreter you use) so
 perhaps you need xsl:attribute element with CDATA section in your
 XML source.

 Best regards
 Roman

 Matthieu Benéteau wrote:

  Hi,
 
  I have a little problem with the HTMLSerializer and accented letters in
  French.
  I'm working with Cocoon 2.0.1.
  All my XML files and stylesheets and all my components use the
 iso-8859-1
  encoding.
 
  In my XML file I have the following element, which has an
 eacute; letter in
  attribute nom :
 
  dimensionPhysique nom='puissance réelle' indexDimension='9'/
 
  This element is correctly processed by a stylesheet to give the
 following
  XHTML :
 
  a name=puissance réelle/a
  table
tr
  td bgcolor=#EEDDEE
bDimension name :/b
puissance réelle
br/
bDimension index :/b
9
  /td
/tr
...
  /table
 
  So now the accented letter appears twice : once in the name
 attribute of
  an anchor, and once in the content of a table row. No problem here.
 
  The problem appears after serialization with the
 HTMLSerializer, which gives
  the following HTML :
 
  META http-equiv=Content-Type content=text/html; charset=iso-8859-1
  ...
  a name=puissance r%C3%A9elle/a
  table
tr
  td bgcolor=#EEDDEE
bDimension name : /b
puissance reacute;elle
br/
bDimension index : /b
9
  /td
/tr
...
  /table
 
  In the name atribute of the anchor, the eacute; letter has
 been replaced
  by %C3%A9, so the following instruction will fail :
  parent.centerFrame.location.hash='#puissance reacute;elle';
 
  IMHO, this is not a correct behaviour of the HTMLSerializer.
  Am I right ?
 
  Matthieu
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



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

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




RE: Different behaviours of HTMLSerializer, in attributes and elements.

2002-03-18 Thread Matthieu Benéteau

With the XML serializer, the result is just what I expected, the character
isn't replaced :

?xml version=1.0 encoding=iso-8859-1?
...
a name=puissance réelle/
table
  tr
td bgcolor=#EEDDEE
  b Dimension name : /b
  puissance réelle
  br/
  b Dimension index : /b
  9
/td
  /td
/table
...
parent.centerFrame.location.hash='#puissance réelle';

In this case the accented character is treated the same way inside an
attribute or inside the body of an element.


With an HTML serializer, I expect this character to be replaced by
eacute;.

Any idea, Vadim ?


Matthieu


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

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




RE: Different behaviours of HTMLSerializer, in attributes and elements.

2002-03-18 Thread Matthieu Benéteau

 Then it really sounds like HTMLSerializer problem. Could you also try to
reproduce this with simple pipeline (generator and  serializer only, no
need for transformer), with simple (couple of lines should do it) XML? Then,
submit it as a bug to the  BugZilla.

 Thanks,
 Vadim

Same result with a simple pipeline :

map:match pattern=project/test-html
  map:generate src=test/test-html.xml/
  map:serialize type=html/   !-- using
org.apache.cocoon.serialization.HTMLSerializer --
/map:match


Here is the content of test-html.xml :

?xml version=1.0 encoding=iso-8859-1?

html
  head
  /head
  body
a name=réel/a
table
  tr
td
  réel
/td
  /tr
/table
form
  input type=button value=réel/input
/form
  /body
/html


And here is the result :

html
  head
META http-equiv=Content-Type content=text/html;
charset=iso-8859-1
  /head
  body
a name=r%C3%A9el/a
table
  tr
td
  reacute;el
/td
  /tr
/table
form
  input type=button value=reacute;el
/form
  /body
/html


I'm going to submit it to the BugZilla.

Matthieu


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

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




I'd really love to POST forms...

2002-03-14 Thread Matthieu Benéteau

Hi folks,

I'm using Cocoon-2.0.1 with Tomcat-4.0.1.

I'm working on a Cocoon-based editor that allows to edit and modify XML
files with a web browser. It uses several HTML forms.

RequestGenerator is just fine to retrieve the parameters of a GET request.
But as my application is growing, my forms are getting bigger and I need to
submit them with the POST method.

Unfortunately, it seems that the only generator dealing with POST is the
StreamGenerator, which expects some XML data. And I have no way to submit
the content of my forms as XML data.

Does anyone know why there is no generator to make me happy?
I would really love to POST forms!...


Matthieu


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

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




RE: How to define custom parameter for map:serialize?

2002-03-08 Thread Matthieu Benéteau

Hi Stefan,

 We have written a custom serializer and want to specify a custom
 parameter in the sitemap pipeline, not in serializer definition.

 This works

   map:serializers
 map:serializer name=serializerxyz mime-type=... logger=...
 src=...
   parameter name=param1 value=xyz/
 /map:serializer
   /map:serializers

 but the parameter is fixed for the whole sitemap.

This works because most serializers implement the
org.apache.avalon.framework.configuration.Configurable
interface, which defines a configure() method.

 But we want to define the parameter in the pipeline like:

 map:match pattern=...
   ...
   map:serialize type=serializerxyz
 parameter name=param1 value=xyz/
   /map:serialize
 /map:match

 How ist this possible? We found no fitting interface to accomplish this
 (SitemapOutputComponent does not define a setup-Method like
 OutputModelComponent).

This is currently not possible in cocoon 2.0.1 because serializers do not
implement the
org.apache.cocoon.sitemap.SitemapModelComponent
interface (this interface defines a setup() method).

I don't know whether this behaviour will be available in a future release.
Does anyone know?


Matthieu


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

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




RE: Réf. : RE: Xinclude + cocoon pseudo protocol

2002-03-05 Thread Matthieu Benéteau

Hi Tin,

First check the XInclude namespace you're using. The correct namespace is :

  xmlns:xi=http://www.w3.org/2001/XInclude;

Once you've added an xi:include element, you have to process it with
another transformer (the XIncludeTransformer) because the default
XSLTTransformer can only process elements in the XSL namespace (such as
xsl:template, xsl:if, and so on).

This means that you must add in your pipeline a second map:transform
element, just after the first one :

  map:transform type=xinclude/

where xinclude is the name of the XIncludeTransformer declared in the
map:components/map:transformers section of your sitemap :

  map:transformer name=xinclude
logger=sitemap.transformer.xinclude

src=org.apache.cocoon.transformation.XIncludeTransformer/

Unfortunately, I don't know whether the XIncludeTransformer can use the
cocoon:/ context.


When you have an IE error message, try to view the source of the page with
the Affichage/Source menu of your browser. It's very useful when you want to
see what has been produced.


Cheers,

Matthieu


 -Message d'origine-
 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Envoyé : mardi 5 mars 2002 09:50
 Objet : Réf. : RE: Xinclude + cocoon pseudo protocol



 Sorry

 the problem is that the stylesheet doesn't seem to be able to
 interpret the
 xinclude command.
 here is the IE error message I get :

  La page XML ne peut pas être affichée


  Impossible d'afficher l'entrée XML en
  utilisant la feuille de style XSL.
  Corrigez l'erreur, puis cliquez sur le
  bouton Actualiser ou réessayez
  ultérieurement.


  Un seul élément de niveau supérieur est
  autorisé dans un document XML. Erreur de
  traitement de la ressource
  http://localhost:8080/ome-xinc/gogo/.
  Ligne 6, Position 4






   xinclude:include xmlns:xinclude=http://w3.org/2001/XInclude; href
 =xincludetest/foo base=cocoon://
 ---^


 sorry, the message is in french.


 I don't know if it is the stylesheet or if it is a bad declaration of the
 xinclude command.


 I can send a piece of my sitemap and my stylesheet.





 Thanks



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

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