HTML-serializer question

2008-04-15 Thread Lehtonen, Mika
I have this external graphics tag in my xsl when using FOP to serialize 
pdfs'.(Cocoon 2.1.11 with 0.94 FOP)


fo:external-graphic 
src=cocoon:/selitykset/{$kunta}-{$alue}-{$kaavano}-laatija_{$kaavano}.gif  
.. etc..


But now I am building an html serializer for the same project. How do I 
convert this into an html tag?
img 
src=cocoon:/selitykset/{$kunta}-{$alue}-{$kaavano}-laatija_{$kaavano}.gif 
.. etc ..

doesn't work.

I have a large file structure of gifs' so this pipeline is used for 
finding the right one. So it will find 
kunta/alue/kaavano/laatija_kaavano.gif from the selitykset directory. I 
just can't remember why I did so difficulty. Couldn't it just be done like:
.. 
src=cocoon:/selitykset/{$kunta}/{$alue}/{$kaavano}/laatija_{$kaavano}.gif 
.. without any pipeline? But then it would demand some concatenation? A 
little lost here :-[ .
Anyway that is probably not the problem but the right way to put it into 
html.


- mika -

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



[2.1]change response http status

2008-04-15 Thread nanomonk

I need to set another status-code via response.setStatus(1):
HTTP/1.1 200 OK
to
HTTP/1.1 001 blablabla
Now I have my custom serializer. How can I to take access to Response object
from serializer?

-- 
View this message in context: 
http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16698263.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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



Bug in filter transformer?

2008-04-15 Thread Derek Hohls
Working with Cocoon 2.1.8
 
I have encountered a problem with the filter transformer.  It works find with a 
straightforward 
transform after a simple SQL.  But when I have a nested SQL statement, where 
the initial result
 after the SQL transformer looks like:
 
?xml version=1.0 encoding=UTF-8?
page xmlns:sq2=http://apache.org/cocoon/SQL/2.0; 
xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;   
sq2:rowset nrofrows=2 name=paper-list
 sq2:row
  sq2:recordno5072/sq2:recordno
  sq2:authorgroupid2803/sq2:authorgroupid
  sq2:titleMarea Roja en El Norte De Chile/sq2:title
  sq2:rowset nrofrows=1 name=author-list
   sq2:row
sq2:authornameRodriguez/sq2:authorname
sq2:authorinitialsL./sq2:authorinitials
   /sq2:row
  /sq2:rowset
 /sq2:row
 sq2:row
  sq2:recordno10/sq2:recordno
  sq2:authorgroupid8/sq2:authorgroupid
  sq2:titleSobre Ume floracao de Asterionella Clevel/sq2:title
  sq2:rowset nrofrows=2 name=author-list
   sq2:row
sq2:authornameAguiar/sq2:authorname
sq2:authorinitialsL.W./sq2:authorinitials
   /sq2:row
   sq2:row
sq2:authornameCorte-Real/sq2:authorname
sq2:authorinitialsM./sq2:authorinitials
   /sq2:row
  /sq2:rowset
 /sq2:row
/sq2:rowset
/page
 
Then the filter result looks like:
 
?xml version=1.0 encoding=UTF-8?
page xmlns:sq2=http://apache.org/cocoon/SQL/2.0; 
xmlns:jx=http://apache.org/cocoon/templates/jx/1.0;   
sq2:rowset nrofrows=2 name=paper-list
 block id=1
 sq2:row
  sq2:recordno5072/sq2:recordno
  sq2:authorgroupid2803/sq2:authorgroupid
  sq2:titleMarea Roja en El Norte De Chile/sq2:title
  sq2:rowset nrofrows=1 name=author-list
   sq2:row
sq2:authornameRodriguez/sq2:authorname
sq2:authorinitialsL./sq2:authorinitials
   /sq2:row
  /block
  /sq2:rowset
 /sq2:row
 sq2:row
  sq2:recordno10/sq2:recordno
  sq2:authorgroupid8/sq2:authorgroupid
  sq2:titleSobre Ume floracao de Asterionella Cleve/sq2:title
  sq2:rowset nrofrows=2 name=author-list
   sq2:row
sq2:authornameAguiar/sq2:authorname
sq2:authorinitialsL.W./sq2:authorinitials
   /sq2:row
   sq2:row
sq2:authornameCorte-Real/sq2:authorname
sq2:authorinitialsM./sq2:authorinitials
   /sq2:row
  /block
  /sq2:rowset
 /sq2:row
/sq2:rowset
/page
 
And its clear from the above that the /blocks are in the wrong place!
 
How do I correct this?
 
Thanks
Derek


-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.


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



RE: CForms Binding with XML and JXPath example

2008-04-15 Thread Jeroen Reijn
We've done something similar. See [1] for the java source.

http://svn.hippocms.org/repos/hippo/hippo-cms/trunk/editor/src/java/nl/hippo/cocoon/forms/binding/XmlAsStringBinding.java

Regards,

Jeroen Reijn


-Original Message-
From: Magnus Haraldsen Amundsen [mailto:[EMAIL PROTECTED]
Sent: Mon 4/14/2008 6:19 PM
To: users@cocoon.apache.org
Subject: CForms Binding with XML and JXPath example
 
Hi,

 

Does anyone have an example on how to use the Binding Framework to bind
XML contained in a String to Cocoon Forms for editing?

 

- Magnus


IMPORTANT NOTICE:
This message may contain confidential information. 
If you have received this e-mail in error, do not use, copy or 
distribute it. Do not open any attachments. Delete it immediately from
your system and notify the sender promptly by e-mail that you 
have done so. Thank you.




RE: What are EHCache and HSQL used for?

2008-04-15 Thread Jeroen Reijn
Hi,

as far as I know EHCache is used for eventcaching pipelines. HSQL is not needed 
for a minor version of cocoon, but can be used for databases while testing or 
running examples inside Cocoon 2.1.

Regards,

Jeroen

-Original Message-
From: Robert La Ferla [mailto:[EMAIL PROTECTED]
Sent: Tue 4/15/2008 4:32 AM
To: users@cocoon.apache.org
Subject: What are EHCache and HSQL used for?
 
Are EHCache or HSQL required to use Cocoon 2.1?  Do any blocks require  
it as a dependency?

INFO  (2008-04-15) 02:27.41:780 [core.store] (Unknown-URI) Unknown- 
Thread/EHDefaultStore: EHCache cache cocoon-ehcache-1 initialized


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




RE: [2.1]change response http status

2008-04-15 Thread Jeroen Reijn
Hi,

try setting the status-code attribute on your custom serializer.

map:serialize type=xml status-code=001/

Regards,

Jeroen Reijn




-Original Message-
From: nanomonk [mailto:[EMAIL PROTECTED]
Sent: Tue 4/15/2008 11:19 AM
To: users@cocoon.apache.org
Subject: [2.1]change response http status
 

I need to set another status-code via response.setStatus(1):
HTTP/1.1 200 OK
to
HTTP/1.1 001 blablabla
Now I have my custom serializer. How can I to take access to Response object
from serializer?

-- 
View this message in context: 
http://www.nabble.com/-2.1-change-response-http-status-tp16698263p16698263.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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




Re: HTML-serializer question

2008-04-15 Thread Stephen Winnall
The problem is with the use of the cocoon: pseudo-protocol in the src  
attribute of img. Cocoon pseudo-protocols are only known to Cocoon and  
so only work on the server side. The img src=... is sent over to  
the client to be interpreted, and Safari, Netscape, MSIE and co. don't  
know what it is. If you translate the cocoon:/ into a URL equivalent  
using http you should be alright.


Steve

On 15 Apr 2008, at 10:11, Lehtonen, Mika wrote:

I have this external graphics tag in my xsl when using FOP to  
serialize pdfs'.(Cocoon 2.1.11 with 0.94 FOP)


fo:external-graphic src=cocoon:/selitykset/{$kunta}-{$alue}- 
{$kaavano}-laatija_{$kaavano}.gif  .. etc..


But now I am building an html serializer for the same project. How  
do I convert this into an html tag?
img src=cocoon:/selitykset/{$kunta}-{$alue}-{$kaavano}- 
laatija_{$kaavano}.gif .. etc ..

doesn't work.

I have a large file structure of gifs' so this pipeline is used for  
finding the right one. So it will find kunta/alue/kaavano/ 
laatija_kaavano.gif from the selitykset directory. I just can't  
remember why I did so difficulty. Couldn't it just be done like:
.. src=cocoon:/selitykset/{$kunta}/{$alue}/{$kaavano}/ 
laatija_{$kaavano}.gif .. without any pipeline? But then it would  
demand some concatenation? A little lost here :-[ .
Anyway that is probably not the problem but the right way to put it  
into html.


- mika -

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




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



Re: HTML-serializer question

2008-04-15 Thread Lehtonen, Mika

Yep,

I ended up thinking something similar and kind of sorted the problem out 
by using already created contextpath-variable instead of cocoon:/. It 
works.


thanks,
mika

Stephen Winnall kirjoitti:
The problem is with the use of the cocoon: pseudo-protocol in the src 
attribute of img. Cocoon pseudo-protocols are only known to Cocoon and 
so only work on the server side. The img src=... is sent over to 
the client to be interpreted, and Safari, Netscape, MSIE and co. don't 
know what it is. If you translate the cocoon:/ into a URL equivalent 
using http you should be alright.


Steve

On 15 Apr 2008, at 10:11, Lehtonen, Mika wrote:

I have this external graphics tag in my xsl when using FOP to 
serialize pdfs'.(Cocoon 2.1.11 with 0.94 FOP)


fo:external-graphic 
src=cocoon:/selitykset/{$kunta}-{$alue}-{$kaavano}-laatija_{$kaavano}.gif  
.. etc..


But now I am building an html serializer for the same project. How do 
I convert this into an html tag?
img 
src=cocoon:/selitykset/{$kunta}-{$alue}-{$kaavano}-laatija_{$kaavano}.gif 
.. etc ..

doesn't work.

I have a large file structure of gifs' so this pipeline is used for 
finding the right one. So it will find 
kunta/alue/kaavano/laatija_kaavano.gif from the selitykset directory. 
I just can't remember why I did so difficulty. Couldn't it just be 
done like:
.. 
src=cocoon:/selitykset/{$kunta}/{$alue}/{$kaavano}/laatija_{$kaavano}.gif 
.. without any pipeline? But then it would demand some concatenation? 
A little lost here :-[ .
Anyway that is probably not the problem but the right way to put it 
into html.


- mika -

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




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


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



RE: How to obtain a xml from a xml file and a Xpath expression

2008-04-15 Thread Carlos Tejo Alonso

Heelo,


  I wanted to explain thi situation:
  I have a file called example.xml and I want to apply a XPATH  
  expression in order to obtain another file called example-2.xml  
  with the elements selected by the XPATH expression.
 
  For one you could just generate your file, apply an xslt with
  an xpath expression or otherwise use the Xquery generator[1].
 
  Thanks for the suggestions. I wonder if there is one transformer  
  where you indicate the file and the XPATH expression and gives you  
  the new xml file.
 
  Did I explain myself better? Sorry for my awful English :S
 
 Did you literally mean that you want to produce another XML file in  
 the filesystem ?
 ( which, I guess, is why Reinhard suggests using the sourcewriting  
 transformer )
 Or did you just want to extract that xml fragment and transform 
 +serialize it in the pipeline?

I am wondering if it is possible the second option in Cocoon,

Carlos Tejo

 
 -- Steve Majewski
 
 
 
  On Apr 14, 2008, at 12:26 PM, Reinhard Haller wrote:
 
  Hi Carlos,
 
  Carlos Tejo Alonso schrieb:
  Thanks for the suggestions. I wonder if there is one transformer  
  where you indicate the file and the XPATH expression and gives  
  you the new xml file.
 
  try it with a xpath generator (you can specify your file directly  
  or via pattern matching), followed by a source-writing-transform.
 
  http://cocoon.apache.org/2.1/userdocs/xpathdirectory-generator.html
 
  
 http://cocoon.apache.org/2.1/userdocs/sourcewriting-transformer.html
 

Carlos Tejo Alonso
Departamento de I+D+i - Fundación CTIC
Parque Científico Tecnológico Gijón, Asturias (Spain)
www.fundacionctic.org

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



error in html serialization

2008-04-15 Thread Lehtonen, Mika

Hello,

I have an application which uses html serializer. It is a little 
complicated system to describe in this. Anyway the pipeline works and of 
some xml and a bunch of gifs is parsed a working html, but then we come 
to the strange part. It works eleven times, crashes eleven times and 
continues doing that. I can verify that even with using refresh button 
on the browser. Cocoon is 2.1.11 and first I get this error and after 
that the latter one. Any ideas?


mika

*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

javax.servlet.ServletException: Servlet execution threw an exception

*root cause*

java.lang.NoClassDefFoundError: org/apache/xml/utils/URI

org.apache.xml.utils.SystemIDResolver.getAbsoluteURI(SystemIDResolver.java:284)

org.apache.xpath.SourceTreeManager.resolveURI(SourceTreeManager.java:132)
org.apache.xalan.templates.FuncDocument.getDoc(FuncDocument.java:237)
org.apache.xalan.templates.FuncDocument.execute(FuncDocument.java:194)

org.apache.xpath.axes.FilterExprIteratorSimple.executeFilterExpr(FilterExprIteratorSimple.java:116)

org.apache.xpath.axes.FilterExprWalker.setRoot(FilterExprWalker.java:131)
org.apache.xpath.axes.WalkingIterator.setRoot(WalkingIterator.java:157)
org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:265)

org.apache.xpath.axes.LocPathIterator.asIterator(LocPathIterator.java:269)

org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:335)
org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:265)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
org.apache.xalan.templates.ElemIf.execute(ElemIf.java:162)

org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:425)
org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:265)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)

org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)

org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)

org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)

org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447)

org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)

org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56)

org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586)

org.apache.cocoon.generation.DirectoryGenerator.generate(DirectoryGenerator.java:266)

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579)

org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481)

org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)

org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)

org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)

org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)


webdav transformer

2008-04-15 Thread Robert Goené
Hi!

I try to use the webdav transformer in Cocoon 2.1.10 to
post some data to Solr. When I do not provide a body 
element, I get the expected error message from Solr: 
no data provided. So far so good. When I do provide a 
body element, I get a very general NullPointerException. 

I use the Saxon transformer, because I need some EXSLT 
features. Could this explain my problem? Would explicitely
defining the webdav transformer do any good?

Thanks in advance,

Robert


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