Re: XML-Output from Helperclass

2002-12-15 Thread Christian Haul
Nils Leßmann wrote:

Hi!
 
How can I use xml-output from java-classes in my xsps? I have a class,
say Foo and my logicsheet inserts something like
 
xsp:exprFoo.showData()/xsp:expr
 
in my xsp. The output from Foo is then escaped and all my tags end up
in lt;taggt;... 
 
I really want to put the heavy logic into my own classes, away from the
xsp – is that possible somehow?

Either you could use the util logicsheet or -- preferred in your 
scenario -- implement the org.apache.cocoon.xml.XMLizable / 
org.apache.avalon.excalibur.xml.XMLizable interface. Both contain only a 
method toSAX(Contenthandler). If your class creates a org.w3c.dom.Node / 
Document you may want to look at e.g. DOMStreamer

	Chris.

--
C h r i s t i a n   H a u l
[EMAIL PROTECTED]
fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08


-
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]



AW: XML-Output from Helperclass

2002-12-15 Thread Nils Lemann


danke, genau was ich gesucht habe! 

-Ursprüngliche Nachricht-
Von: Christian Haul [mailto:[EMAIL PROTECTED]] 
Gesendet: Sonntag, 15. Dezember 2002 15:16
An: [EMAIL PROTECTED]
Betreff: Re: XML-Output from Helperclass

Either you could use the util logicsheet or -- preferred in your 
scenario -- implement the org.apache.cocoon.xml.XMLizable / 
org.apache.avalon.excalibur.xml.XMLizable interface. Both contain only a

method toSAX(Contenthandler). If your class creates a org.w3c.dom.Node /

Document you may want to look at e.g. DOMStreamer

Chris.



-
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]




RE: in XML Output

2002-10-24 Thread Ebert Andreas
 How can I have the following in my xml output.
 
 word spelling=SPELL
 pronunciation=m#601;mba#618;/
 
 This uses and xml serializer.
 
 The result i get is
 
 word spelling=SPELL
 pronunciation=mamp;#601;mbaamp;#618;/
 
Just guessing: Try pronunciation=mamp;#601;mbaamp;#618; - the amp;
should be converted into an  in the resulting document, or?

Andreas

 
 __
 Do you Yahoo!?
 Y! Web Hosting - Let the expert host your web site
 http://webhosting.yahoo.com/
 
 -
 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]
 

-
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]




Re: in XML Output

2002-10-20 Thread J.Pietschmann
apurva zaveri wrote:

How can I have the following in my xml output.

word spelling=SPELL
pronunciation=m#601;mba#618;/

This uses and xml serializer.

The result i get is

word spelling=SPELL
pronunciation=mamp;#601;mbaamp;#618;/


Are you adding the attribute value through ssome Java code?
Use m\u0259mba\u026A in this case (study the Java languaga
documentation for how to use arbitrary Unicode characters in
a string).
If you are pulling the stuff from a DB or something, either
try to get UTF-8 code into the source form the start, or you
have to pass it somehow through a parser.

J.Pietschmann



-
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]




in XML Output

2002-10-20 Thread apurva zaveri
How can I have the following in my xml output.

word spelling=SPELL
pronunciation=m#601;mba#618;/

This uses and xml serializer.

The result i get is

word spelling=SPELL
pronunciation=mamp;#601;mbaamp;#618;/


__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

-
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]




RE: XML output transformed into XSP.

2002-07-14 Thread Vadim Gritsenko

 From: Graeme Colman [mailto:[EMAIL PROTECTED]]
 
 I know that this type of question has been answered a
 lot on this list but I still can't get this to work as
 I would like.
 
 What I have is an xml file.
 I need to transform this xml adding a few tags.
 I then need to put this through an xsp processor.
 
 so:  pipeline 1: xml file - xsl - xml
  pipeline 2: pipeline1 - xsp - xsl - html
 
 
 with the sitemap:
 
map:match pattern=config
  map:generate  src=docs/dbConfig.xml/
  map:transform src=stylesheets/dbConfig.xsl/
  map:serialize type=xml/
/map:match
 
 
map:match pattern=test.html
  map:generate type=serverpages
 src=cocoon:/config/
  map:transform src=stylesheets/db.xsl/
  map:serialize/
/map:match
 
 
 Sounds simple using the sub sitemap stuff.

Did you make it work? Sub sitemap has identical sample:

http://localhost:8080/cocoon/sub/xsp-cocoon

The only difference is that it does not have transformation:

  map:transform src=stylesheets/dbConfig.xsl/

I can speculate that there is an issue in this XSLT.


Vadim


 
 I can get this working if the original xml is an xsp
 file and generated with a type=serverpages.
 
 But.
 
 When I try to do as above, the html output is still as
 the original post which is:
 
 dependency
   C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
 /dependency
 
 
 Question:
 Can this work with an XML file input to a pipeline and
 using this XML output as the source for an XSP
 processing pipeline?
 
 
 Any help much appreciated
 Graeme Colman.
...


-
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]




RE: XML output transformed into XSP.

2002-07-14 Thread Graeme Colman

I never got this working :( 

I resorted to using java to add the xml that I needed.

Regards
Graeme.

 --- Vadim Gritsenko [EMAIL PROTECTED]
wrote:   From: Graeme Colman
 [mailto:[EMAIL PROTECTED]]
  
  I know that this type of question has been
 answered a
  lot on this list but I still can't get this to
 work as
  I would like.
  
  What I have is an xml file.
  I need to transform this xml adding a few tags.
  I then need to put this through an xsp processor.
  
  so:  pipeline 1: xml file - xsl - xml
   pipeline 2: pipeline1 - xsp - xsl - html
  
  
  with the sitemap:
  
 map:match pattern=config
   map:generate  src=docs/dbConfig.xml/
   map:transform
 src=stylesheets/dbConfig.xsl/
   map:serialize type=xml/
 /map:match
  
  
 map:match pattern=test.html
   map:generate type=serverpages
  src=cocoon:/config/
   map:transform src=stylesheets/db.xsl/
   map:serialize/
 /map:match
  
  
  Sounds simple using the sub sitemap stuff.
 
 Did you make it work? Sub sitemap has identical
 sample:
 
 http://localhost:8080/cocoon/sub/xsp-cocoon
 
 The only difference is that it does not have
 transformation:
 
   map:transform
 src=stylesheets/dbConfig.xsl/
 
 I can speculate that there is an issue in this XSLT.
 
 
 Vadim
 
 
  
  I can get this working if the original xml is an
 xsp
  file and generated with a type=serverpages.
  
  But.
  
  When I try to do as above, the html output is
 still as
  the original post which is:
  
  dependency
C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
  /dependency
  
  
  Question:
  Can this work with an XML file input to a pipeline
 and
  using this XML output as the source for an XSP
  processing pipeline?
  
  
  Any help much appreciated
  Graeme Colman.
 ...
  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-
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]




RE: XML output transformed into XSP.

2002-06-27 Thread Graeme Colman

I know that this type of question has been answered a
lot on this list but I still can't get this to work as
I would like.

What I have is an xml file.
I need to transform this xml adding a few tags.
I then need to put this through an xsp processor.

so:  pipeline 1: xml file - xsl - xml
 pipeline 2: pipeline1 - xsp - xsl - html


with the sitemap:

   map:match pattern=config
 map:generate  src=docs/dbConfig.xml/
 map:transform src=stylesheets/dbConfig.xsl/
 map:serialize type=xml/
   /map:match
   

   map:match pattern=test.html
 map:generate type=serverpages
src=cocoon:/config/
 map:transform src=stylesheets/db.xsl/
 map:serialize/
   /map:match


Sounds simple using the sub sitemap stuff.

I can get this working if the original xml is an xsp
file and generated with a type=serverpages.

But.

When I try to do as above, the html output is still as
the original post which is:

dependency
  C:\...WEB-INF/classes/dams/logicsheets/damDb.xsl
/dependency


Question:
Can this work with an XML file input to a pipeline and
using this XML output as the source for an XSP
processing pipeline?


Any help much appreciated
Graeme Colman.


 --- Vadim Gritsenko [EMAIL PROTECTED]
wrote:   From: System Administrator
 [mailto:[EMAIL PROTECTED]]
  
  Hi,
  
  I am a newcomer to cocoon, using it to implement a
 commercial
  application.
  
  I have a problem.
  
  I have a pre-generated XML file which specifies a
 database table
  configuration. I am trying to do the following:
  
  1 - Transform the xml into xsp.
  2 - Transform the xsp tags using esql logicsheet.
  3 - display results from the database call.
  
  The following sitemap snip is how I was thinking
 it should work
  but dosen't. Am I completley off the mark here or
 is this possible?
 
 This is possible and sample is provided. Install
 cocoon and go to
 http://localhost:8080/cocoon/sub/
 
 
 Happy hacking,
 Vadim
 
 
  !-- Internal pipeline used to transform xml to an
 xsp file --
  map:pipeline internal-only=true
   map:match pattern=config
 map:generate  src=docs/dbConfig.xml/
 map:transform src=
 stylesheets/dbConfig.xsl/
 map:serialize type=xml/
   /map:match
 /map:pipeline
 .
 .
 .
 map:match pattern=test.html
   map:generate  type=serverpages
 src=cocoon:/config/
   map:transform src=stylesheets/apache.xsl/
   map:serialize/
 /map:match
  
  The above was attempting to transform the xml
 using an internal
  pipeline, then use this transformed xml as input
 to the
  serverpages generator. But it's not working.
  
  The outpur being sent to the browser:
  
  dependency xmlns:xsp=http://apache.org/xsp;
 xmlns:xsp-
  session=http://apache.org/xsp/session/2.0;
  xmlns:xspdoc=http://apache.org/cocoon/XSPDoc/v1;
  xmlns:esql=http://apache.org/cocoon/SQL/v2;
  xmlns:damDb=http://hostname/damDb/1.0;C:/Program
 Files/Tomcat
  4.0.3/webapps/cocoon/WEB-
 
 INF/classes/dams/logicsheets/damDb.xsl/dependency
  
  
  Any help would be most gratefully received.
  
  Regards
  Graeme
  

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-
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]




Output Data as XML output

2002-04-15 Thread George Pieri




I have XML that I would like to generate XML from using
my XSL stylesheet. I've tried using the cocoon format
command

?cocoon-format type=text/xhtml?  and ?cocoon-format type=text/xml?

with NO luck it appears that my output is still coming back
in HTML format

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN
http://www.w3.org/TR/REC-html40/strict.dtd;

and my processing instruction does NOT appear in the output.
The xsl:output command does not appear to work as well.

Do I have any options available for Cocoon 1.8.2 ?

Do I have the cocoon-format command in the wrong syntax ?


Thanks in advance


-
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 output from sql query

2002-04-15 Thread Argyn Kuketayev

I use xml-serializer when want to debug the xml between components of
pipeline

 -Original Message-
 From: Muhammad Irfan [mailto:[EMAIL PROTECTED]]
 Sent: Monday, April 15, 2002 6:12 PM
 To: [EMAIL PROTECTED]
 Subject: xml output from sql query
 
 
 
 Dear All,
 
 I am trying to execute SQL query and want to get the 
 output/display in xml. 
 I have written my SQL query in a xml file according to the 
 docs/samples/sql/sql-page but getting the exptions
   This may be beause my sitemap entries are not correct or 
 the way I reffer 
 to the URL is invalid. I will be grateful if someone can 
 assist me with this 
 procedure.
 
 Regards
 
 Irfan.
 
 
 _
 Chat with friends online, try MSN Messenger: http://messenger.msn.com
 
 
 -
 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 output from sql query

2002-04-15 Thread Andrew Savory

On Mon, 15 Apr 2002, Muhammad Irfan wrote:

 I am trying to execute SQL query and want to get the output/display in xml.
 I have written my SQL query in a xml file according to the
 docs/samples/sql/sql-page but getting the exptions

What exceptions are you getting? Is there anything in the error logs?


Andrew.

-- 
Andrew SavoryEmail: [EMAIL PROTECTED]
Managing Director  Tel:  +44 (0)870 741 6658
Luminas Internet Applications  Fax:  +44 (0)870 28 47489
This is not an official statement or order.Web:www.luminas.co.uk



-
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: IE / NS don't reconize my XML output as XML

2002-03-12 Thread Ivan Rubin

I think map:serialize's parameter is called type, not name, at least 
using the standard serializer.

map:serializer name=xml mime-type=text/xml 
src=org.apache.cocoon.serialization.XMLSerializer/

map:serialize type=xml/


TREGAN Fabien wrote:

 I use this serializer :
 
 component-instance name=xml
 class=org.apache.cocoon.serialization.XMLSerializer
   mime-type=text/xml
   logger=sitemap.serializer.xml/
 
 in this pipeline :
 
 map:match pattern=*.xml
   map:generate src=xml/{1}.xml/
   map:serialize name=xml/
 /map:match
 
 and xml/file.xml contains :
 
 ?xml version='1.0' encoding='UTF-8'?
 test
   this is a test.
 /test
 
 I can acces cocoon/myapp/file.xml, but both IE and NS display them as an
 HTML file (display only 'this is a test').
 If I use 'view source', the tag test is ok, but the PI (?xml
 version='1.0' encoding='UTF-8'?) vanished.
 
 if I try the same test with a .svg file and the SVG/JPEG serializer, both
 browsers reconize the output as an image and display it properly.
 
 I tryed stoping / starting Tomcat, refreshing, deleting work directory, no
 luck... I must use an xml2xhtml transformer in order to see my results...
 
 any idea ?
 
 [Tomcat 4.0.1, 10 days old CVS, IE 5.5, NS 6.]
 
 
 -
 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]




IE / NS don't reconize my XML output as XML

2002-03-11 Thread TREGAN Fabien

I use this serializer :

component-instance name=xml
class=org.apache.cocoon.serialization.XMLSerializer
mime-type=text/xml
logger=sitemap.serializer.xml/

in this pipeline :

map:match pattern=*.xml
map:generate src=xml/{1}.xml/
map:serialize name=xml/
/map:match

and xml/file.xml contains :

?xml version='1.0' encoding='UTF-8'?
test
this is a test.
/test

I can acces cocoon/myapp/file.xml, but both IE and NS display them as an
HTML file (display only 'this is a test').
If I use 'view source', the tag test is ok, but the PI (?xml
version='1.0' encoding='UTF-8'?) vanished.

if I try the same test with a .svg file and the SVG/JPEG serializer, both
browsers reconize the output as an image and display it properly.

I tryed stoping / starting Tomcat, refreshing, deleting work directory, no
luck... I must use an xml2xhtml transformer in order to see my results...

any idea ?

[Tomcat 4.0.1, 10 days old CVS, IE 5.5, NS 6.]


-
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]