Re: FOP problems with Unix
I've had this problem many times: you need an X windows display (the DISPLAY environment variable) set to a viable display (like localhost:0.0) first OR use the headless Java stuff in JDK 1.4 (see the Cocoon install notes or Wiki). -- jack John R. Callahan, Ph.D. CTO [EMAIL PROTECTED] Sphere Software Corporation - Original Message - From: Carmona Perez, David [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 18, 2003 10:40 AM Subject: FOP problems with Unix Hi all, I have a strange problem. Under Windows, everything works ok, the FOP serializer creates a PDF file. But under Unix, some files are converted ok and some aren't. The FOP xml file created by the pipeline is the same. I've tried to convert it to pdf by invoking directly FOP through a command line and it works. So it must be something related to the interface between FOP and Cocoon. In addition, I don't get any error message in the logs. I'm using Cocoon 2.0.4 Any help would be greatly appreciated. David - 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: Joint DC SGML/XML and Linux Users Groups meeting TONIGHT (7pm EDT)
Advice on parking: Use the Metro :-) (Dupont Circle Q Street exit) Seriously, there is a parking garage across the street. Here is Betty's note below (which you might have received if you are on the DC SGML/XML mailing list). See you there! I have to run NOW and catch the train! -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation - The Intelligence of XML [EMAIL PROTECTED] I just spoke with Jon Sears, AGU, and confirmed that tonights meeting can still be held. He suggested that you plan on taking the Metro or parking in the parking barn across the street ($8) because street parking is still a problem. He also said the sidewalks are still a little bit icy. Hopefully with the sun coming out this situation will ease today. I haven't received the books from the publisher yet but that is understandable considering the weather. We will still raffle off the books and I will mail them to the winners if they aren't received today. Currently we have 60 people registered for tonights meeting. Again the URL is http://www.eccnet.com/xmlug/meeting-register.html or you can link to it frm http://www.eccnet.com/xmlug. See you this evening. Betty /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ Betty Harvey | Phone: 410-787-9200 FAX: 9830 Electronic Commerce Connection, Inc. | [EMAIL PROTECTED]| Washington,DC SGML/XML Users Grp URL: http://www.eccnet.com | http://www.eccnet.com/xmlug/ /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\\/\/ -- ___ Xmlusers mailing list [EMAIL PROTECTED] http://ecc05.eccnet.com/mailman/listinfo/xmlusers - Original Message - From: Geoff Howard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 8:06 AM Subject: Re: Joint DC SGML/XML and Linux Users Groups meeting TONIGHT (7pm EDT) I guess that means it's not cancelled! See you there. (Any advice on parking given the snow?) Geoff At 10:36 AM 2/19/2003, you wrote: If you live in the Baltimore-Washington DC USA area... Just a reminder that I will be giving a talk on Cocoon at the joint meeting of the DC SGML/XML and Linux Users Groups. For more information see http://www.eccnet.com/xmlug Don't forget to register online at http://www.eccnet.com/xmlug/meeting-register.html (it's because of building security at the AGU - it's DC after all :-| ) -- jack John Callahan [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] - 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]
subsitemaps from JAR files
I was exploring a way of distributing a REST-style set of web services within any Cocoon application when I stumbled across this quirk: the src attribute on map:mount does not use the normal SourceResolver but rather it uses the standard java.net.URL resolver. Thus, I wanted to say: map:match pattern=svc/* map:mount uri-prefix=svc check-reload=no src=resource://com/sphere/demo/demo.xmap/ /map:match But got an error (no such protocol as resource:). So I tried: map:match pattern=svc/* map:mount uri-prefix=svc check-reload=no src=jar:file:webapps/cocoon/WEB-INF/lib/demo.jar!/com/sphere/demo/demo.xmap/ /map:match And it worked but it's a kludge (you can use {context} in a request action to eliminate the webapp name). Using the subsitemap in the JAR file is interesting because file references are relative to the JAR file, so you have to be careful. Is there a better way to do this? Could map:mount use the SourceResolver instead? Will blocks solve this problem or are they geared toward encapsulation of components only? Just curious... -- jack John R. Callahan, Ph.D. [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: Cocoon 2 via command line Baltimore CHUG
Peter, We're actually located in Columbia, Maryland but I attend Baltimore and D.C. user group events for Java and XML respectively. I am going to recommend that a Baltimore/Washington CHUG be formed at my talk on Feb 19th and meet in Columbia as a half way point. On the other hand, there are many Northern Virginia people for whom Columbia would be a problem. We'll have to put it to a vote. Please come to the D.C. XML User's group meeting if you can make it on Feb 19th. -- jack John R. Callahan, Ph.D. [EMAIL PROTECTED] - Original Message - From: Horsfield, Peter A. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 4:13 PM Subject: Cocoon 2 via command line Baltimore CHUG Hi everybody. I encountered the need to execute Cocoon from the command line. I'm not aware of whether this functionality has been deprecated or not, but I couldn't for the life of me find any info anywhere. So I posted some details up on the wiki. This is my first post so don't be too harsh :) http://wiki.cocoondev.org/Wiki.jsp?page=CommandLine It's not linked from anywhere. Completely unrelated note, I'm working just outside Baltimore, so I'd definitely be up for a user group. Peter Horsfield - 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]
Schematron transform in a Cocoon pipeline
This seems too simple, but I wanted to see if I could use Schematron generated XSLT to validate some XML in a Cocoon pipeline. This might be used for validating uploaded XML files for example. I downloaded the latest Schematron skeleton (1.5), then generated some XSLT from a set of assertions, and then put it into a transform in a pipeline with some data: map:match pattern=*.xml map:generate src={1}.xml/ map:transform src=asserts1.xsl/ map:serialize type=xml/ /map:match !-- build the Schematron generated XSLT -- map:match pattern=asserts1.xsl map:generate src=asserts1.sch/ map:transform src=skeleton1-5.xsl/ map:transform src=store.xsl map:parameter name=file value=asserts1.xsl/ map:parameter name=dir value=./ /map:transform map:transform type=write-source/ map:serialize type=xml/ /map:match (see below for the source code for store.xsl) Unfortunately, the Schematron skeleton puts out plain text messages so the output from data1.xml isn't well-formed XML. What I wanted was a series of applicable Schematron messages as XML output. So, I altered the skeleton somewhat and now I works! My alterations to the skeleton were pretty simple: (1) Add the following template: xsl:template match=sch:error | error mode=text xsl:copy-of select=./ /xsl:template (2) Wrap a sch:results around the / template: axsl:template match=/ sch:results xsl:call-template name=process-root ... /xsl:call-template /sch:results /axsl:template Finally, you must wrap all messages in the .sch file with sch:error.../sch:error as follows: sch:schema xmlns:sch=http://www.ascc.net/xml/schematron; ... sch:assert test=(@Title = 'Mr' and Sex = 'Male') or @Title != 'Mr' sch:errorIf the Title is Mr then the sex of the person must be Male./sch:error /sch:assert ... /sch:schema Enjoy! -- jack (The XSLT file store.xsl is my own brew to wrap an element around the input source for use by the subsequent SourceWriterTransformer: ?xml version=1.0 encoding=UTF-8? !-- CVS: $Id: store.xsl,v 1.1 2002/12/16 11:04:11 callahan Exp $ -- xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xsl:param name=file select='foo'/ xsl:param name=dir select='foo'/ xsl:template match=/ source:write xmlns:source=http://apache.org/cocoon/source/1.0; source:sourcexsl:value-of select=$dir//xsl:value-of select=$file//source:source source:fragment xsl:copy-of select=./ /source:fragment /source:write /xsl:template /xsl:stylesheet ) - 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]
Cocoon tutorial available at CMSWatch.com and Sphere.com
FYI... I have written a brief article on Cocoon (with tutorial and downloadable demo). The article is available at: http://www.cmswatch.com/Features/ProductWatch/FeaturedProduct/?feature_id=81 The associated demo is available at: http://www.sphere.com/docs/myapp.zip The demo is meant to be installed as a webapps subdirectory (no, not as a war file) in Tomcat 4.0.6. The myapp.zip file includes everything you need (all jar files, etc.) and could even serve as a minimal Cocoon application for beginners. It is based on 2.1dev and requires JDK1.3. I've tested it with Tomcat 4.0.6 and Resin 2.x. (I've also got PPT slides to accompany the article if anyone wants them :-p) Thanks for Carsten, Matthew, Lajos and Jeremy for their inspiring and helpful books! Enjoy! -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation (www.sphere.com) - The Intelligence of XML [EMAIL PROTECTED] 410-772-9740 x1116 509-352-1536 (eFax) - 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: Use of SessionPropagatorAction
Hey Malick! (We met at the DC XML User's Group last month)... I am not familiar with the SessionPropagatorAction, but I recommend that you take a look at the authentication-fw (Authentication framework) in Cocoon 2.1dev. Instead of the default authentication handler as found in the examples, you can use your login.asp service to authenticate users. Here is an example: !-- The file-based authentication resource from the auth-fw sample -- map:match pattern=authenticate map:generate src=xml/userlist.xml/ map:transform src=xsl/authenticate.xsl map:parameter name=use-request-parameters value=true/ /map:transform map:serialize type=xml/ /map:match !-- This is the eXSP authentication resource -- map:match pattern=yourauthhandler map:act map:parameter name=parameters value=true/ map:generate src=http://WindowsBox:1010/login.asp?userid={user}amp;pwd={pwd}/ map:transform src=asp2authfw.xsl/ map:serialize type=xml/ /map:act map:read src=nullauth.xml/ /map:match Mind you, this is just off the top of my head. You might still have to worry about URLEncoding issues, etc. But you should get the basic idea. Check out the auth-fw in the Cocoon samples first. I made some additional comments to your email below. Take care and see you next month... -- jack John R. Callahan, Ph.D. CTO Sphere Software Corporation (www.sphere.com) - The Intelligence of XML [EMAIL PROTECTED] 410-480-7301 509-352-1536 (eFax) 410-598-2157 (cell) - Original Message - From: Malick Fall [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 18, 2002 7:20 PM Subject: Use of SessionPropagatorAction Hi all, I am a new Cocoon user trying to build a Web application. Do you have some examples on how to use your SessionPropagatorAction. I have an http service responsible for Authenticating my users. http://WindowsBox:1010/login.asp My sitemap looks like this: map:match pattern= map:act type=request map:parameter name=parameters value=true/ map:parameter name=default.user value=foo/ map:parameter name=default.pwd value=bar/ map:generate src=http://WindowsBox:1010/login.asp?userid={user}amp;pwd={pwd}/ /map:act map:serialize type=xml/ /map:match This won't work anyway because it is syntactically incorrect. The map:act must contain a complete pipeline (that's a Cocoon pipeline not a map:pipeline) and what follows the map:act must also be a complete pipeline (either a redirect-to, read, or generate-transform(s)-serialize sequence. So I send the username and password to the Http service and get XML back w/ the user info if the Authentication was successful. Something like userinfo useridfoo/useridpasswordbar/password address.../addressemail.../email /userinfo Otherwise you get an userinfo element with an error code/message in it userinfo errorcode123/errorcode errormsgWrong username/password, try again./errormsg /userinfo At this point I need to store in the session the username, password, sessionID and a flag that proves that the authentication was successful. It cannot happen in an XSP because my Authentication service is HTTP, which becomes a generator in my sitemap. After my generator I would like to store /userinfo/userid and userinfo/password in the session. So I can check is the user was authenticated B4 letting them go through any other pipeline. I figured SessionPropagatorAction should be the answer, but I cannot figure out where and how to use it. map:act type=session-propagator paramater name=user value={/userinfo/userid} paramater name=pwd value={/userinfo/password} paramater name=sessionID value=??? /map:act Any help would be greatly appreciated. Thanks, Cocoon *Really Rocks* ./Malick. [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] - 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]