Re: external cgi

2002-02-08 Thread Anders Conrad

Hi.

I used to use the tag  in the XSP util logicsheet
(xmlns:util="http://www.apache.org/1999/XSP/Util";).
That was in cocoon 1.8.

Anders

- Original Message -
From: "Ratty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 4:25 PM
Subject: external cgi


> Hi!
>
> Can anyone answer me - how can i call from xsp page external cgi program ?
> I dont need redirect to that page - i only need output what it generate
> which would be processed in Cocoon
> Or may be i must write some generator which would read output of this cgi
> and create xml?
>
> Thanx for any suggestions
> Igor Sazhnev
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


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

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




Re: Cocoon + FOP

2002-01-11 Thread Anders Conrad



It is in the Cocoon 1 FAQ at
http://xml.apache.org/cocoon1/faqs.html#faq-iepdfbug
 
Anders
- Original Message - 

  From: 
  Stephan 
  Kassanke 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, January 10, 2002 4:47 
  PM
  Subject: Re: Cocoon + FOP
  
  TJ,
   
  it's documented here in the NG. I think it did 
  not make its way into the cocoon or FOP documentation (yet?). Actually it is a 
  MS IE bug (only in 5.0) as far as I know. Later versions do not have this 
  behaviour. Anyway, MS seems to be ignoring to this issue.
   
  Stephan
  
- Original Message - 
From: 
TJ Smith 
To: [EMAIL PROTECTED] 

Sent: Thursday, January 10, 2002 6:17 
AM
Subject: Re: Cocoon + FOP

Thanks very much - both suggestions work!  
A couple of questions tho;
where is Matthias' suggestion documented?  
I've perused the Microsoft tech notes, etc. and didn't find the 'a=b.pdf' 
workaround.  Just curious :-)
 
Thanx again
TJ

  - Original Message - 
  From: 
  Sidharth 
  To: [EMAIL PROTECTED] 
  
  Sent: Sunday, January 06, 2002 3:36 
  AM
  Subject: Re: Cocoon + FOP
  
  Well I encounetred the same problem for which 
  I downloade the .20 version and succesfully completed the pdf 
  conversions.
  If u want to open in a browser, then there is 
  a servlet FOPServlet.java just forward the request from a jsp to that 
  servlet and try.
  
- Original Message - 
From: 
Matthias Fischer 
To: [EMAIL PROTECTED] 

Sent: Wednesday, January 09, 2002 
1:34 PM
Subject: RE: Cocoon + FOP

Have you tried to add in your browser command 
line the following?
 
http://[path][filename].pdf?a=b.pdf
 Sometimes IE is a bit slow to understand that a 
pdf is a pdf...
Matthias  

  -Original Message-From: TJ Smith [mailto:[EMAIL PROTECTED]]Sent: 
  Tuesday, January 08, 2002 7:06 PMTo: [EMAIL PROTECTED]Subject: 
  Cocoon + FOP
  Hi all
  I'm using Windows 2000, Tomcat 3.3, 
  Cocoon 1.8.2 and the FOP they came with: Fop_0_15_0.  All are 
  installed correctly and produce the correct output - except for PDF 
  output.  The problem is accessing an xml file thru Cocoon.  
  Tomcat reports encouraging messages culminating with
   
  rendering out PDF
  writing out PDF
   
  However, the IE browser (version 
  5.5) screen remains blank.
   
  I have perused the e-mail correspondence 
  and see there are a number of similar problems reported - none seem to 
  have worked in my case, this includes tacking strange suffixes to a 
  url: 'iedebug=.pdf', etc.  I have tried moving up to Fop version 
  0.20.1 which generates a number of error messages.
   
  With all due apologies if I have missed 
  the solution somewhere, can someone kindly fill me in?  I'm 
  getting a tad desperate :-)
   
  TJ



-Please 
check that your question has not already been answered in theFAQ 
before posting. To 
unsubscribe, e-mail: 
<[EMAIL PROTECTED]>For additional 
commands, e-mail: 
<[EMAIL PROTECTED]>


Re: How can I access XML Native database using cocoon

2001-12-14 Thread Anders Conrad

As far as I understand, there are some taglibs supporting relational
databases for Cocoon XSP, but I have not come across any direct support for
native XML databases.

I am myself working on accessing an Xindice (dbXML) database through Cocoon
XSP and that is not very complicated to get to work. My database is on the
same server as Cocoon and I have used the dbXML java interface (as in the
dbXML Example1.java program) and implemented this in  elements of
an XSP page. The only modification to the dbXML code - apart from collection
name and query string - is that you have to cast the returned resource as
XMLResource and use the getResultAsDOM method to get the DOM node into your
XSP page, something like

  XMLResource res = (XMLResource) results.nextResource();
  // Resultat ind i en DOM node
  Document diplom = (Document) res.getContentAsDOM();
  // Get the top node of the returned document
  Element fetchedDoc = diplom.getDocumentElement();

Now, this can be cloned into the DOM structure of the XSP page:

XSPUtil.cloneNode(fetchedDoc, document)

and from there on you can do further processing in Cocoon, directly on the
nodes from your database.

It is quite simple but it seems to work. The only problem I have encountered
is that UTF-8 encoding in the DOM nodes returned from the database is
ignored somewhere in the processing as I wrote about to the list yesterday.

Anders


- Original Message -
From: "Kukkapalli PraveenKumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 11:55 AM
Subject: How can I access XML Native database using cocoon



Hi all,
   I'm new to cocoon and this mailing list as well. I read that Cocoon is
supporting Native Databases and downloaded the Cocoon and installed in my
machine but I didn't get any Info. from the site that how to access native
database.
I'm using dbXML(Xindice).My frontend is XML and using DOM.I've to go to so
many pages and fill some forms, all the information I've given is stored as
DOM and whenever I submit that should submit to the database. Does it
supports.Please let me know..
Best wishes
Praveen


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

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



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

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




Encoding problem with dynamic content in XSP

2001-12-13 Thread Anders Conrad



Hello from a new XSP user.
 
I ask advice and suggestions on how to get dynamic 
content in UTF-8 encoding correctly through XSP. I am using Cocoon 1.8.2 with 
Tomcat 3.2.3 and Apache 1.3.14, running on Suse Linux 7.1.
 
I have made an  search 
page that retrieves data from the dbXML database (soon to be Apache 
Xindice) and integrates this with static XML content. dbXML has a java interface 
and the results from database queries are delivered and inserted as DOM 
nodes:

<xsp:expr>XSPUtil.cloneNode(fetchedDoc, document)xsp:expr>
where fetchedDoc is the node that resulted from the database query.
Static content is decoded correctly, but the 
dynamically fetched documents are not. Everything in my page and XSL stylesheet 
is UTF-8, as indicated in the xml declarations:

 
Everything 
in the dbXML data store is UTF-8 as well. XSP and the html formatter has been 
set up to deliver UTF-8 in cocoon.properties:
 
processor.xsp.encoding = UTF-8
...
formatter.text/html.encoding   = 
UTF-8
 
The problem arises with multi-byte characters being 
delivered in the DOM nodes from dbXML. They are fetched correctly with the 
correct multi-byte contents, but somewhere in the processing pipeline each byte 
is being treated as a single character and rendered as such in the XSL 
transformation. 
 
If you save the output as ISO-8859-1 and then read 
it into an UTF-8 editor, the result is correct. So, somehow the interpretation 
of dynamic and static content gets out of sync concerning the encoding. The 
problem does not seem to be the XSLT however, as you get the same result 
with the text/plain formatter.
 
How to fix this?Many thanks for your 
attention.
Anders
 
Anders 
Conrad  
Det Danske Sprog- og LitteraturselskabIT-redaktør, 
cand.mag.   Christians Brygge 1E-mail: [EMAIL PROTECTED] 
1219 København 
K    
Tlf. 33 13 06 60


Re: redirect to port 80

2001-07-03 Thread Anders Conrad

I understand that you want your web-server that is serving Cocoon to listen
on port 80. I also assume that you are currently using Tomcat as a web
listener on its default port 8080.

Given that, you can either keep using Tomcat as a web listener and change
the port number in the configuration file tomcat/conf/server.xml where you
have some lines like





Change the value from 8080 to 80.

Or - as someone else suggested - use the Apache web server to serve Cocoon
on its default port 80. This is supposedly the better solution for a
production environment. In this case you will have to install and configure
mod_jk as a link between Apache and Tomcat. There are a number of files to
review to get this right, such as Apache's httpd.conf to include mod_jk, you
have to create a configuration file for mod_jk (such as the example
cocoon/conf/mod_jk_cocoon.conf or tomcat/conf/mod_jk.conf_auto) and include
it in httpd.conf, and you have to adjust things in
tomcat/conf/workers.properties.

I hope I got it right! I just managed to get it to work myself.

Anders
- Original Message -
From: "Pierre-Henry Perret" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 02, 2001 11:13 AM
Subject: redirect to port 80


> Bonjour,
>
> I have installed cocoon and made it serving corretly xml pages, well
> it's nice!
>
> I would like to register my site as a cocoon user but i can't serve on
> other
> port than 8080 (e.g i must give an address as
> 'http://localhost:8080/cocoon..') - all other network stuff working
> correctly
> , i mean DNS - i don't have to do this with tomcat jserv because i can
> directly see a working servlet as in
> 'http://localhost/servlets/examples...'
>
> i guess no idea to manage this,
>
> Pierre-Henry Perret
> Cocoon user
> StDenis, France
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
>


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

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




Working installation

2001-06-28 Thread Anders Conrad



Hello.
 
For the record: I have succesfully installed Cocoon 
1.8.2-2 on the following platform:
 
Suse Linux 7.1 (kernel 2.2.18)
Apache 1.3.14-6
Tomcat 3.2.2
JDK 1.1.8v3-1
 
It seems to work fine and be robust enough (no 
heavy load though).
 
Regards
Anders
 
Anders 
Conrad  
Det Danske Sprog- og LitteraturselskabIT-redaktør, 
cand.mag.   Christians Brygge 1E-mail: [EMAIL PROTECTED] 
1219 København 
K    
Tlf. 33 13 06 60


Parsing problem

2001-06-28 Thread Anders Conrad



Hello.
 
After sucessfully installing Cocoon 1.8.2, I 
encounter parsing errors when trying to transform xml documents into html using 
the cocoon xslt processor. The documents are encoded in UTF-8, and the 
problem is caused by element names containing the Danish letters æ, 
ø  and å (ae, oe, aa) in the UTF-8 encoding. The same letters 
in regular text are parsed correctly, though, the problem only occurs 
in element names. The documents in question have been parsed without 
problems in XMLspy and James Clerk's SP.
 
Has anyone else encountered this problem? Of 
course, an obvious solution is to avoid non-english characters in element 
names, but this may require large amounts of filtering of existing texts, 
changing of DTD's etc. To my best knowledge, non-English characters should be 
allowed in XML names.
 
The platform is: Suse Linux 7.1, Apache 1.3.14, 
Tomcat 3.2.2, JDK 1.1.8.
 
The error stack is the following:
org.xml.sax.SAXException: A ')' is required in the declaration of element type "simpledoc". [FATAL ERROR] [File: "file:/var/jakarta-tomcat-3.2.2/webapps/cocoon/diplo/charbug.dtd" Line: 3 Column: 24] (nested exception: org.xml.sax.SAXParseException: A ')' is required in the declaration of element type "simpledoc". )
	at org.apache.cocoon.parser.AbstractParser.fatalError(AbstractParser.java:105)
	at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1037)
	at org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.java:654)
	at org.apache.xerces.framework.XMLDTDScanner.scanChildren(XMLDTDScanner.java:1979)
	at org.apache.xerces.framework.XMLDTDScanner.scanElementDecl(XMLDTDScanner.java:1771)
	at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1436)
	at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2179)
	at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2133)
	at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:882)
	at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
	at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:900)
	at org.apache.cocoon.parser.XercesParser.parse(XercesParser.java:85)
	at org.apache.cocoon.parser.AbstractParser.parse(AbstractParser.java:83)
	at org.apache.cocoon.producer.ProducerFromFile.getDocument(ProducerFromFile.java:78)
	at org.apache.cocoon.Engine.handle(Engine.java:359)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
	at org.apache.tomcat.core.Handler.service(Handler.java:287)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
	at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
	at java.lang.Thread.run(Thread.java)

The DTD in question looks like this:
 





and the fix would be a change to the following 
(with the similar fix in the test document):




I have the entire reproducible available in case 
somone is interested.
 
Any suggestions or commentary would be 
welcome!
 
Anders
 
Anders 
Conrad  
Det Danske Sprog- og LitteraturselskabIT-redaktør, 
cand.mag.   Christians Brygge 1E-mail: [EMAIL PROTECTED] 
1219 København 
K    
Tlf. 33 13 06 60