Re: nested stylesheets
Hi, The issue with logicsheet XSLs is that they should translate what they understand and pass through what they don't. This in effect is how the embedded tags are resolved, when all logic sheets are run against the XSP file. Any tags that are left over are output in the resulting Document (logically). To make this happen, there are two minimum requirements for your logicsheet. Firstly, provide a template that processes the xsp:page/ element, which in turn creates an xsp:page/ element as a root context for the follow-on logicsheets. For example: xsl:template match=xsp:page xsp:page xsl:apply-templates select=@*/ xsl:apply-templates/ /xsp:page /xsl:template and Secondly, to ensure that all unprocessed elements are copied, include the following template in your logicsheet: !-- copied from [C2] util.xsl -- xsl:template match=@*|*|text()|processing-instruction() xsl:copy xsl:apply-templates select=@*|*|text()|processing-instruction()/ /xsl:copy /xsl:template Hope this helps, Adrian - Original Message - From: Aurelien [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 04, 2001 8:52 PM Subject: nested stylesheets Hi, (sorry if this kindof a repost, I didn't see the message on the list, and neither did it show in my sent items...) I've already managed to have some ejb's basically exposed as taglibs. Now, I'd like to be able to nest custom tags: I have a method that checks if a user has certain rights (I do this in order to have a centralized session/roles mechanism so as to be able to have several servlet engines sharing a common set of users), for example with a tag like this: gatekeeper:checkUser sessionId=... requestId=.../ And I have another bean that provides information about sport events: infokiosk:getSoccerScore matchId=.../ I'd like to be able to nest tags, so I can delegate basic logic to XML authors that don't want to hear about programming. They'd do something like this (in an xsp document): infokiosk:getSoccerScore matchId=... infokiosk:checkAccess gatekeeper:checkUser sessionId=... requestId=.../ /infokiosk:checkAccess /infokiosk:getSoccerScore Has someone already tried this ? I looked into util.xsl, but I couldn't understand how they implement a similar example which is documented in cocoon2's online help. Any help is greatly appreciated ! Aurélien - 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]
Cocoon2 on Enhydra?
Has anybody tried subj.? What do I need to achive this? I have made the WAR file, but what do I do with it? Med venlig hilsen/Best regards Søren Neigaard --- Mobilethink A/S Arosgaarden Åboulevarden 23, 5.sal DK - 8000 Århus C Telefon: +45 86207800 Direct: +45 86207810 Fax: +45 86207801 - 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]
Cocoon2 + tomcat4.0 and the classloader *hmpf*
Hi once again, while specifying extra-classpath in web.xml. eg adding ejblogic.jar. xsp-pages compile fine. But while running I receive an tomcat exception NoClassDefFoundError. This can only be resolved by copying all needed jars into web-info/lib :-(. Is there any better solution for this ? The Standard Jars like the ones used by jboss could be linked into TOMCAT_HOME/lib no problem at all. But for own jar-files I would really like to use another location than webapps/cocoon/WEB-INF/lib Regards Michael - 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]
How does the pseudo-protocol context work?
Hi, I've fowllowing problem: In a sub-sitemap I make use of the DatabaseAddAction. Everything works fine if I insert the absolute path of the describtor file. But if I want to make use of the pseudo-protocol context it only works if I integrate the describtor file in the root-directory(context://filename.xml). Then I tried context:///filename.xml and context:/filename.xml - no success. My goal is creating a small application that can be easily integrated in a root-sitemap and the only thing you have to do is mounting the sub-sitemap in the root-sitemap. Does anybody have a solution for my problem? Reinhard -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net - 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]
cocoon on Mac OS X slooooow (+ Batik bugs)
Hi, Anyone here already tried cocoon on Mac OS X ? While it *does* work, it's particularly slooow on my new iBook. And: Batik produces unusable images (think that's more a JDK incompatibility issue...). Simple things (hello.html) are fast when accessed from the iBook itself, but take forever when accessed from other machines on my LAN. I had the same problem on Linux, which I then reported to this mailing-list, but now I think this must for sure be a known problem... Cheers, Aurélien PS: Mac OS X RULES ! - 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: [C2] Err-Msg: No more DTM IDs are available ????
Hi, Thanks to everyone who send an alternative solution ... I found that if I load the main cocoon page first (http://localhost:8080/cocoon/) and then my appl. (http://loclahost:8080/coccon/myapp/) I don't get the error ... but If I start with my appl. I get the error message ... BTW, the SQL demo start OK the very first time, after that I get some error when try to load the backup file ... (?) (this is not critical to me ... cocoon, keeps working). Eduardo. - 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]
xsp-request:get-uri do not show root when called from aggregation
Hi, I have a problem with Cocoon2.0rc1: xsp-request:get-uri/ do not show root (/) when called from a map:aggregate That is the xsp: xsp:page .. .. test get-requested-urlxsp-request:get-requested-url//get-requested-url get-urixsp-request:get-uri//get-uri /test /xsp:page with that in sitemap: map:match pattern=testuri.xml map:generate type=serverpages src=testuri.xsp/ map:serialize type=xml/ /map:match you can call (in my case: http://localhost:8102/testuri.xml) and get that expected: test xmlns:xsp=.. .. get-requested-urlhttp://127.0.0.1:8102/testuri.xml/get-requested-url get-uri/testuri.xml/get-uri /test BUT if you put in sitemap: map:match pattern=testuri-as-part.xml map:aggregate element=content-list map:part src=cocoon:/testuri.xml element=content/ /map:aggregate map:serialize type=xml/ /map:match you call http://localhost:8102/testuri-as-part.xml) and get: content-list content test xmlns:xsp=.. .. get-requested-urlhttp://127.0.0.1:8102testuri.xml/get-requested-url get-uritesturi.xml/get-uri /test /content /content-list If anybody know: WHY I am lost the root (/) between http://127.0.0.1:8102; and testuri.xml??? Thanks in advance. Antonio Sotomayor [EMAIL PROTECTED] PD: 1) Some data: Test done in W2000Server (US) + ServicePack2 + JRun3.1 + Cocoon2.0rc1 2) The test gives the same result if I aggregate several parts instead only one. - InforNet Cristobal Bordiu, 35. 28003 Madrid. Teléfono: 34 1 533 30 00* Fax: 34 1 533 40 36 e-mail: [EMAIL PROTECTED] http://www.infornet.es http://www.megastorevirtual.com http://www.enlaweb.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]
XSP Processing with Logic
I'm creating a logicsheet which I'm going to use to send email. An example of the usage is: email:sendEmail to[EMAIL PROTECTED]/to subjectDoh!/subject messageQuantity is xsp:exprquantity/xsp:expr/message /email:sendEmail I've got everything working fine except for getting the xsp tags working within the message. Is there a way I can process what's inside the message tag but not display it to the web? Does that make any sense? Basically, in the logicsheet that processes this I'm doing a: xsp:logic String to = xsl:value-of select=to/; String from = xsl:value-of select=from/; String subject = xsl:value-of select=subject/; String message = xsl:value-of select=message/; ... then use javamail to process and send an email message /xsp:logic I see that xsl:value-of returns a string representation or something - but is there a way I can process the xsp tags inside the message and set a string to the result? Or something similar to accomplish what I'm trying to do? Thanks, - Brent - 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]
IllegalAccessError on first use
Hello! I am trying to get an instance going of tomcat 4.0 + cocoon 2.0rc1a, which seems to me a fairly decent combination of version numbers. Tomcat runs and installs with no problems, but I am having some trouble getting the cocoon part working. I am running the JDK 1.4 on Linux 2.2.14 (RH6.2). The exception I got when trying to access /cocoon/: org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is not available. Please check logs for the exact error. was quite unhelpful, as I had no idea where the cocoon logs are. Searching for '*.log' didn't turn it up, and the information I was after was obviously not in the the tomcat logs. Searching the web turned up that the cocoon logs are in cocoon/WEB-INF/logs, and this is what I found there: ERROR (2001-10-06) 01:44.34:469 [cocoon ] (/cocoon/) HttpProcessor[8081][1]/Handler: Error compiling sitemap java.lang.IllegalAccessError: try to access class org.apache.cocoon.www.sitemap_xmap$Configurer from class org.apache.cocoon.www.sitemap_xmap at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:825) [snip unformattable traceback] I have not been able to google a reference to this error. Any help appreciated. TIA. -- Cantanker / -/- / cantanker.net - 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]
MySQL Drivers - Cocoon 1.8.2
Hi All, I am using Cocoon, running on Linux with the MySQL database and have set up my own connection pool in Cocoon.properties. I point to the MySQL Driver as follows: processor.xsp.pool.database.power.driver=org.gjt.mm.mysql.Driver processor.xsp.pool.database.power.url=jdbc:mysql:@localhost:3306?database=power This driver location I copied from Cocoon's own properties, ie ... processor.xsp.pool.database.adaptor.DBMySQL=org.gjt.mm.mysql.Driver I am relatively new to configuring Linux boxes so I may be missing something blatantly obvious here. It is throwing the following error upon trying to display an XML with database calls : Error found handling the request. java.lang.RuntimeException: Error opening pooled connection: power: Database type org.gjt.mm.mysql.Driver not implemented. I had been assuming that if Cocoon references this Driver in its own properties file under the heading : # These are the supported jdbc-drivers and their adaptors. then pointing to these drivers in my own connection pool would be enough. Is there something else I should be doing ? Any help hugely appreciated at this stage ! Thanks, ColmOR.
RE: [C2] Err-Msg: No more DTM IDs are available ????
All, I have been having the same problems as Eduardo, and at one point found that hitting the main page first seemed to fix the problem. Later after starting to work through cTwIG tutorial, I was generating the error even on the main page. I found two things that I believe resolved this problem (#1 more so than #2 but both in the cTwIG tutorial): 1) Configure C2 to run in unpackaged mode. (Don't deploy C2 as a WAR file) 2) Near the bottom of the cocoon.xconf file is a configuration setting about reloading the sitemap.xmap file. The default mode is asynchronous which reloads the file in the background if it is changed thus serving the request with the existing sitemap. Changing this to synchron will make the request wait until the sitemap is recompiled. The only problem seems to be that the demo database for the Employee management demo is not working now, but did work when I deployed the WAR file. Hope this helps... Aaron -Original Message- From: Eduardo Godoy Vega [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 10:06 AM To: [EMAIL PROTECTED] Subject: RE: [C2] Err-Msg: No more DTM IDs are available Hi, Thanks to everyone who send an alternative solution ... I found that if I load the main cocoon page first (http://localhost:8080/cocoon/) and then my appl. (http://loclahost:8080/coccon/myapp/) I don't get the error ... but If I start with my appl. I get the error message ... BTW, the SQL demo start OK the very first time, after that I get some error when try to load the backup file ... (?) (this is not critical to me ... cocoon, keeps working). Eduardo. - 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]
C2 Problem Rendering XHTML Files without Transformation...
I am attempting to send XHTML files (as is) through C2. To do this I created a match pattern in sitemap as follows: ---excerpt from sitemap.xmap map:match pattern=fp/*.xhtml map:generate type=file src=fp/xhtml/{1}.xhtml/ map:serialize/ /map:match This should match any pattern of an xhtml file extension, generate it from a file name and serialize the data without changing it. However, if I have a !DOCTYPE tag at the top of my file, the generated output always starts with a greater than symbol. For example the following file is processed: ---index.xhtml-- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ /head body bgcolor=#FF h2font color=#FF face=Verdana, Arial, Helvetica, sans-serifWeb Test/font/h2 /body /html - The output generated is (C2 puts a great deal of comments at the top of the document so I will only give the offending piece): --output from C2 !-- Scope is simpler than headers attribute for common tables -- !-- th is for headers, td for data and for cells acting as both -- html xmlns=http://www.w3.org/1999/xhtml; head titleUntitled Document/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1/ /head body bgcolor=#FF h2 font color=#FF face=Verdana, Arial, Helvetica, sans-serifWeb Test/font /h2 /body /html - Notice that the !DOCTYPE code is missing and a is all that is left of it. Does anyone know how to resolve this? I want the !DOCTYPE tag to be returned. Thanks in advance, Aaron - 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: MySQL Drivers - Cocoon 1.8.2
Try making the change below to the cocoon properties file ( change DBMySQL to DBMM ). This worked for me. processor.xsp.pool.database.adaptor.DBMM=org.gjt.mm.mysql.Driver here's how I defined the connection pool: processor.xsp.pool.database.iluminaPool.driver=org.gjt.mm.mysql.Driverprocessor.xsp.pool.database.iluminaPool.url=jdbc:mysql://localhost/iluminaprocessor.xsp.pool.database.iluminaPool.username=mmartyprocessor.xsp.pool.database.iluminaPool.password=** marty -Original Message-From: Colm O'Riordan [mailto:[EMAIL PROTECTED]]Sent: Friday, October 05, 2001 7:29 PMTo: [EMAIL PROTECTED]Subject: MySQL Drivers - Cocoon 1.8.2Hi All, I am using Cocoon, running on Linux with the MySQL database and have set up my own connection pool in Cocoon.properties. I point to the MySQL Driver as follows: processor.xsp.pool.database.power.driver=org.gjt.mm.mysql.Driver processor.xsp.pool.database.power.url=jdbc:mysql:@localhost:3306?database=power This driver location I copied from Cocoon's own properties, ie ... processor.xsp.pool.database.adaptor.DBMySQL=org.gjt.mm.mysql.Driver I am relatively new to configuring Linux boxes so I may be missing something blatantly obvious here. It is throwing the following error upon trying to display an XML with database calls : Error found handling the request. java.lang.RuntimeException: Error opening pooled connection: power: Database type org.gjt.mm.mysql.Driver not implemented. I had been assuming that if Cocoon references this Driver in its own properties file under the heading : # These are the supported jdbc-drivers and their adaptors. then pointing to these drivers in my own connection pool would be enough. Is there something else I should be doing ? Any help hugely appreciated at this stage ! Thanks, ColmOR.
Serializer requests
Hello, I had posted this message earlier. The reason it is important is that each request in our application opens a Database connection which we would like to limit. Any help in this regard, will be greatly appreciated. When I use XMLSerializer in the pipeline, the WebServer two requests for the same pattern. For example for the following pipeline map:match pattern=blank.svg map:generate src=docs/esdm/blank.svg/ map:serialize type=xml/ /map:match The Webserver access log shows 127.0.0.1 - - [27/Sep/2001:17:04:16 -0400] GET /cocoon/blank.svg HTTP/1.1 200 146 127.0.0.1 - - [27/Sep/2001:17:04:16 -0400] GET /cocoon/blank.svg HTTP/1.1 200 146 Whereas if I change the pipeline to map:match pattern=blank.svg map:generate src=docs/esdm/blank.svg/ map:serialize type=svg2png/ /map:match 127.0.0.1 - - [27/Sep/2001:17:20:48 -0400] GET /cocoon/blank.svg HTTP/1.1 200 1262 Any help would be greatly appreciated. Thanks and regards, Dinkar - 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]
Form Validation
Can someone explain this to me in laymans terms ? map:match pattern=formvalidation/test map:act type=form-validator map:parameter name=descriptor value=context:///docs/samples/formvalidation/descriptor.xml/ map:parameter name=validate-set value=car-reservation/ map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/OK/ /map:act map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/ERROR/ /map:match - 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]
Form Validation
map:match pattern=formvalidation/test If your request is for formvalidation/test url, continue inside match element. map:act type=form-validator map:parameter name=descriptor value=context:///docs/samples/formvalidation/descriptor.xml/ map:parameter name=validate-set value=car-reservation/ Execute form-validator action with 2 parameters above. map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/OK/ If form-validator action succeeded, execute dynamic-page pipeline with docs/samples/formvalidation/OK target. /map:act map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/ERROR/ If form-validator failed, execute dynamic-page pipeline with docs/samples/formvalidation/ERROR target. /map:match - 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: Form Validation
Thanks Greg I assume by default on submit , the evaluvation is carried as per ERROR.xsp , and this is why it is not part of map:acttags map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/ERROR/ This is the standard way I suppose !?! Lakshmi -Original Message- From: Gregory Steuck [mailto:[EMAIL PROTECTED]] Sent: Friday, October 05, 2001 2:28 PM To: [EMAIL PROTECTED] Subject: Form Validation map:match pattern=formvalidation/test If your request is for formvalidation/test url, continue inside match element. map:act type=form-validator map:parameter name=descriptor value=context:///docs/samples/formvalidation/descriptor.xml/ map:parameter name=validate-set value=car-reservation/ Execute form-validator action with 2 parameters above. map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/OK/ If form-validator action succeeded, execute dynamic-page pipeline with docs/samples/formvalidation/OK target. /map:act map:redirect-to resource=dynamic-page target=docs/samples/formvalidation/ERROR/ If form-validator failed, execute dynamic-page pipeline with docs/samples/formvalidation/ERROR target. /map:match - 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]