Re: Cocoon problems generating html output

2003-06-04 Thread Jeff Turner
On Wed, Jun 04, 2003 at 10:37:47AM +0200, Joerg Heinicke wrote:
 Hello Rob,
 
 to make it short:
 
 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15316
 
 Are absolute paths an option for you?

Btw, the 'realpath' input module is useful here, for passing in the
absolute context path into the xsl:fo stylesheet:

map:transform src=stylesheets/document2fo.xsl
  map:parameter name=ctxbasedir value={realpath:.}//
/map:transform

Then you can concat($ctxbasedir, 'resources/images/', @src) to
generate a FOP-friendly image path.  There's an example of this in
Forrest.


--Jeff

 Joerg
 
 [EMAIL PROTECTED] wrote:
 Hi all,
 
 I'm a bit of a Cocoon newbie so forgive me if there are any errors in the
 following...
 
 In an attempt to push the use of DocBook for technical documentation within
 our group I have been trialling its use and using Cocoon 2.0.4 as the
 publishing framework. I have deployed this under tomcat-4.1.24 on Solaris 8
 with j2sdk1.4.1_01. We are also using docbook-xsl-1.58.1 for the
 stylesheets.
 
 We are mainly generating this into html and pdf for review and
 distribution. Now I have replaced Xalan with Saxon the html seems be
 working a lot better, faster and more reliable. One problem I am having is
 with graphics in PDF files, if I include an imageobject element in the
 docbook all works fine for html but with pdf the image fails to be
 included. The following error occurs in both the error.log and the
 sitemap.log
 
 ERROR   (2003-06-04) 08:51.35:216   [sitemap.serializer.fo2pdf.fop]
 (/cocoon/mount/users/r_exley/doc/r_exley/rpe006.pdf)
 Thread-8/ExternalGraphic: Error while creating area : Error with image URL:
 images/rpe006_1.png (No such file or directory) and no base directory is
 specified
 
 A fragment from the docbook source used in this is as follows:
 
 mediaobject
   imageobject
 imagedata fileref=images/rpe006_1.png format=PNG/
   /imageobject
 /mediaobject
 
 After searching through google etc. this seems to be because the somewhere
 between Apache FOP and docbook-xsl a baseDir configuration parameter is
 required when operating in a servlet environment. The following is one of
 the references I found to this.
 
 http://forrestbot.cocoondev.org/sites/xml-fop/embedding.html#config-internal
 
 How do I approach getting this into my cocoon implementation ?
 Has anyone had any experience of this ?
 Is it docbook-xsl, FOP or Cocoon that is deficient in the treatment of
 images and PDFs via this mechanism ?
 Am I missing something or doing this incorrectly ?
 
 FYI - I am pretty sure using this approach plus FOP all works from the
 command line.
 
 I would appreciate any help/advice on this. Equally if I should be
 addressing this elsewhere then thats fine as well.
 
 thanks in advance
 
 ---
 Rob Exley
 Senior Technical Consultant
 Equifax Plc
 
 e-mail: [EMAIL PROTECTED]
 tel: 01274 759610

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



Re: warning message in core.log

2003-04-03 Thread Jeff Turner
On Thu, Apr 03, 2003 at 11:48:36AM +0300, Stavros Kounis wrote:
 
 i have to look for default as attribute in map:components element or in
 child  elements of map:component?

Most children of map:components ought to have a 'default' attribute.

 the only child element without 'default' attribute in map:components is
 map:actions

That's fine.

 can this warning message cause malfunctions?

The 'default' attribute is treated as the 'hint' in the sitemap's
component manager.  However there is usually a default component defined
for each role, so a lack of hint doesn't cause an error.

I'm sure there's lots of other things that could cause this error that I
don't know of.  Perhaps check your cocoon.xconf for oddities.

--Jeff

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



Re: warning message in core.log

2003-04-02 Thread Jeff Turner
On Thu, Apr 03, 2003 at 02:31:32AM +0300, Stavros Kounis wrote:
 
 hi
 
 i get this warning message in my core.log
 in every hit
 
 is something i have to worry about?
 
 message:
 WARN(2003-04-03) 02:21.59:452   [core.manager]
 (/xml/forestland.gr/themes/images/progs/11/thumbnails/3.jpg)
 Thread-62/ExcaliburComponentSelector: Looking up component on an
 uninitialized ComponentLocator with hint

Do you have any entries in map:components that lack a 'default'
attribute, or have it set to ?

--Jeff

 [/home/vhost/forestland.gr/conf/sitemap.xmap]
 
 
 stavros
 

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



Re: DSML Cocoon

2003-04-01 Thread Jeff Turner
On Tue, Apr 01, 2003 at 03:19:53PM +0400, Yury Mikhienko wrote:
 Hi all!
 
 Does anyone know how to implement a DSML(Directory Service Markup
 Language) into cocoon? 

There was once an LDAP taglib for Cocoon 1 that returned DSML:

http://opensource.socialchange.net.au/ldaptaglib/

Probably wouldn't be hard to port to Cocoon 2.


--Jeff

 -- 
  
 Best regards,
 Yury Mikhienko.
 IT engineer, ZAO Mobicom-Kavkaz

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



Re: ExcaliburComponentSelector: Attempted to release a null component WARNiNG?

2003-03-20 Thread Jeff Turner
On Thu, Mar 20, 2003 at 06:03:16AM -0500, Tsui, Alban wrote:
 
 I have the following warnings in my core.log from cocoon and what do they
 mean?
...
 
Which version of Cocoon?

--Jeff
(who is getting herds of these with CVS 2.1)


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



Re: XPathDirectoryGenerator - need help

2003-03-18 Thread Jeff Turner
On Tue, Mar 18, 2003 at 11:27:27AM -0800, [EMAIL PROTECTED] wrote:
 Maybe I do not understand the XPathDirectoryGenerator:
 
 Also tried:
 
  KNO\#/azkno:knowledgeobject/dc:title/text()
 
 Same, tag content is not displayed !?

Probably because XPathDirectoryGenerator doesn't provide a way to
register namespace-prefix mappings.  Instead, try:

...#/*[local-name()='knowledgeobject']/*[local-name()='title']/text()

--Jeff

 Any help is appreciated !!
 
 Holger

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



Re: action in a pipeline

2003-03-18 Thread Jeff Turner
On Tue, Mar 18, 2003 at 05:13:46PM +0100, Lionel Crine wrote:
 I wrote that this match:
 
   map:match pattern=save/*
   map:act type=Save
map:parameter name=save value={1}/
   /map:act
   /map:match

Can't see anything wrong with that.  I assume you have a map:action
definition for 'Save' somewhere in the sitemap too.  Check the logs for
errors..

--Jeff

 Cocoon didn't find the resource. Is it illegal to write that ?
 

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



Re: Dynamically generate RSS feed for Cocoon portal from XML files

2003-03-11 Thread Jeff Turner
On Tue, Mar 11, 2003 at 05:11:30AM -0800, [EMAIL PROTECTED] wrote:
 Dear all,
 
 I would like to dynamically generate an RSS feed from
 currently available XML files in a folder on my
 webserver to be displayed in the Cocoon portal.
 
 I have a set of equally structured XML files in a
 folder and new files are added to this folder regularly.
 
 Now I want to generate the RSS feed dynamically when
 the respective coplet displays the RSS in the portal.
 
 The RSS file should reflect the title of these XML
 files (which is in the dc:title tag of each file) and
 the URI (the path + filename).
 
 Any ideas are greatly appreciated, hope someone has
 done similar things before - otherwise I would need to
 start from scratch.

If you're using Cocoon 2.1, the XPathDirectoryGenerator might be useful.
It lets you extract XPath-specified nodes from every file in a directory.

For example, to generate http://aft.sourceforge.net/examples/index.html
I used:

   map:match pattern=examples/index.xml
 map:generate type=xpathdirectory
  src=content/xdocs/examples#/project/description/text()/
 map:transform src=resources/stylesheets/antdirectory2document.xsl/
 map:serialize type=xml/
   /map:match


--Jeff

 Kind regards,
 
 Holger
 

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



Re: Way to make XML generator ignore DTD declaration?

2003-03-10 Thread Jeff Turner
On Mon, Mar 10, 2003 at 07:25:00PM -0500, Colin W. Kingsbury wrote:
 Hi all,
 
 I have an XML document which includes a dtd declaration like so:
 
 !DOCTYPE foo PUBLIC -//foo//foo document//EN foo.dtd [ !ENTITY bar
 bar ]foo/foo
 
 Everything works fine -if- I delete the DTD declaration. But only if...
 
 I don't care about validity but problem is the source file is generetd
 by a dump from a CMS which insists on having the declaration like so. I
 tried putting the DTD in the same dir as the content XML, etc etc but no
 luck. Is there any setting which can force the parser to ignore DTDs or
 another place I should be putting the DTD file? I'd rather not write a
 nasty little parser just to strip out the doctype declaration...

Heh.. well if it helps, here's a 'nasty little parser' already written,
to do just this job:

http://doctypechanger.sf.net/

The javadocs explain why (I think) this sort of hack is the only real
solution.  If you prefer, Xerces XNI pull parsing can do the same thing.

It would be pretty easy to work this into a DOCTYPEMungingFileSource in
Excalibur.


--Jeff

 Thanks in advance,
 -cwk.

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



Re: AbstractTransformer or AbstractSAXTransformer?

2003-03-08 Thread Jeff Turner
On Sat, Mar 08, 2003 at 04:27:41AM -0800, gv wrote:
 I am writing a custom transformer that has to read all
 the XML into a data structure, manipulate the
 structure, then finally write everything in the
 structure back out.

DOMTransformer gives you a nice DOM to play with.

--Jeff

 From where would I call my manipulation code? Looks
 like I need to use AbstractSAXTransformer, but can
 this be done with AbstractTransformer?
 
 Thanks,
 John

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



Re: [NOTICE] *** CVS REPOSITORY SPLITUP ***

2003-03-08 Thread Jeff Turner
On Sun, Mar 09, 2003 at 01:04:26AM +, Pier Fumagalli wrote:
 Folks,
 
 being now Sunday in London (and God knows if I'm going to wake up
 tomorrow), I actually split the CVS as agreed.
...

Wiki page created to help people move existing 'xml-cocoon2' checkouts
across:

http://wiki.cocoondev.org/Wiki.jsp?page=CVSMigration

--Jeff

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



Re: Semantic linking (Re: Cinclude issues...)

2003-02-13 Thread Jeff Turner
On Thu, Feb 13, 2003 at 09:09:21AM -0500, Ben Young wrote:
 Hey Jeff,
 
 I've got cocoon-2.1 CVS up and running. I'm getting ready to play with
 some of the LinkRewriter stuff. I think the semantic linking will be a
 huge help in certain areas of our site. I'm glad I can continue to use
 the old relative linking too.

Actually, indirect linking is a better name than semantic.
Effectively, you're linking to an XPath node in an intermediate doc,
rather than a specific location.

 I'm still trying to figure out the cleanest way to implement all these
 features into the site map. We're at a place in our site development
 where what we do now will affect our predicessors positively or
 negatively for a good time to come.

I suppose KISS is the best approach then.  For a first iteration, it
might be best to forget about site: linking and concentrate on the menus.
It can be added later very easily, and be made to accommodate whatever
XML format you choose.

Here is a diff of the sitemap changes made in Forrest, to use site.xml
for both 'site:' linking and menu (book.xml) generation:

http://cvs.apache.org/viewcvs.cgi/xml-forrest/src/resources/conf/sitemap.xmap.diff?r1=1.45r2=1.45.2.1diff_format=h

 Since I can't bank that those who come after will be visionaries I
 have to try and get things in place that make since and work well by
 themselves. The less of a learning curve there is the better. I'm sure
 you understand. 8o)

Oo.. one thing to consider when managing big URI spaces: what happens
when they change?  Do the old URLs just break when a page reshuffle is
required?  I have a vague plan on how to solve this (mark obsolete pages
and generate redirects) in Forrest.

 I love the concepts of the semantic web and I want to get as close to it
 as possible. Currently, though, I'm surrounded with a trillion options
 and trying to dig through to what exactly it is that I need to do next
 in order to get there. asideIt seems to be a long sentence day.
 8o)/aside

:) Well sounds like many of the issues are similar to Forrest's.  Feel
free to mail me offlist about specific stuff.


--Jeff

 Thanks for listening to my rant. 8o) I'll probably post some RT's in the
 future about some of what I've been thinking.
 
 I don't know that there was a call to action in any of that, but any
 thoughts you (or anyone else) may have would be *greatly* appreciated.
 
 Thanks,
 Ben
...

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




Semantic linking (Re: Cinclude issues...)

2003-02-11 Thread Jeff Turner
On Tue, Feb 11, 2003 at 03:22:53PM -0500, Ben Young wrote:
 Ok, Jeff. I've been pondering this site.xml thing all day.

Btw, the LinkRewriterTransformer is currently only in 2.1.  Although as
the InputModules it depends on are also in 2.0.4, it could be ported
fairly easily.

 asideBTW, thanks for the upgrade suggestion. 8o)/aside I have a
 couple questions about semantic linking that maybe you can field.
 
 I don't want to give up the old linking method just yet, but I would
 like to use semantic linking for certain scenarios. Is this posible
 with the linkmap implementation?

Yes, it's not an either/or choice.  If a link happens to start with
'site:' (or somesuch prefix) it will be translated.  Pretty much any XML
format can be used, by changing the XPath prefix and suffix.

 In order to manage the 7,000+ pages I would definitely need the
 XInclude ability. Would that be very hard to add?

Just a matter of adding map:tansform type=xinclude/ to the pipeline.

Though, the XInclude transformer isn't very good.  XPointer support is
dodgy ('/site/samples' doesn't work, but '/site/samples/*' does), and
there is no support for the xmlns() scheme, meaning if your XML uses
namespaces like Forrest's site.xml, you have to use
*[local-name()='foo'].  You might be better off using XML entities;.

 How hard is it to set up one's own link schemas?

Requires defining a few input modules in cocoon.xconf and the sitemap.
See CVS Cocoon's linkrewriter block
(http://localhost:8080/cocoon/samples/linkrewriter/).  Actually, wait for
me to commit a fix for the bookdemo sample..

--Jeff

 Thanks for all your help, Jeff. This look a lot more promising and full
 featured then the way I was headed.
... 

-
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: Cinclude issues...

2003-02-10 Thread Jeff Turner
On Mon, Feb 10, 2003 at 02:09:17PM -0500, Ben Young wrote:
 Sorry Jeff, I guess I never gave an example of the what the proposed pipeline should 
look like.
 
 map:match pattern=**/index.htm*
   map:act type=sourcetype src=/home/htdocs/content/{1}/index.xml
map:generate src=cocoon:/{../1}/index.{sourcetype}/
   /map:act
   map:transform src=/home/htdocs/design/shell.xsl
 map:parameter name=path value={1}/
   /map:transform
   map:transform type=cinclude/
   map:serialize/
 /map:match

And doesn't it work?  What is the output just before the cinclude?

(sorry, I still haven't twigged.. what does shell.xsl do?)

 I've looked into the Forrest site.xml work and I like it for the most
 part, but the thought of managing a single navigational map for an
 entire 7,000+ page site seems a bit unruly.

Ouch.. yes it would.  With a sitemap tweak, site.xml could xinclude
site.xml's from subdirectories though.

 I'm trying to break it up into managable, human tolerant pieces. 8o)
 That, sarcasmoddly enough/sarcasm, is proving to be a daunting
 task. 8o)

Oh well, *humans*, there's your problem :o)  Upgrade to a species more
tolerant of complexity, and everything will be fine.

--Jeff

 Thoughts,
 Ben
 
  Jeff Turner [EMAIL PROTECTED] 02/09/03 07:33 AM 
 On Fri, Feb 07, 2003 at 09:00:19PM -0500, Ben Young wrote:
  I've recently attempted to use the cinclude to aggregate some files that I'm
  currently aggregating with the map:aggregate command, but I've run into some
  issues that I'm not sure how to resolve.
  
  My current map:match section looks like this:
  
  map:match pattern=**/index.htm*
map:act type=sourcetype src=/home/htdocs/content/{1}/index.xml
 map:aggregate element=document
map:part src=cocoon:/{../1}/../_navigation.xml
  element=navigation/
map:part src=cocoon:/{../1}/index.{sourcetype}/
 /map:aggregate
/map:act
map:transform src=/home/htdocs/design/shell.xsl
  map:parameter name=nav_filename
  value=/home/htdocs/content/nav_home.xml/
  map:parameter name=path value={1}/
/map:transform
map:serialize/
  /map:match
  
  I use an internal-only pipeline to find the nearest _navigation.xml file
  in existence.
  
  map:pipeline internal-only=true
map:match pattern=**/_navigation.xml
  map:act type=resource-exists
 map:parameter name=url
  value=/home/htdocs/content/{1}/_navigation.xml/
 map:generate src=/home/htdocs/content/{../1}/_navigation.xml/
 map:serialize type=xml/
  /map:act
  map:redirect-to uri=cocoon:/{1}/../_navigation.xml/
/map:match
  /map:pipeline
  
  I'd like to move the aggregation step after the shell.xsl is applied. The
  plan is to have the shell.xsl output a cinclude tag that uses the
  cocoon:// psuedo-protocol in the appropriate place using the $path
  parameter plus _navigation.xml
  
  My current trouble is that the cinclude only runs through the internal
  pipeline once.
 
 Perhaps my brain slipped out of gear, but that seems a bit cryptic..
 Don't you need a map:transform type=cinclude/ tag somewhere to get
 cinclude processing?
 
 
 --Jeff
 
 PS: in case you didn't know: Forrest does this kind of nav + body
 integration to generate pages like http://xml.apache.org/forrest/
 
 
  Thank you for any help you might be able to give,
  Ben

-
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: Cinclude issues...

2003-02-09 Thread Jeff Turner
On Fri, Feb 07, 2003 at 09:00:19PM -0500, Ben Young wrote:
 I've recently attempted to use the cinclude to aggregate some files that I'm
 currently aggregating with the map:aggregate command, but I've run into some
 issues that I'm not sure how to resolve.
 
 My current map:match section looks like this:
 
 map:match pattern=**/index.htm*
   map:act type=sourcetype src=/home/htdocs/content/{1}/index.xml
map:aggregate element=document
   map:part src=cocoon:/{../1}/../_navigation.xml
 element=navigation/
   map:part src=cocoon:/{../1}/index.{sourcetype}/
/map:aggregate
   /map:act
   map:transform src=/home/htdocs/design/shell.xsl
 map:parameter name=nav_filename
 value=/home/htdocs/content/nav_home.xml/
 map:parameter name=path value={1}/
   /map:transform
   map:serialize/
 /map:match
 
 I use an internal-only pipeline to find the nearest _navigation.xml file
 in existence.
 
 map:pipeline internal-only=true
   map:match pattern=**/_navigation.xml
 map:act type=resource-exists
map:parameter name=url
 value=/home/htdocs/content/{1}/_navigation.xml/
map:generate src=/home/htdocs/content/{../1}/_navigation.xml/
map:serialize type=xml/
 /map:act
 map:redirect-to uri=cocoon:/{1}/../_navigation.xml/
   /map:match
 /map:pipeline
 
 I'd like to move the aggregation step after the shell.xsl is applied. The
 plan is to have the shell.xsl output a cinclude tag that uses the
 cocoon:// psuedo-protocol in the appropriate place using the $path
 parameter plus _navigation.xml
 
 My current trouble is that the cinclude only runs through the internal
 pipeline once.

Perhaps my brain slipped out of gear, but that seems a bit cryptic..
Don't you need a map:transform type=cinclude/ tag somewhere to get
cinclude processing?


--Jeff

PS: in case you didn't know: Forrest does this kind of nav + body
integration to generate pages like http://xml.apache.org/forrest/


 Thank you for any help you might be able to give,
 Ben
 
 
 -
 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: Using Cocoon and ($tool) to generate static pages.

2003-02-09 Thread Jeff Turner
On Thu, Feb 06, 2003 at 06:07:02PM +0100, Andrea Censi wrote:
 Which is the best tool to create an offline copy of a cocoon live site?
 
 It should spider through the pages, follow every link and gather both html and 
 images/css/pdf. Then it should rearrange internal links from absolute to 
 relative (http://site/page; - page.html,  / - index.html).
 The result is to be loaded on a low-spec [ = no cocoon :( ] webserver.
 
 I don't consider the batch use from command line to be a viable alternative, 
 because:
  - There are different views of single xml files.

Don't the different views have different URLs?  If so, and if you link to
those different URLs, then they will each have a file written.

  - I don't want to explicitly change the internal URL format used by the site 
 (/ ... /page/ with a final slash)

I think the crawler will convert links to a directory, eg 'foo/' to
'foo/index.html'.

  - (not sure) Would it work with dynamic SVG-gif?

Yes. I'd say, give it a try.  Works fine rendering Forrest sites.
Alternatively, you could try spidering tools like 'wget'.

--Jeff


-
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.1 the usability release?

2003-01-27 Thread Jeff Turner
On Mon, Jan 27, 2003 at 01:28:30AM +0100, Robert Simmons wrote:
 One other feature would be more extensive documentation in the API. To
 see what I mean, look at the class level documentation on
 LinkSerializer. Hrmm ... I still don't know what it does. Perhaps its
 time to bust people's chops to document things. 

I'm glad to see you consider good documentation a priority.  I have
commit access to the relevant repositories, and I am willing to document
anything you like for a very reasonable $A10/class.  Please contact me
offlist for further information.

Of course... I ASSUME you'd be willing to pay someone, because how else
could you get volunteers to scratch YOUR particular itch? :)


--Jeff

 What I meant about the component documentation, by the way, is
 basically what is listed if you look at the package page in the API for
 the various components. 
 
 -- Robert
...

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




[OT] Re: Single JAR with all the libs?

2003-01-27 Thread Jeff Turner
On Mon, Jan 27, 2003 at 01:17:07PM +0100, Robert Simmons wrote:
 Does anyone know how, in Ant, to take a fileset and convert it to a space
 delimited list of files?

Something like:

pathconvert property=list dirsep= 
  path refid=...
/pathconvert

--Jeff

 -- Robert
 

-
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: Using docbook chunk.xsl with cocoon

2003-01-27 Thread Jeff Turner
On Sun, Jan 26, 2003 at 10:03:10AM +0800, Perry Molendijk wrote:
  
  I can post details if that's the problem you're trying to solve.
 
 Jeff that would be great if you could post this.

(sorry for the delay)

I used something close to this:

map:transformers
  ...
  map:transformer name=xpath
logger=sitemap.transformer.xpath
src=org.apache.cocoon.transformation.XPathTransformer
/
/map:transformers

...
map:match pattern=manual/*.xml

  map:generate src=content/xdocs/manual.xml/
  map:transform src=resources/stylesheets/docbook2document.xsl/
  map:transform type=xpath
map:parameter name=include value=document/header | 
document/body/section[title='{1}']/
  /map:transform
  map:transform src=resources/stylesheets/localizeheader.xsl/
  map:serialize type=xml/
/map:match


Where 'localizeheader.xsl' fixes the title:

xsl:template match=header/title
  titlexsl:value-of select=/document/body/section/title//title
/xsl:template

Actual sitemap + transformer available with:

export CVSROOT=:pserver:[EMAIL PROTECTED]:/cvsroot/aft
cvs login
cvs co Anteater/src/documentation


--Jeff

 Thanks
 
 Perry Molendijk 
 

-
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 versus taglibs

2003-01-25 Thread Jeff Turner
On Sat, Jan 25, 2003 at 01:26:09PM +0100, Jordi Valldaura wrote:
 Hello,
 
 Im developing a litle intranet

(plug.. http://xml.apache.org/forrest/ :)

, I want to use XML and i18n so I need XSLT transformation and
internacionalization support. I was planning to use cocoon, but
 Jeff Turner said  there were other ways to do this for example tablibs.
 
 My question is: are the tablibs (XTags  i18n) faster than cocoon with a
 simple sitemap transforming XSPs to HTML 

I think you'll have to test it for yourself.  Being straight SAX, Cocoon
should be faster, but real life often throws surprises, and theorising on
performance issues is pointless.

One thing to note though: if your XML rarely changes, Cocoon's caching
should help significantly.  There are caching taglibs around if you
choose the JSP route, but they won't be nearly as sophisticated as
Cocoon.

--Jeff

 The intranet will have an average of 200 concurrent users.
 
 Thanks in advance

-
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 is too complex for consumption?

2003-01-25 Thread Jeff Turner
On Sat, Jan 25, 2003 at 06:22:10PM +0800, Niclas Hedhman wrote:
 On Saturday 25 January 2003 14:17, Robert Simmons wrote:
  That is the impression that I am getting and I'm curious as to feedback
  from list users.
 
 I bet you will ;o)
 
  So how could cocoon be of use to me and others like me? If I could build a
  war with simply any special classes I have (generators, etc) my XSL pages
  and a sitemap. Then I deploy that war and cocoon figures out how to wire
  things together.
 
 In general I agree that Cocoon is too feature-oriented and not at all 
 user-oriented.
 If you know the product as the back of your hand, yes, you think everything is 
 dirt easy, but it is overwhelming to get started. (The good news is that it 
 is 10x better now than in the old days, when you needed ~10 additional 
 downloads and installations.)
 
 In fact, I think Cocoon is so powerful, that it has kind of grown out of its 
 servlet image. It should traverse to the next level (or two), and has its 
 own deployment system. Collect your stuff (sitemap and all) into a JAR and 
 hand it over. It is almost like that already, and should be a fairly easy 
 addition to make, but the developer community is much more focused on 
 additional features.

http://wiki.cocoondev.org/Wiki.jsp?page=BlocksDefinition
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=101603335007960w=2
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=101732982704553w=2



--Jeff

 Well, well... 
 
 Niclas
 

-
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: how to configure cocoon to spot sitemap changes without restarting

2003-01-24 Thread Jeff Turner
On Fri, Jan 24, 2003 at 02:07:16PM +, Simon Price wrote:
 I've not used cocoon for 3-4 months but I've just downloaded and got the 
 new 2.1 head running. There's some nice improvements - well done.
 
 Last time I used cocoon I had to make some changes in cocoon.xconf so 
 that any edits to the sitemap were detected without a restart. However, 
 the notes I made at the time no longer match what's now in xconf.

I think that applies to the old compiled sitemap.  The interpreted
sitemap in 2.1 reloads automatically (and quickly) when it is modified,
without conf tweaks.

Btw, if you're using CVS head, watch out for this bug:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16248

and also for Attempted to retrieve component with null hint errors..
the sitemap sytax changed (eg. map:pipelines - map:pipes) since 2.0.x.

 Is there an up-to-date guide somewhere on how to configure cocoon for 
 development?

There's a Wiki with lots of good stuff..

http://wiki.cocoondev.org/Wiki.jsp


--Jeff

 What are the best settings for caches, reloads etc. for easing development?
 
 Thanks in advance
 
 Simon

-
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: The simplest possible cocoon application?

2003-01-24 Thread Jeff Turner
On Sat, Jan 25, 2003 at 05:21:13AM +0100, Robert Simmons wrote:
 I currently have the cocoon war installed on my JBoss 3.0.4 server. It
 works fine. I deployed a second war file that contains an XML and an
 XSL. The XML has an embedded xsl:stylesheet processing instruction.

Embedded stylesheets are very unusual.. are you sure it's Cocoon applying
the embedded stylesheet, or the web browser?

 When I go to the URL inside the war and hit the XML page, the
 translation is made fine. 
 
 Ok so here is the question. I am now thinking of doing something a bit
 more than static XML pages. What would be the bare minimum? Do I have
 to copy the cocoon war and all the libs in it to another deployment or
 can I use the jars already deployed in the war?

Each war has one main sitemap.  Each sitemap can have lots of different
pipelines.  Where did the 'second war file' you mention come from?  Did
you copy the sitemap and WEB-INF/cocoon.xconf from the Cocoon samples
war?

 Do sitemaps work outside of the cocoon war?

No.  Wars are completely self-contained things.

 How can I set up a simple application, prior to considering generators,
 outside of the cocoon deployment?

What do you mean, 'outside' a deployment?

 Note. The lack of truly newbie cocoon documentation is appalling. 

Fortunately we have a Wiki where anyone can document things.  This page
looks quite relevant to your question:

http://wiki.cocoondev.org/Wiki.jsp?page=SimpleTransformations


--Jeff

 -- Robert

-
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: Using docbook chunk.xsl with cocoon

2003-01-24 Thread Jeff Turner
On Fri, Jan 24, 2003 at 04:45:43PM +1000, Jerome Paul wrote:
 Hi,
   I'm trying to convert xml documents using
 docbook-xsl-1.58.1\html\chunk.xsl with tomcat 4.0 and cocoon 2.0.4
 windows 2000.  Anyway the conversion takes a while (it's converting a
 decent sized xml document) when the conversion stops Internet explorer
 displays nothing when using the standard html\docbook.xsl it work fine.
 I'm pretty sure that the error is with the chunk.xsl because it's been
 hardcoded to write to the hdd and the way it actually creates many web
 pages instead of a single page.  Has anyone else had this problem?
 what's the solution that other people have used?

Er.. what does chunk.xsl do?  The one on my hdd doesn't seem to write to
disk..

Would I be correct in guessing that chunk.xsl breaks a large Docbook file
into chapters or something?  If so, you could use the XPathTransformer in
Cocoon bugzilla to achieve the same thing.  that's how I generated the
chapter views of a single XML file user manual at:
http://aft.sourceforge.net/manual/

I can post details if that's the problem you're trying to solve.

--Jeff

 any help would be greatly appreciated 
 Jerome
 

-
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: The simplest possible cocoon application?

2003-01-24 Thread Jeff Turner
On Sat, Jan 25, 2003 at 06:26:42AM +0100, Robert Simmons wrote:
 
 - Original Message -
 From: Jeff Turner [EMAIL PROTECTED]
 To: Cocoon Users [EMAIL PROTECTED]
 Sent: Saturday, January 25, 2003 6:02 AM
 Subject: Re: The simplest possible cocoon application?
 
 
  On Sat, Jan 25, 2003 at 05:21:13AM +0100, Robert Simmons wrote:
   I currently have the cocoon war installed on my JBoss 3.0.4 server. It
   works fine. I deployed a second war file that contains an XML and an
   XSL. The XML has an embedded xsl:stylesheet processing instruction.
 
  Embedded stylesheets are very unusual.. are you sure it's Cocoon applying
  the embedded stylesheet, or the web browser?
 
 Hmm, how could I tell?

'view source' in your browser.  If you see XML, then it's the browser
rendering. If you see HTML, Cocoon is rendering.

 What would you use if you didnt embedd the stylesheet into the XML? Oh,
 I get it, the pipeline tells it what transform to make ?

Yes.  In the sitemap you'd have a pipeline like:

map:match pattern=foo.html
  map:generate src=foo.xml/
  map:transform src=foo2html.xsl/
  map:serialize type=html/
/map:match

 Addendum: I undeployed cocoon from jboss and the transform still
 worked. Must be the browser doing it. OOK .. =)

:) What was the URL you were using?  Did it start with 'http:' or
'file:'?

 Now I feel like i actually know LESS than before.
 
 
   When I go to the URL inside the war and hit the XML page, the
   translation is made fine.
  
   Ok so here is the question. I am now thinking of doing something a bit
   more than static XML pages. What would be the bare minimum? Do I have
   to copy the cocoon war and all the libs in it to another deployment or
   can I use the jars already deployed in the war?
 
  Each war has one main sitemap.  Each sitemap can have lots of different
  pipelines.  Where did the 'second war file' you mention come from?  Did
  you copy the sitemap and WEB-INF/cocoon.xconf from the Cocoon samples
  war?
 
 
 What I mean is that, if possible, I dont want to copy the whole MASSIVE
 jar library in the cocoon distribution war into every blasted web app
 that I create.

There's lots of jars but most of them aren't big.  I have lots of webapps
with ~8mb of jars in their WEB-INF/lib.  What you lose in disk space, you
gain in webapp portability.

But if you really want a common set of jars, you can put them in Tomcat
4.x's lib/common/ directory.

 The thing thats stumping the newbie here is how a user
 uses it. It almost seems like i have to be practically a dveloper on
 cocoon to use it. I honestly dont care how it works, I just ultimately
 want to write come generators that smack a EJB and spit out XML that
 then gets transformed. Basically what i have right now is a normal java
 servlet that builds a dom document, serializes it to xml and trusts the
 xsl transform to put out the html and so on. The servlet has a massive
 number of methods from all the commands being handeled. I want to nuke
 that servlet and instead write cocoon generators to spit out the xml
 and then let cocoon do its magic. However after 12 hours of reading, Im
 still a tad lost.

wet blanket mode
Cocoon is big and complex (as you've found out).  Assuming all you want
to do is an XSLT transform on the end of your servlet, and this is a
once-off job, I'd suggest just using a JSP taglib or something to query
the servlet and transform the result.  Some simpler alternatives to
Cocoon:

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
http://jakarta.apache.org/taglibs/doc/xtags-doc/intro.html
http://mav.sourceforge.net/
http://jakarta.apache.org/commons/sandbox/jelly/

Also, remember you can make a single servlet *appear* to have multiple
URIs (one per command) with web.xml servlet-mapping sections and
request.getPathInfo().

/wet blanket mode

If you want a gentle introduction to Cocoon, you could download Forrest:
http://xml.apache.org/forrest/  (essentially 'pre-packaged' Cocoon for
project docs).  Once installed,
you type:

mkdir myproj
cd myproj
forrest seed # Generates a template project, with sitemap
forrest webapp   # Generates a webapp from your template project
forrest run  # Runs webapp in a webserver

Then view the Cocoon site at http://localhost:/, and you can
experiment with the sitemap in build/webapp/sitemap.xmap.

...
  Fortunately we have a Wiki where anyone can document things.  This
  page looks quite relevant to your question:
 
 
 I will read it ... but I have to say that this looks liek a very
 powerful front end that once you know it, it is great. Prior to that
 there is ALLOT of head scratching. And I dont think im any lightweight
 at programmign either.

It's like a sledgehammer.. big, powerful, not suitable for all problems.

--Jeff

  http://wiki.cocoondev.org/Wiki.jsp?page=SimpleTransformations
 
 
  --Jeff
 
   -- Robert
 
  -
  Please check that your question  has not already been

Re: WebSphere 5 and Cocoon - new user

2003-01-22 Thread Jeff Turner
We had this sort of problem with Jetty too.  The redirect rule from
http://localhost:8080/forrest to http://localhost:8080/forrest/index.html
actually caused a redirect to http://localhost:8080/index.html.

We currently have the following redirect working in Jetty and Tomcat:

map:match pattern=
  map:redirect-to uri={request:contextPath}/index.html/
/map:match

This is with 2.1.  I can't recall if 2.0.4 has InputModules -- check
WEB-INF/cocoon.xconf for a section like:

  input-modules
  ...
  component-instance
  class=org.apache.cocoon.components.modules.input.RequestModule
  logger=core.modules.input name=request/


There's an Action that can achieve the same thing without InputModules.

...
map:actions
   map:action logger=sitemap.action.request name=request
   src=org.apache.cocoon.acting.RequestParamAction/
/map:actions
...

map:match pattern=
  map:act type=request
map:redirect-to uri={context}/index.html/
  /map:act
/map:match


I don't know if this hack is just hiding a Cocoon deficiency, or a valid
workaround for servlet container bugs.


--Jeff


On Wed, Jan 22, 2003 at 10:00:46AM +0100, Gernot Koller wrote:
 Hi!
 
 I posted about similar problems yesterday: 
http://marc.theaimsgroup.com/?l=xml-cocoon-devm=104316925213149w=2
 still looking for a workaround :-(
 
 Gernot
 
 
 22-Jan-03 01:35:07, Cameron McKenzie [EMAIL PROTECTED] wrote:
 
 I'm trying to sell my coworkers on cocoon and
 WebSphere, but when I install it on websphere 5, both
 the WSAD and the server, I get a continual redirect at
 the welcome page, and nothing works.  
 
 However, the same war works fine on Tomcat and
 WebSphere 4.  Any ideas?  I can't convince my friends
 to use Cocoon if I can't get it to work!
 
 -Cameron Mckenzie
 
 -
 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: Standard in creatring xml files

2003-01-22 Thread Jeff Turner
On Wed, Jan 22, 2003 at 02:11:05PM +0330, Alireza Fattahi wrote:
 Hi,
 
 We want to create a web site with 40 pages. The site has typical input forms
 and search/search result pages. We want to have some XSL files as the
 template for these pages. Of course we should not have 40 xsl files, but 40
 xml files. But, how? 
 
 Here is an example:
 Suppose we have two search result pages that generate these xml files.
 1) 
 customer
   nameAlireza/name
   familyFattahi/family
 /customer
 
 2)
 product
   brandIBM/brand
   price10,000/price
 /product
 
 We should create 2 xsl files for parsing if there are 40 files we should
 create 40 file! Is it correct?

If you want 40 different kinds of output, then you need 40 XSLTs.  You
could probably make just a few and parametrize them.

If you want just a few output formats, you can have intermediate adaptor
stylesheets converting a common XML 'searchresults' format.

 Is there any guideline that can help us creating a standard for these
 typical applications? What standards should be obeyed by (for example) a
 typical search result page?

RDF is nice and generic.  I've used DSML (LDAP searchresult XML format)
before.  Also, you could reuse the Google search result XML format.  See
http://www.google.com/apis/


--Jeff

 Alireza
 

-
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: serializing inside a transformer

2003-01-20 Thread Jeff Turner
On Mon, Jan 20, 2003 at 01:00:41PM +0100, Oskar Casquero wrote:
 Hi,
 
 I would like to serialize SAX events to a file inside a transformer, so
 that I can validate the file with the parser. The problem is that I
 don't how to set the serializer in order to make it able to receive the
 SAX events which the transformer is receiving from the previous
 component (a generator or another transformer).

How about inheriting from DOMTransformer, and then (if possible)
validate the DOM directly, or use o.a.c.xml.XMLUtils#serializeNode() to
get a String which you can validate?

It's a nasty hack though.  Best way would be to write a
ValidatorTransformer that validates SAX events as they go past:

http://iso-relax.sourceforge.net/JARV/JARV.html#use_42


--Jeff

...
 Oskar

-
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: xinclude performance issues,

2003-01-20 Thread Jeff Turner
On Thu, Jan 16, 2003 at 03:11:37PM -0800, icewind wrote:
 Let me describe what I am doing:
 
 I have a directory that contains .xml files. In my
 sitemap, I have a pipeline that starts with a
 DirectoryGenerator on this directory. I then have a
 transformation that takes the directorygenerator's
 output and puts some xi:include tags with xpointers to
 some tags in the xml files I am interested in. I then
 run the xinclude transformation and serialize to html.

You could try the XPathDirectoryGenerator in Cocoon CVS.  It lets you
specify nodes in each file to include in the directory listing.  For
instance, to generate a page listing Ant scripts and their
descriptions:

http://aft.sourceforge.net/examples/index.html

I used:

map:generate type=xpathdirectory
   src=content/xdocs/examples#/project/description/


--Jeff

-
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: serializing inside a transformer

2003-01-20 Thread Jeff Turner
On Mon, Jan 20, 2003 at 07:52:24PM +0100, Oskar Casquero wrote:
 I agree with you. I thought that using a serializer would be useful to get
 an input source for the parser. But now I see that it would be much better
 to use JARV to develop the transformer based only in SAX events (use 4_2 of
 JARV), as you suggested.
 
 I have another question, which is the same I did before: how do I set the
 VerifierHandler of JARV in order to send to it the SAX events the
 transformer is receiving from the previous component? With
 super.setContentHandler(verifierHandler), perhaps?
 
 public class ValidationTransformer extends AbstractSAXTransformer {
 ...
 super.setContentHandler(verifierHandler);
 ...
 }

Yes I think so.  As an example of this, have a look at how
AbstractSAXTransformer handles 'recorders'.

--Jeff


 Thank you
 Oskar

-
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: TransFormers

2002-10-16 Thread Jeff Turner

On Wed, Oct 16, 2002 at 01:57:38PM +0900, Tanmay Kumar wrote:
 Hi all,
 
 I am finding Cocoon very useful for our project. Thanks a lot to the
 developers...
 I have one requirement like this. Is there any Cocoon class to address this
 issue?
 Input will be a DOM node, but while parsing the DOM node all SAX events
 should be fir.
 
 Example:
 
 R
 A101/A
 BWorld/B
 /R
 
 While it got the root element as 'R', startElement() method should be
 invoked with proper arguments i.e name, attributelist.
 
 Again when the child element is a text node as per DOM(101 in ex.) ,
 characters() method should be fired.

I think you want org.apache.cocoon.xml.dom.DOMStreamer:

 * The codeDOMStreamer/code is a utility class that will generate SAX
 * events from a W3C DOM Document.

If you want to use this in a Transformer, have a look at
AbstractDOMTransformer.

--Jeff

 
 thanks,
 Tans

-
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: Aggregation of xml in a directory

2002-10-13 Thread Jeff Turner

On Sat, Oct 12, 2002 at 02:08:16PM +0100, Alex McLintock wrote:
 Hi folks,
 
 I am trying to figure out how to get Cocoon to display all the xml files in 
 a directory without being explicitly told each of their names in the 
 sitemap.

Have a look at the XPathDirectoryGenerator in the scratchpad. With it,
you can generate a directory listing, with a node extracted from each
file. Eg, I used it to extract description elements from a list of Ant
scripts:

http://aft.sourceforge.net/examples/

The relevant config was:

map:sitemap ..
  map:components ..
map:generators ..
  map:generator  name=xpathdirectory
src=org.apache.cocoon.generation.XPathDirectoryGenerator/

  .
  !-- examples/index.html, listing all scripts --
  map:match pattern=examples/index.xml
map:generate type=xpathdirectory
  src=content/xdocs/examples#/project/description/
map:transform
  src=resources/stylesheets/antdirectory2document.xsl/
map:serialize type=xml/
  /map:match


--Jeff


 I guess I need a combination of the Directory Generator and the Aggregation 
 tools.
 
 I am not too worried about the order of the files otherwise I would have to 
 use an XML database - which I would like to avoid if possible.
 
 PS I have looked in the Langham/Ziegeler book but can't find anything 
 useful.
 
 Do I need to write a DirectoryAggregation Generator in Java? perhaps others 
 would find it useful too.
 
 Alex

-
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 to PDF

2002-10-11 Thread Jeff Turner

On Fri, Oct 11, 2002 at 01:42:33PM +0200, Marquardt, David wrote:
...
  Is there any possibility to create a dynamic barcode in XML and to
  show it in PDF format via Cocoon?

http://www.google.com/search?q=barcode+fop looks interesting.

--Jeff

  I'd really appreciate if you sent me a short example!
  
  Best regards,
  David Marquardt

-
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 on Headless Linux with JDK1.4

2002-10-02 Thread Jeff Turner

On Wed, Oct 02, 2002 at 09:05:16AM +0200, Bert Van Kets wrote:
 My ISP can provide me with a headless web server running Suse 7.3, Resin 
 2.4 (I think) and JDK 1.4.  He does not want to install the X libraries due 
 to security reasons :-(
 Is there an alternative?  AFAIK pja does not run on JDK 1.4

Xvfb (X virtual framebuffer) works nicely.

--Jeff

 Thanks,
 Bert
 
 This mail is written in 100% recycled electrons.
 
 
 -
 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: Cocoon on Headless Linux with JDK1.4

2002-10-02 Thread Jeff Turner

On Wed, Oct 02, 2002 at 01:04:29PM +0200, Bert Van Kets wrote:
 Doesn't Xvfb need the X libraries too?

I don't think so; at least Debian doesn't list any X packages as a
dependencies, and says Xvfb can be used as an aid to porting the X
server to a new platform.

--Jeff

 Bert

-
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: Other webapps with Cocoon

2002-09-24 Thread Jeff Turner

On Mon, Sep 23, 2002 at 04:14:06PM -0500, Mark Kent wrote:
 Simple question (easy answer?)
 
 We are using the JBoss-3.0.0_Tomcat-4.0.3 package and running our webapps
 from the deploy folder in [JBOSS_HOME]/server/default/deploy (where the
 webapps are deployed).  The Cocoon 2.0.3 (as cocoon.war) runs nicely from
 there.  I have another existing webapp (call it CL) running all of my
 JSP's from an deploy/cl.ear/cl.war setup.  Everything is fine.  Each app
 (mine and Cocoon) runs nicely on it's own.
 
 i.e.:
   [JBOSS_HOME]/server/default/deploy/cl.ear./cl.war
   [JBOSS_HOME]/server/default/deploy/cocoon.war
 
 These are referenced in a URL with:
 http://localhost/cl/   and
 http://localhost/cocoon/
 
 Now, I want an existing JSP form from my cl.app to gather and post report
 selection criteria to create HTML/PDF/XML/CSV reports (using Cocoon and it's
 nifty serializers).  I'm trying to figure out how to configure these under
 JBoss/Tomcat (mostly Tomcat I think) to send this form to my Cocoon URI
 which is in a different context (is that the right term?).
 
 Sequence:
 - User logs in to cl app through JSP page and creates Tomcat session var for
 authentication.
 - User selects report options from a form in my app. (this page checks for a
 valid session var before allowing access)
 - What is the best way to pass (post) these parameters to my Cocoon XML page
 making sure that the person is logged in before running the report (I don't
 want to allow any visitor to run reports)?


Tomcat 4 has a feature called single sign on:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/host.html

That only works if you're using container-managed authentication
(configured in web.xml).

Otherwise, I don't know.. perhaps you could have a JNDI context shared
between the two webapps? Pass a key from one app to another?  Nothing
really Cocoon-specific.


--Jeff


 As you can see, my site is running Cocoon for the reporting part only, not
 all of the other bells and whistles that Cocoon can do (rewriting to use
 Cocoon only is not an option).  My reports DO run just fine from the cocoon
 URI using Oracle db pooling and XSL styles sheets.
 
 How can I call them from my other webapps securely?
 
 mark

-
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: Problem with homemade logicsheet

2002-09-24 Thread Jeff Turner

On Tue, Sep 24, 2002 at 01:25:22PM +, Alan Hodgkinson wrote:
...
   xsp:styesheet version=1.0
 ^^^

Probably just a typo in the email, but make sure that the real thing has
'xsl', not 'xsp'. I've made that mistake a few times ;P

--Jeff

...

-
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.1 Build Problem

2002-09-21 Thread Jeff Turner

On Sat, Sep 21, 2002 at 02:18:54AM -0500, Ivelin Ivanov wrote:
 
 For the last few nights I have been trying to build the latest code from CVS
 HEAD.
 build clean webapp-local
 always succeeds, but the generated class files are corrupted.
 Also the libraries files copied under WEB-INF/lib are corrupted.
 I've tried with both JDK 1.3 and JDK 1.4. Same outcome.
 I've tried building from scratch in multiple directories on my disk.
 Always the same.

Perhaps you have *.class files in src/java/*, and they are being
filter-copied to build/cocoon/webapp/WEB-INF/classes.

I've just tried:

./build.sh -Dinclude.webapp.libs=yes clean webapp-local

and the generated webapp works fine.

--Jeff

 Has any experienced this before? How did you fix it?
 
 Any help appreciated,
 
 -=Ivelin=-

-
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: XPath transformer?

2002-09-02 Thread Jeff Turner

On Fri, Aug 30, 2002 at 10:55:03AM +0200, Luca Morandini wrote:
  Not easily, because the 'match' attribute cannot be dynamic. Eg, I
 
 Oh, I see... so you want a *dynamic* selector.
 
 Hmm... this was not apparent from your example, It seemed you wanted
 just a way to select one chapter amongst many.
 
 Anyway, I think you should dirt your fingers with Xalan to get want you
 want.

Yes, it can be done with document()

 I cannot appreciate if this prospective XPathTransformer could be
 of general use, though... I never had such a need myself.

FTR, I submitted an XPathTransformer at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12235

--Jeff


 Best regards,
 
 
 -
Luca Morandini
GIS Consultant
   [EMAIL PROTECTED]
 http://utenti.tripod.it/lmorandini/index.html
 -

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




XPath transformer?

2002-08-30 Thread Jeff Turner

Hi,

I have a user manual in XML format:

document
  body
s1 title=Introduction
  ...
/s1
s1 title=Getting Started
  ...
/s1
...
  /body
/document

Is there any way that I could extract out just one s1 element, and
render it as a page? Ie, like an XPath transformer, that would extract a
single node:

map:match pattern=manual/*
  map:generate src=manual.xml/
  map:transform type=xpath select=/document/s1[@title='{1}']/
  map:transform src=chapter2html.xsl/
/map:match

I could then link to chapters with link
href=manual/Introductionintroduction/link.

Is this possible, or should I write my own transformer?

thanks,

--Jeff

-
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: XPath transformer?

2002-08-30 Thread Jeff Turner

Thanks (Luca too:) for the rapid replies.

On Fri, Aug 30, 2002 at 10:21:47AM +0200, Koen Pellegrims wrote:
 What you are trying to do can just as easily be achieved with xslt, can't
 it?

Not easily, because the 'match' attribute cannot be dynamic. Eg, I
couldn't do:

xsl:param name=xpath-expr/

xsl:template match=$xpath-expr
  xsl:copy-of select=./
/xsl:template

AFAIK this is for the same reason that Cocoon doesn't currently have an
XPath matcher.

 If you *really* want xpath, you can always write a small xsp-page that
 generates an xinclude-statement and then run it through the
 xinclude-transformer (which, IIRC will be merged with the cinclude
 transformer into a single 'include'-transformer in the near future).

That's a good idea. I'll have a go.

thanks,

--Jeff

 K.
 
  -Oorspronkelijk bericht-
  Van: Jeff Turner [mailto:[EMAIL PROTECTED]]
  Verzonden: vrijdag 30 augustus 2002 10:25
  Aan: [EMAIL PROTECTED]
  Onderwerp: XPath transformer?
 
 
  Hi,
 
  I have a user manual in XML format:
 
  document
body
  s1 title=Introduction
...
  /s1
  s1 title=Getting Started
...
  /s1
  ...
/body
  /document
 
  Is there any way that I could extract out just one s1 element, and
  render it as a page? Ie, like an XPath transformer, that would extract a
  single node:
 
  map:match pattern=manual/*
map:generate src=manual.xml/
map:transform type=xpath select=/document/s1[@title='{1}']/
map:transform src=chapter2html.xsl/
  /map:match
 
  I could then link to chapters with link
  href=manual/Introductionintroduction/link.
 
  Is this possible, or should I write my own transformer?
 
  thanks,
 
  --Jeff
 
  -
  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]
 

-- 
Hell is a state of mind. And every state of mind, left to itself,
every shutting up of the creature within the dungeon of it's own
mind -- is, in the end, Hell.
  C.S. Lewis, _The Great Divorce_

-
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: FOP again.. And html

2002-08-29 Thread Jeff Turner

On Fri, Aug 30, 2002 at 10:23:31AM +0930, Tim Cavanagh wrote:
 Hi,
 
 Sorry if this is the wrong place to ask this question..
 
 I am using fop to serialize pdf from xml docs.
 
 Is it possible to substitute or remove html tags that are mixed in with
 plain text within an XML element.  These tags are only simple ones like
 bxsx/b and OL's, UL's. Can this be done with fo or xslt?

Are the tags part of the XML tree, eg:
description
  A bshort/b description
/description

If so, just copy through the content:

xsl:template match=b|ol|ul
  xsl:value-of select=./
/xsl:template


--Jeff

-
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: Content-Disposition Header Field and Reader

2002-07-28 Thread Jeff Turner

On Fri, Jul 26, 2002 at 10:56:21PM -0400, Vadim Gritsenko wrote:
  From: Tammo van Lessen [mailto:[EMAIL PROTECTED]]
  
  Hello,
  
  i've a question about sending response headers in a reader. I would
  like to send a file to the browser with an other filename than the
  request url.
  
  Ex: Request: 20020302.store will be saved as test.zip
  
  I think, this could be done with the Content-Disposition header
  field, but I dont know, where I have to set it in the reader!
 
 From HttpHeaderAction.java:
 
 * This action adds HTTP headers to the response.
 
 Sound like what you need. Sitemap will be close to:
 
 map:act type=set-header
   map:parameter name=Content-Disposition value=test.zip/
 /map:act

Or to be more RFC-compliant:

Content-Disposition: attachment ; filename=test.zip

I found this works beautifully in Mozilla, but not at all in IE5.5,
which seems to ignore the Content-Disposition altogether. 

--Jeff

 Vadim
 
 
  
  Does anybody have an example for me?
  
  Thanks
Tammo
  

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




Elephants and Mavericks (Re: Giving up! Cocoon too big, slow and confusing)

2002-06-29 Thread Jeff Turner

Thanks for the honest words, instead of silence.

I am reminded of the following definition:


second-system effect n. 

  When one is designing the successor to a relatively small, elegant,
  and successful system, there is a tendency to become grandiose in
  one's success and design an elephantine feature-laden monstrosity. The
  term was first used by Fred Brooks in his classic The Mythical
  Man-Month: Essays on Software Engineering. It described the jump from
  a set of nice, simple operating systems on the IBM 70xx series to
  OS/360 on the 360 series. A similar effect can also happen in an
  evolving system; see Brooks's Law, creeping elegance, creeping
  featurism.

  http://www.tuxedo.org/~esr/jargon/html/entry/second-system-effect.html

The choice is to stick around and help fix things (if indeed they are
broken), or jump to a lighter alternative like Maverick:

  Maverick is a minimalist web publishing framework which combines the
  best features of Struts and Cocoon and yet is far simpler than
  either.
  http://marc.theaimsgroup.com/?l=velocity-userm=102387923624439w=2


--Jeff


On Wed, Jun 26, 2002 at 10:41:14PM -0400, John Austin wrote:
 I'm back from a short vacation in beautiful Chicago (it really is much 
 nicer than Toronto or Montreal) and have waded back in to Cocoon for a 
 couple of days.
 
 After just a few hours of poking around I have decided that it will be 
 much simpler for me to simply hand-code a whole hat-full of servlets 
 than to try and pull any meaning out of Cocoon and it's documentation.
 Fifteen hours on the Interstate wasn't as challenging as trying to 
 figure out how one should check a Web Form this month but I didn't have 
 that feeling of travelling backwards half of the time. I was also able 
 to predict and achieve forward progress (for a change).
 
 Thanks guys, but no thanks. 
 
 Maybe I'm getting old, but I really don't understand the need for all 
 of the complexity and the lack of documentation in this product.
 
 On the other hand, I used to feel the same way about the mind-numbing 
 complexity of a certain thirty-year-old mainframe operating system 
 (MVS) produced by IBM back in the sixties and it's patching system 
 (SMP4). So it can't just be my age. 
 
 Anyway, Cocoon has cost me far morte (a typo that's better than the 
 original word) time than it was worth. The chief problems appear to 
 have been endlessly re-invented terminology for an overwhelming number 
 of 'new concepts' and a complete lack of consistency between different 
 components (i.e. functional code, non-functional examples, unbuildable 
 documentation and a website that doesn't match up with any single 
 released version of the project).
 
 I have a lot of respect for the ability of the people who have built 
 this project, but I want them to know that their project appears to be 
 out-of-control and could become very difficult to manage. If 
 experienced developers (like myself) can't figure out how to use enough 
 features in the product to make it worth using, then penetration will 
 be limited and all of your efforts will be wasted. There is more to 
 this business than stuffing in features at the expense of documentation 
 and testing. You have a lot of very good ideas, but the execution of 
 the project as a whole seems to be suffering.
 
 I know that I will often look at my JSP and servlet code and think 'XSP 
 and Cocoon were sooo much better!' until I remember that I wasn't ever 
 able to use enough of Cocoon to make a profit.
 
 Oh, well, at least all of my test systems have bags of memory now!
 

-
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: Separating icons' file name from main XSL

2002-03-07 Thread Jeff Turner

On Wed, Mar 06, 2002 at 04:21:23PM +0100, TREGAN Fabien wrote:
 Hi,
 
 I'm making my first Cocoon application.
 Like many others, all it does is open an XML file and create a table from it
 using an XSL file.
 
 I'd like to have the definition of each icon's file to be outside of the XSL
 (to be able to change it update it quikly, use definitions from other .xsl,
 ...)
 
 Wich way is the best :
 -Have the first XSL create icon wich=..., and a second XSL replace
 icon by img src=... ?
 -Use xsl:variables and xsl:include/import ?
 -Agregate an XML list of icone-name-file-name association ? *
 -Use the i18n transformer ?
 -Other Cocoon specific feature I missed ?

How about storing the icons in a separate data XML file, which you
then load in the stylesheet using the XPath document() function.

If you're going to be playing with XSL much, I'd highly recommend
Michael Kay's XSLT Programmers Reference.

--Jeff

 Wich are the point that can make the response different in a cocoon
 environnement from wich it would have been in a standard (servlet/JSP) env ?

??

-
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: problems parsing xml from a foreign source in c2.0.0

2002-03-07 Thread Jeff Turner

Hi Donald,

As a quick and dirty fix, you might want to try the SGML Open Catalog
support that David Crossley added. That way you could map -//NLM//DTD
QueryResult, 22 Jan 2002//EN to either the remote URL, or a local file
(faster).


--Jeff

On Thu, Mar 07, 2002 at 12:29:43AM -0500, Donald Ball wrote:
 hey guys. i'm trying to retrieve some xml content over http to begin one
 of my pipelines:
 
 /nlm/query?author=Smith
 
 map:match pattern=nlm/query
   map:match type=request pattern=author
 map:generate 
src=http://www.ncbi.nlm.nih.gov/entrez/utils/pmqty.fcgi?db=PubMedamp;mode=XMLamp;dispmax=999amp;term={1}[au]/
 map:serialize type=xml/
   /map:match
 /map:match
 
 the xml returned from the nih server will begin like so:
 
 ?xml version=1.0?
 !DOCTYPE QueryResult PUBLIC -//NLM//DTD QueryResult, 22 Jan 2002//EN
 /entrez/query/DTD/pmqty_020122.dtd 
 QueryResult
 
 unfortunately, cocoon tosses an exception when trying to parse this
 document. it claims that it cannot access the dtd. however, it does not
 appear that it's actually trying to get the DTD from the proper url:
 
 http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pmqty_020122.dtd
 
 since the dtd is actually accessible at that url. it seems like the url
 context information for the source xml is lost, which doesn't seem right.
 anyone know what's up with that? is there another generator i should be
 using?
 
 as a workaround, i tried to figure out how to disable validation to ignore
 the issue completely. well, it seems that in c2.0.0, you cannot configure
 the parser's validation behavior in the cocoon.xconf file. i looked in the
 source for JaxpParser, and was surprised to note the parser factory's are
 configured to create non-validating parsers:
 
 public JaxpParser ()
 throws SAXException, ParserConfigurationException {
 this.factory.setNamespaceAware(true);
 this.factory.setValidating(false);
 this.docfactory.setNamespaceAware(true);
 this.docfactory.setValidating(false);
 }
 
 if this is right, why is the parser trying to validate?
 
 - donald
 

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




[OT] Cocoon - jakarta-taglibs similarities

2002-01-02 Thread Jeff Turner

Just a random thought..

Recently, Jakarta taglibs (http://jakarta.apache.org/taglibs/) and
Cocoon have been looking very similar in terms of functionality.

Have a look at the list of taglibs. SQL, XSL, XTags, JNDI.. at one time, Cocoon
was the only game in town for some of these. No longer.

And then there's the IO taglib, which includes a Tag Pipelining Proposal,
which defines an API for transformers. A quoted example:
  
  xsl:apply xsl=someStylesheet.xsl
io:soap url=someSoapURL SOAPAction=doSomething
  xsl:apply xsl=xmlRpcToSoap.xsl
io:xmlrpc url=someXmlRpcUrl
  io:body
methodCall
  methodNamedo.something/methodName
params
  param
valuei41234/i4/value
  /param
/params
/methodCall
  /io:body
/io:xmlrpc
  
  /xsl:apply
/io:soap
  /io:xmlrpc
  
  The above example looks like a relatively small block of XML but its actually
  doing quite a lot. Reading from inside-out, its calling an XML-RPC service
  with some XML data then using XSLT to style the result into a SOAP request
  which is then HTTP POSTed into a SOAP service. The result of the SOAP request
  is then styled again using XSLT and output to the users browser.

 (http://jakarta.apache.org/taglibs/doc/io-doc/index.html)


So far, taglibs have lacked the final serializer step, where XML/whatever is
rendered to a binary format, but even that is changing, with recent proposals
to add an image taglib[1] and an xsl-fo taglib [2].

I think here we have another example of Worse is Better [3]. The JSP virus
has spread. People attracted to it's low initial overhead have improved it's
functionality to around 90% of what users really need. It may never reach that
last 10% (stream-based IO vs. SAX, for example), but it's Good Enough.

Thoughts?


--Jeff


[1] http://marc.theaimsgroup.com/?t=10072519912r=1w=2
[2] http://marc.theaimsgroup.com/?t=10069506493r=1w=2
[3] http://www.ai.mit.edu/docs/articles/good-news/subsection3.2.1.html


-
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: [c1] java.lang.NoClassDefFoundError with custom class?

2001-12-17 Thread Jeff Turner

From xdocs/todo.xml:

  action context=code bugid=11
Add standard WEB-INF/classes and WEB-INF/lib to XSP classpath.
  /action

So I don't think it's possible with Cocoon 1. It looks like XSP pages
have their own classloader
(org.apache.cocoon.processor.xsp.language.java.XSPClassLoader), and
perhaps that's not delegating like it should.

Btw, Tomcat 4 (and 3.3) ignores your system classpath, so setting it on
the command-line won't work. I think there's a magic property either in
Tomcat or Cocoon that lets you bypass this.

Um. Not sure what the solution is :/

--Jeff

On Fri, Dec 14, 2001 at 12:29:59PM -0500, Brent L Johnson wrote:
 I'm running Cocoon 1.8.2 and I've just upgraded from Tomcat3.x to
 Tomcat4.0.1.  According to Tomcat's documentation, anything in
 WEB-INF/classes is available (so I dont have to put it in my
 classpath). I've got my own com.blah.globals package in
 WEB-INF/classes/com/blah/globals.  When I try and import this in my
 cocoon logicsheet I get a NoClassDefFoundError:
 
 java.lang.NoClassDefFoundError: com/rrp/globals/Globals at
 _home._reedy._docs._production._pcteachit_com._temp.init(_temp.java:33)
   at java.lang.Class.newInstance0(Native Method)
   at java.lang.Class.newInstance(Class.java:237)
 
 If anyone has any ideas on this I would really appreciate it.  I tried
 adding it to my classpath and restarting everything and I still get
 the same error.
 
 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]




Re: Help needed with debugging XSP

2001-12-14 Thread Jeff Turner

On Fri, Dec 14, 2001 at 05:05:44PM +0900, Adam A R wrote:
 Hello all,
 
 I am using Cocoon 1.8 with iAWS server.
 
 I have the following flow in my application.
 
 XML - XSP - XSLT
 
 XML file processed by XSP(actually an XSL) to add dynamic content. The
 output of which is transformed by a Stylsheet and the result returned
 to the user.
 
 Now, I want to look at the output generated by the XSP.

Just remove the ?cocoon-process type=xslt? PI, and change the MIME
type specified in cocoon-format to text/xml. So at the top of your XML
you'd have:

?cocoon-process type=xsp?
?cocoon-format type=text/xml?

You could also leave the XSLT processor in place, but use either:

 -  an identity transform stylesheet that doesn't alter the incoming
XML,
 -  a stylesheet that pretty-prints the XML for viewing in the browser
(like IE does).

I've attached a simple identity transform xsl. You can find a good view
XML as HTML stylesheet in xml-xalan/java/samples/servlet/default.xsl

When developing, I like to be able to switch to the debug stylesheet
without editing XSPs. You can dynamically select the applied stylesheet
with an XSP like this:

?cocoon-process type=xsp?
?cocoon-process type=xslt?
xsp:page language=java
xmlns:request=http://www.apache.org/1999/XSP/Request;
xmlns:xsp=http://www.apache.org/1999/XSP/Core;
xmlns:util=http://www.apache.org/1999/XSP/Util;
page
xsp:pi target=xml-stylesheethref=
xsp:expr
  request:get-parameter name=ss default=normal.xsl /
/xsp:expr
 type=text/xsl/xsp:pi

/page
/xsp:page

Then by default, normal.xsl will be applied, but if you append
?ss=identity.xsl, you'll get identity.xsl applied instead.


--Jeff

 cheers
 Adam


?xml version=1.0?

!-- An identity transformation
 [EMAIL PROTECTED]
 --
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xsl:output method=xml media-type=text/xml indent=yes/

xsl:template match=/
  xsl:copy-of select=node()/
/xsl:template

/xsl:stylesheet



-
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: SVG, JPEG, PNG and Xvfb

2001-10-19 Thread Jeff Turner

On Fri, Oct 19, 2001 at 04:59:15PM +1000, Phil Blake wrote:
 Hi all,
 
 I'm making an attempt to get SVG's working.
 
 My understanding is that svg2jpeg and svg2png currently has a dependency 
 on Xvfb.
 
 I'm running MacOS X so I installed Xfree86, including Xvfb and used the 
 script submitted by someone on the list:
 
 if [ $1 = stop ] ; then
  # kill off any framebuffer running, kill kill kill :-)
  kill -TERM `/sbin/pidof Xvfb`
 elif [ $1=start -o $1=run ] ; then
  # start up a virtual framebuffer for cocoon2's rendering
  Xvfb :1 -screen 0 320x240x24 
 ^^

320x240 is a rather miserable little framebuffer ;) Perhaps try increasing to
1024x768 or something. Just guessing.

FYI, here's some Xvfb install notes I wrote for non-Cocoon stuff:

http://newgate.socialchange.net.au/~jeff/docs/tomcat/Xvfb.html


--Jeff

-
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] standalone example?

2001-10-04 Thread Jeff Turner

On Thu, Oct 04, 2001 at 05:04:29PM -1000, Russell Castagnaro wrote:
 Aloha cocoon-users,
 
   I'm trying to find an example of using C2 standalone.  I actually
   want to use it in an EJB, but first things first.  I've looked at
   the environment package, which seems to have the classes all set up
   to make it happen.  If somebody could just give me a simple example
   that did this, I think I'd be fine from there.

Do you have CVS there? The latest Cocoon in CVS builds it's own
documentation offline. Check it out of CVS, and type ./build.sh
newdocs.

Otherwise, you should be able to type 'java -jar cocoon.jar' and have it
run. Your cocoon.jar needs to be in the same directory as the other
required jars.

As for running in an EJB, that might not be a good idea (though I don't
know your situation). Cocoon is meant to be a framework, not a library
to be used in other code.


--Jeff

   Much Appreciated
 
 -- 
 Mahalo,
  Russell  mailto:[EMAIL PROTECTED]
 Chief Mentor
 
 4Charity - Changing the world,
  one click at a time.

-
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: Cocoon2 -changes in web.xml

2001-10-03 Thread Jeff Turner

Tomcat 4 validates web.xml against a DTD, so yes, order matters.

--Jeff

On Wed, Oct 03, 2001 at 11:20:03AM -0700, Lakshmi Anantharaman wrote:
 Starting service Tomcat-Standalone
 Apache Tomcat/4.1-dev
 PARSE error at line 220 column 13
 org.xml.sax.SAXParseException: The content of element type servlet must
 match
 (icon?,servlet-name,display-name?,description?,(servlet-class|jsp-file),ini
 t-pa
 ram*,load-on-startup?,security-role-ref*).
 Starting service Tomcat-Apache
 Apache Tomcat/4.1-dev
 
 
 Thanks 
 Lakshmi 

-
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: Newbie Question (Static HTML from Cocoon2)

2001-09-24 Thread Jeff Turner

For a real-world example of a Cocoon website being generated offline,
have a look at the jakarta-avalon documentation system. All driven by
Ant.. pretty cool :)

wget is probably less hassle though.

--Jeff

On Mon, Sep 24, 2001 at 10:51:15AM +0200, Sebastian Mäder wrote:
 Hi there,
 
 my name is sebastian and im a trainee on a company in Gemany. Im was
 building a website with xhtml and cocoon2 ..
 
 Now my big boss said to me, that i have to build a STATIC HTML VERSION of
 my cocoon site, and I don't know how I can do this.
 The only way I know is, to save from Browser, but that's not the way.
 
 Are there any instructions for the sitemap.xmap or a batch file, which
 generated this static version ??
 I will hope you can help me. How can I get this information?
 
 THX
 
 Sebastian
 
 
 
 
 
 -
 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: Tomcat 4.0 + Cocoon2 rc1 on RedHat 6.2

2001-09-24 Thread Jeff Turner

Other than the obvious try a different JDK advice, you might try
looking carefully at what jars you have installed. Tomcat 4.0 comes with
a lot of miscellaneous crud in common/lib.

Eg, I found that Cocoon 1.8 would cause this sort of VM crash if I used
an earlier version of xalan.jar than the one bundled with Cocoon. I
ended up switching to Saxon. Also when installing Cocoon on JRun 3.x, I
found I had to remove JRun's lib/ext/activation.jar, or things would
crash like this.

--Jeff

On Mon, Sep 24, 2001 at 05:05:08PM -0600, Lajos Moczar wrote:
 Hi all:
 
 I tried this install today, using JDK 1.2.2_006. The Tomcat code is the 
 4.0 release version and Cocoon2 is the version announced this morning. 
 When I access http://localhost:8080/cocoon, Tomcat core dumps with stuff 
 like this (in catalina.out):
 
 ***
 
 SIGSEGV   11*  segmentation violation
 si_signo [11]: SIGSEGV   11*  segmentation violation
 si_errno [0]: Success
 si_code [0]: SI_USER [pid: 0, uid: 0]
 stackpointer=0x44884e28
[..]
 
 Lajos Moczar
 galatea.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]




Re: cocoon accessible only from local machine

2001-09-20 Thread Jeff Turner

On Thu, Sep 20, 2001 at 06:58:53PM +0200, Aurelien wrote:
 Cocoon is installed on my linux workstation on top of JBoss-Tomcat and 
 works fine there, that is: I can browse all the examples from the same 
 workstation. But if I attempt to access it from my LAN, the request 
 either times out or takes an incredible amount of time to succeed (5 
 minutes+). I've tried that with all kinds of browsers on Windows, Linux 
 and Mac boxes. What can possibly cause that ?

Firewalls.

Which port are you accessing it on? Many sysadmins block all ports
except normal ones.

--Jeff

 Somebody already seen this ?
 
 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]




X11 low-level errors (Re: Installation Problem Solved- C2b2 and Tomcat 4.0 Final)

2001-09-19 Thread Jeff Turner

On Wed, Sep 19, 2001 at 05:08:03PM -0400, Rajkumar, Joseph wrote:
 Hi Folks
 
 This did it and it all works beautifully. I took the stock Tomcat-4.0
 binary distribution and Cocoon-2.0B2.tar.gz.
 
 The build 'cocoon' with the install option giving it the path to the
 tomcat webapps directory as given on the install page on cocoon2-page.
 Removed jaxp.jar and crimson.jar and copied xerces_1_4_1.jar.

It wasn't necessary for me. Straight out of CVS, I did a ./build.sh
-Dinclude.webapp.libs=yes dist, then copied the cocoon.war to my
webapps directory, restarted, and it all worked.

That was on one linux box. On another, I got some weird X errors on
catalina.out:

_X11TransSocketOpen: socket() failed for tcp
_X11TransSocketOpenCOTSClient: Unable to open socket for tcp
_X11TransOpen: transport open failed for tcp/10.10.1.136:0

The 10.10.1.136:0 is from my DISPLAY variable, and it points to a working X
server (on the box where C2 worked). Xvfb on localhost:1 gives the same error.
This is with an identical JVM to the working install (Sun 1.3.0), out-the-box
Tomcat and same cocoon.war.

I've absolutely no idea on this one. I'm just throwing it out there so that if
anyone else is searching the archives with an identical error, we can
commiserate together ;P

--Jeff

-
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: XSPs vs JSPs

2001-09-17 Thread Jeff Turner

On Mon, Sep 17, 2001 at 03:12:45PM +0800, [EMAIL PROTECTED] wrote:
 
Hi,
I can't seem to find much information on using JSPs with Cocoon -
seems to me that this would be very useful since we already have a
fair amount of JSPs, and it's an easier sell to management who is
unwilling to commit to a relatively new technology (XSP).
my questions is, are there any limitations with regards to using JSPs
with Cocoon?  e.g. will we be able to use all the JSP tag libraries we
already have?  and will there be any dependency/integration issues
based on the app server we're using (we're using weblogic 6.1) ?
finally, what are people's thoughts on the general issue of XSPs vs
JSPs?

I use JSPs and XSPs in the same app all the time. You only want to call
a JSP through Cocoon if you are you generating XML with your JSP, which
you then want to style. Otherwise, you're giving up
platform-independence and performance for no good reason.

From what I gathered, XSPs enforce a clean separation of
presentation/content/logic by design, whereas for JSPs you can do that
too but it's really up to developer discipline.

That's what the advertising leads one to believe, and that was the
original intention, but it's not true ;) XSP doesn't *enforce* clean
separation. Ideally, an XSP page contains content, and placeholders
where the logic should go. The logic is then isolated into logicsheets,
which are applied to the content XSP, replacing the placeholders with
generated content.  But XSP still has a xsp:logic tag, where XSP
writers are free to mix content with logic, just like JSP's % % tags.

The developers are well aware of this, and there have been intermittent
discussions on cocoon-dev about replacing XSP with something better.

For now, I'd say stick to JSP, and only use XSP when you really need to.
Also consider the many excellent JSP taglibs available [1]. You might
also want to look at Struts [2], which has a workflow proposal, the
result of which will make the Struts' config file rather similar in
concept to Cocoon's sitemap.

--Jeff

[1] http://jakarta.apache.org/taglibs/
[2] http://jakarta.apache.org/struts/


Damian

-
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: XSPs vs JSPs

2001-09-17 Thread Jeff Turner

On Mon, Sep 17, 2001 at 09:44:12PM -0700, Thomas Patterson wrote:
 I abhore both JSP and XSP and instead have relied solely on XML/XSLT and
 feel that I am far happier for it.  The developers stick to creating XML and
 the GUI folks can work their magic with XSLT.  Hell, I can even fairly
 easily port everything from Java to Microsoft's toolset if needed since it
 readily supports XML/XSLT.

That's the spirit ;) Keep it simple if at all possible.

Since the original poster asked JSP or XSP, I'm bound to say that JSP
is much simpler, because there's no setting-up to be done (works out the
box with Tomcat, no jars to conflict), there's no XML syntax to fight,
no namespaces to forget or mistype.. 

--Jeff

 -Tom
 

-
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: java.lang.VerifyError

2001-09-13 Thread Jeff Turner

On Wed, Sep 12, 2001 at 11:25:26AM +0200, Jurgen Lust wrote:
 Hi,
 
 I installed cocoon on my Debian box this week and it works fine for xslt 
 processing and for FO and DCP. However, when i try to load xsp page, I get 
 the following error:
 
 java.lang.VerifyError: (class: 
 org/apache/cocoon/processor/xsp/XSPProcessor$PageEntry, method: 
[snip] 
 I'm using Cocoon 1.8-1, xerces 1.4.3, xalan 1.2.2 and tomcat 3.2.3 with 
 Apache 1.3.20 with mod_jk. I've already checked that there is no other JAXP 
 jar file in my classpath.

Aha, but if you're Debian's java package (j2sdk1.3), it does evil things
to your classpath without even telling you. Check you have nothing that
could conflict in your /usr/share/java/repository directory.

--Jeff

 Does anyone know what I might be doing wrong?
 
 Thanks,
 
 Jurgen Lust
 Ghent University
 St.-Pietersnieuwstraat 136
 9000 Gent
 Belgium
 [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: Cocoon 1.8.2 - .htaccess?

2001-09-10 Thread Jeff Turner

On Mon, Sep 10, 2001 at 01:54:35PM -0400, Elisa Green wrote:
 My search in FAQs and alternative resources have turned up
 nothing on cocoon security settings with .htaccess.

Cocoon has nothing to do with .htaccess. Cocoon runs as a servlet.
Access to servlets is determined by the servlet container (tomcat). For
apache, security is configured with .htaccess files, but in tomcat it's
done with security-constraint entries in your webapp's WEB-INF/web.xml
file. Have a look at the servlet spec for more info.

--Jeff


-
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: Very beginner question

2001-07-31 Thread Jeff Turner

For a real-world example of how to use Cocoon to build a static site,
have a look at Avalon's doc system. It's driven by Ant, handles DocBook
+ Stylebook, *very* flexible. Hats off to Berin for creating it.

--Jeff

On Tue, Jul 31, 2001 at 09:18:30PM -0400, Vadim Gritsenko wrote:
 It is possible using Cocoon2 and its command line interface (CLI).
 Download  unpack cocoon, then launch run.sh or run.bat,
 and follow instructions.
 
 Vadim
 
  -Original Message-
  From: Duane Kehoe [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 31, 2001 4:40 PM
  To: [EMAIL PROTECTED]
  Subject: Very beginner question
  
  
  I have recently been shouldered with the task of researching and 
  evaluating java report writing tools for my company and came across 
  Cocoon.  Being that my background is in Linux I obviously want an open 
  source solution rather than a propietary one.
  I have read the documentation fairly thoroughly and keep coming back to 
  this unanswered question - Is it possible to use the Cocoon APIs in 
  stand alone apps to create output be it HTML(viewed directly by client's 
  browser), text, or PDF(not the kind that gets you in trouble with the 
  DMCA !)  without having a server side process running?
  I realize this is an extremely newbie land question but would really 
  appreciate any help/examples, thanks
  
  -- 
  
  Long live the Penguin!!!
  
  Duane Kehoe Phone # 414.908.1814
  Programmer/AnalystFax # 414.908.1814
  Weyco Group, Inc.   Email: [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]
  
  
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.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: C2/Tomcat 3.2.2: Include Cocoon-Content in JSP

2001-07-03 Thread Jeff Turner

On Tue, Jul 03, 2001 at 10:39:19PM +0200, Stefan Seifert wrote:
 I want to include the result of a cocoon transformation as part of
 another JSP Page as follows:
 
 ... jsp content ...
 
 %
 String strIncludeURL = ../cocoon/meeting_agenda.htm?MeetingID=1;
 %
 jsp:include page=%=strIncludeURL% flush=true/
 
 ... jsp content ...
 
 
 Unfortunately this does not work. If i use a JSP page as include
 destination it works. If i type in the Coccon-URL directly, i get the
 content right. But in combination i get nothing. The cocoon servlet is
 mapped on /cocoon/*. meeting_agenda.htm is the result of an C2 pipeline
 serialized as HTML.

Hmm.. should work, shouldn't it? Perhaps your unusual .htm extension is
confusing something?

I usually put Cocoon in a separate context, and use jakarta-taglibs'
io taglib to suck in the content.

But in your situation, jsp:include should work.

--Jeff

http://jakarta.apache.org/taglibs/doc/io-doc/intro.html


 Any ideas how to include a cocoon page in a JSP page? I've found a
 sample using jsp:include with C1, but this seems not to work with C2.
 
 Stefan

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