Re: Can't get v2.1, m1 or m2 working

2003-06-27 Thread Perry Molendijk
Uncommenting #exclude.block.axis=true from local.blocks.properties file
and rebuilding it seems to have done the trick.

That probably means that you have Axis (or something similar) somewhere else
on the system. I encountered the same problem on  a server at work.

Perry



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



C2.1-m2 problems with Xalan

2003-06-26 Thread Perry Molendijk
BlankI have encountered some problems running C21-m2. The problem appears to
be with the version of Xalan that comes with the distribution, replacing it
with the one from C21-m1 didn't fix the problem, however using Saxon as the
xslt transformer fixed the problem.

I tried this on:
W2K / JDK1.4 / Tomcat 4.1.24 and
W2K / JDK1.4 / Tomcat 5.02beta ( Cocoon (and anything else) runs noticably
faster  ).

Stacktrace is below.

I also noticed that the user-config option for the PDF serializer has
changed. The example in sitemap.xmap:
user-configfile:/C:/cocoon/fop-config.xml/user-config needed to be
user-configfile:///C:/cocoon/fop-config.xml/user-config or it wouldn't
work for me.

Perry

full exception chain stacktrace:

Original Exception: java.lang.RuntimeException:
java.lang.NullPointerException

at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3363)

at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:427)

at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)

at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer
.java:529)

at
org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:
169)

at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline
.processXMLPipeline(AbstractCachingProcessingPipeline.java:292)

at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(Abs
tractProcessingPipeline.java:489)

at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:150)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:133)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNod
e.java:133)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:84)

at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invok
e(PreparableMatchNode.java:164)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(Pipel
ineNode.java:162)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invo
keNodes(AbstractParentProcessingNode.java:108)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(Pipe
linesNode.java:162)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:325)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcess
or.java:307)

at org.apache.cocoon.Cocoon.process(Cocoon.java:628)

at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1139)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

at

Re: Newbie: yet ANOTHER problem: db access (NoValidConnectionException)

2003-04-06 Thread Perry Molendijk




Try "com.mysql.jdbc.Driver" instead of "org.gjt.mm.mysql.Driver".
I have had a similar error message like that before and the above seem to fix 
it.

Perry

  - Original Message - 
  From: 
  Phil 
  Coultard 
  To: [EMAIL PROTECTED] 
  
  Sent: Saturday, April 05, 2003 1:52 
  AM
  Subject: Newbie: yet ANOTHER problem: db 
  access (NoValidConnectionException)
  Geoff: Thanks for all your help, you are a star.Big 
  apologies from a newbie struggling with the basics of Cocoon...I have 
  run into yet another problem which I don't seem to be able to 
  getover...This time I am trying to connect z}x}x} MySQL db 
  but get the message:ERROR (2003-04-04) 
  16:18.09:150 
  [sitemap.generator.serverpages](/ltd_coultard/mount/com_coultard/tickets) 
  Thread-10/tickets_xsp: Could notget the 
  datasourceorg.apache.avalon.excalibur.datasource.NoValidConnectionException: 
  No validJdbcConnection class availablein the error log 
  file(tomcat/webapps/applicationname/WEB-INF/logs/error.log) when I run my 
  xsp(enclosed below)I am also new to MySQL but am familiar with 
  MSSQL so...I have:-made the dx}v}v}alled coultard) and made 
  sure MySQL is running (it works finesolo)-put the MySQL db jar file 
  (mysql-connector-java-3.0.6-stable-bin.jar) inC:\tomcat\common\lib-put 
  the init-param for preloading the driver in web.xml as below.-defined the 
  connection pool as below-attempted to run the xsp belowI just 
  spits out the title of the page and the session user value (which Ihave 
  set via a login script) which would be consistent with their being 
  noresults except the same sql statement returns rv}t}t}ts if run 
  directly inMySQL and the error message suggests to me it's not even 
  getting that far.I am using:Win 98JDK 1.3.1Tomcat 
  4.1.24Cocoon 2.0.4MySQL 4.0.12Winjar file from: 
  mysql-connector-java-3.0.6-stableWhat confuses me is that my book 
  (Cocoon developers handbook) assures methat any errors preloading the 
  driver or defining the connection pool willbe thrown up when they are 
  attempted (when the application starts) and shownin access.log and 
  core.log respectfully. My entt}r}r} in these two logs 
  lookfine:DEBUG 
  (2003-04-04) 16:14.22:850 [access] 
  (Unknown-URI)Unknown-thread/CocoonServlet: Trying to load class: 
  org.gjt.mm.mysql.DriverDEBUG 
  (2003-04-04) 16:14.24:010 [core.manager] 
  (Unknown-URI)Unknown-thread/Der}p}p}tComponentFactory: logger 
  attribute iscore.datasources.coultardDEBUG (2003-04-04) 
  16:14.24:390 [core.manager] 
  (Unknown-URI)Unknown-thread/ThreadSafeComponentHandler: ComponentHandler 
  initialized 
  for:org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSourceDEBUG 
  (2003-04-04) 16:14.24:390 [core.manager] 
  (Unknown-URI)Unknown-thread/ExcaliburComponentSelector: 
  Addingorg.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource 
  forhint [coultard]DEBUG 
  (2003-04-p}n}n}16:14.24:390 [core.manager] 
  (Unknown-URI)Unknown-thread/ThreadSafeComponentHandler: ComponentHandler 
  initialized 
  for:org.apache.avalon.excalibur.component.ExcaliburComponentSelectorAnd 
  yet the error thrown when I try to load the page rather suggests to methat 
  it can't find, or hasn't 'installed' the jar file properly...On the 
  assumption that the preload and connection pool substantiations areworking 
  I hn}xl}xl}two theories (which I'm sure are probably wrong!)1. That 
  the param-valueorg.gjt.mm.mysql.Driver is incorrect. I got 
  thisvalue from my book but it is sadly for an older MySQL driver. I 
  notice thefirst line of the README which comes with the jar file reads 
  "MySQLConnector/J 3.0.6 Stable (formerly MM.MySQL)" and was wondering if 
  thischange in naming convention is mirrored somehow in it. I have been 
  unable tofind a reference for the correct string for this value (MySQL 
  referring to"read youxl}hj}hj}rvlet engine or application server 
  vendor's documentation";Cocoon seemingly not making a reference to what 
  these strings should beexcept for the commented WebSphere, Oracle and 
  IBMWebshpere). Furtherattempts to substantiate this theory and attempts at 
  guessing its value havebeen unfruitful.2. That my reference to the 
  dburl is incorrect. My db is physically locatedin C:\mysql\data\ and not 
  under the tomcat/webapps dir so I was wondering ifthis had any influence 
  on the 
  matter.Thankfuhj}Xh}Xh}Philextract 
  from 
  tomcat/webapps/applicationname/WEB-INF/web.xml 
  init-param 
  

Re: Strange behaviour with user-config

2003-03-19 Thread Perry Molendijk



Hi Thorston,

I had the same problem untill I did 
this:


map:serializer mime-type="application/pdf" name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"
user-config src="f:/apache/fop-fonts/userconfig.xml"/
/map:serializer
i.e. put in an 
absolute path.

Perry

  - Original Message - 
  From: 
  Scherler, Thorsten 
  To: Cocoon-Users (E-Mail) 
  Sent: Wednesday, March 19, 2003 11:46 
  PM
  Subject: Strange behaviour with 
  user-config
  Hello group,I have written a small app which is working 
  finebut as soon as I want my own fonts for fop it is not working (the 
  pdf).e.g.map:serializer name="fo2pdf" 
  src="" 
  logger="sitemap.serializer.fo2pdf" 
  mime-type="application/pdf"user-config 
  src=""//map:serializerif I 
  have the code like that the I receive:message UnnamedSelector: 
  ComponentSelector could not find the component for hint 
  [fo2pdf]description 
  org.apache.avalon.framework.component.ComponentException: UnnamedSelector: 
  ComponentSelector could not find the component for hint [fo2pdf]...but 
  as soon i put the the user-config/ in comments (!) it is 
  working allright.The config.xml is in 
  PATH_to_my_app/global/fonts/ci/config.xml.Anybody had the problem 
  before?King regards! Mit freundlichem Gruss, 
   Thorsten Scherler Marketing / Telefonmarketing 
   Weidmüller GmbH  Co. P.O. Box 2807 33058 
  Paderborn Tel.:+ 49 - 5252-960-350 Fax:+ 49 - 
  5252-960-116 eMail: [EMAIL PROTECTED] 
  http://www.weidmueller.de 
   
  -To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]


Re: XSL FO

2003-02-06 Thread Perry Molendijk
You probably got caught out with an older version of FOP before.
This:

  fo:page-sequence master-name = run1   
xsl:apply-templates/
  /fo:page-sequence

should read:

  fo:page-sequence master-reference = run1   
xsl:apply-templates/
  /fo:page-sequence

Bye,

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

2003-01-25 Thread Perry Molendijk
 
 I can post details if that's the problem you're trying to solve.

Jeff that would be great if you could post this.

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

2003-01-25 Thread Perry Molendijk
 The fact is that JSP continues to gather momentum and the era of XML-XSLT
has all but been forgotten. To what do you attribute this?
 XML and XSLT and by extension cocoon has a very narrow window to get some
serious press to make itself live. This window is passing by.

Funny that, I am kind booked out for most of the year with projects that
need XSLT written for their applications. One of them is cleaning up the
mess of having HTML and Java code in JSP nicely mixed up together. I don't
write a line of Java myself but I have observed is that writting clean
webapplications takes a fair bit of discipline that many developers don't
have, or it is usually simply too hard for them; this how I always do it.

 If you ask me, the cocoon development effort should refocus itself from
developing more features to getting the product in a state
 such as tomcat is in. A state where people say cocoon? Oh that's easy to
use. getting hello-world to work is like a 10 minute
 affair. You only need to worry about all the fancy features if you need to
use them, give it a shot.

OK the Cocoon doco needs work and the amount of features well out number the
amount of doco pages. But you can still get Hello World up in 10 minutes.
Most of the installation problems appear to be typical for all sorts of Java
applications: wrong, missing or conflicting jar files in various places..

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: Xindice in Cocoon

2003-01-23 Thread Perry Molendijk
It appears to me that what you are trying to do is transform an XML file to
HTML and use information in 'gs.xml' to apply display rules. Currently you
use the document() function to import gs.xml, to replace this you could do
this in the sitemap

map:match pattern=gs
 map:aggregate element=page
  map:part src=xmldb:xindice://localhost:4080/db/collection/gs.xml
element=application-info/
  map:part src=otherFile.xml element=content/
 /map:aggregate
 map:transform src=html.xsl/
 map:serialize type=html/
/map:match

this would result in something like this

page
  application-info
xml from gs.xml
  /application-info
  content
xml from otherFile.xml
  /content
page

to which you can than apply any XSL. In your case you would need to import
gs.xsl into html.xsl.


Perry

- Original Message -
From: leona s [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 10:03 AM
Subject: Xindice in Cocoon


 Hi All,

 I have a Cocoon application using several XML files that
 I would like to put into Xindice. I asked on the XSL list about
 calling Xindice directly from XSL statements, but that doesn't
 appear to be possible.

 I know that people have made Cocoon and Xindice work
 together, but all the examples I have seen (cocooncenter,org,
 cocoonwiki) may be using older versions of Cocoon, because the
 changes to the sitemap don't reflect the version of the sitemap I have.
 I am using C 2.0.4/Tomcat 4.1.12/JDK 1.3.1/WinXP Pro.

 As a simple example, I have:

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

 gs.xml contains some basic application XML, such as pages and menus.
 gs.xsl contains the business rules of the application, that cause
 different
data to be displayed, depending on the current user, current page, etc.
 There
   also may be other transforms following this one.
 html.xsl transforms the XML data into HTML for output.

 Currently, I read in my XML data in gs.xsl using the XSL document()
 function, and
 would like to be reading from Xindice instead.
 Can anyone tell me how to call Xindice from this pipeline? I would like to
 do something
 like get /db/project/project1001 and set it to a parameter to be passed
 into gs.xsl.

 Thanks very much for any help.
 Leona Slepetis





 -
 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: pdf problem

2002-12-30 Thread Perry Molendijk
This is a pretty vague reply but I ran into the same problem when moving
from C2.0.3 to C2.1 but I can't remember exactly what I did to fix it. I do
know it has to do with Cocoon because the same files were working fine under
C2.0.3.

Check the error log (%PATH_TO_COCOON/WEB_INF/logs).

I think it had to with some jars (xalan-2.4.1.jar, xercesImpl-2.1.0.jar and
xml-apis.jar) not being in the common\endorsed of the tomcat installation.

Perry

- Original Message -
From: Antonio Gallardo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 30, 2002 11:04 PM
Subject: Re: pdf problem


 Hi Ines:

 Assuming that the PDF generation is right. There is a problem with Adobe
 Acrobat Reader. Try to set in the configuration of Acrobat that will not
 open on the same windows (explorer). It must resolve your problem.

 Regards,

 Antonio Gallardo.

 Ines Robbers dijo:
  Hi there,
 
  I'm running Cocoon 2.0.4 on Windows XP and Tomcat 4.1.
 
  At the moment I'm trying out the examples from the book Cocoon:
  Building XML Applications by M. Langham  C. Ziegler.
 
  In case of PDF-creation, Acrobat is starting to load the file but then a
  window pops up saying: The file is damaged and could not be repaired.
  (Acrobat itself is working fine with other pdf)
 
 
  This is the Sitemap fragment:
 
map:pipeline
map:match pattern=myfirstpdf
map:generate src=myfirstpdf.xml/
map:transform src=myfirstpdf.xsl/
map:serialize type=fo2pdf/
/map:match
/map:pipeline
 
 
  This is the XML:
 
  ?xml version=1.0?
  data
  nameInes/name
  /data
 
 
  And the XSL:
 
  ?xml version=1.0?
 
  xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:fo=http://www.w3.org/1999/XSL/Format;
 
xsl:template match=/
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 
  fo:layout-master-set
   fo:simple-page-master master-name=page
page-height=29.7cm
page-width=21cm
margin-top=1cm
margin-bottom=2cm
margin-left=2.5cm
margin-right=2.5cm
 fo:region-before extent=3cm/
 fo:region-body margin-top=3cm/
 fo:region-after extent=1.5cm/
   /fo:simple-page-master
 
   fo:page-sequence-master master-name=all
 fo:repeatable-page-master-alternatives
  fo:conditional-page-master-reference master-name=page
  page-position=first/
 /fo:repeatable-page-master-alternatives
   /fo:page-sequence-master
  /fo:layout-master-set
 
  fo:page-sequence master-name=all
fo:flow flow-name=xsl-region-body
  xsl:apply-templates/
/fo:flow
  /fo:page-sequence
 /fo:root
/xsl:template
 
xsl:template match=data
  fo:block font-size=36pt space-before.optimum=24pt
  text-align=centerxsl:value-of select=name//fo:block
/xsl:template
 
  /xsl:stylesheet
 
 
  I've also tried it with different filenames in different folders but
  it's always the same error message.
 
  Anyone got an idea?
 
  Many thanks for help!
 
 
  Ines
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]




 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: cocoon book [was: pdf problem]

2002-12-30 Thread Perry Molendijk
 Can you recommend one that is suitable for a beginner like me with some
 XML and XSLT and no Java knowledge?

Don't know about books but this tutorial on XSL:FO is pretty good:

http://www.antennahouse.com/XSLsample/XSLsample.htm

And have a look in the links section of the Cocoon doco.

Perry



-
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: DTD Declaration in sitemap/serializers

2002-12-05 Thread Perry Molendijk
Title: Blank



OK it's in the FAQs, sorry. But is there a way to 
generate an XML document that does add a DTD Declaration?

Perry

  - Original Message - 
  From: 
  Perry 
  Molendijk 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, December 05, 2002 12:06 
  PM
  Subject: DTD Declaration in 
  sitemap/serializers
  
  
  
  
  I'm sure there is a sensible explanation for this but I can't find it. When 
  Ichange:
  map:serializer name="html" mime-type="text/html" 
  src=""/
  to
  map:serializer name="html" mime-type="text/html" 
  src="" 
  doctype-public-//W3C//DTD HTML 4.01 
  Transitional//EN/doctype-public 
  doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system 
  encodingISO-8859-1/encoding/map:serializer
  The resulting html output has the correct dtd declaration at the top of the 
  file:
  !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  Now when I try this with the xml serializer that doesn't happen e.g.
  map:serializer mime-type="text/xml" name="xml" 
  src="" 
  doctype-public-//OASIS//DTD DocBook XML 
  V4.2//EN/doctype-public 
  doctype-systemhttp://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd/doctype-system/map:serializer
  I would like to see this:
  !DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML 
  V4.2//EN" 
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  I noticed the same behaviour with the "svgxml" serializer which leads me to 
  believe that this is a feature of the XMLSerializer. Is there a way to 
  generate XML output with a DTD declaration in it?
  Bye
  Perry Molendijk


DTD Declarations in the sitemap/serializers

2002-12-04 Thread Perry Molendijk
Title: Blank




I'm sure there is a sensible explanation for this but I can't find it. When 
Ichange:
map:serializer name="html" mime-type="text/html" 
src=""/
to
map:serializer name="html" mime-type="text/html" 
src="" 
doctype-public-//W3C//DTD HTML 4.01 
Transitional//EN/doctype-public 
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system 
encodingISO-8859-1/encoding/map:serializer
The resulting html output has the correct dtd declaration at the top of the 
file:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
Now when I try this with the xml serializer that doesn't happen e.g.
map:serializer mime-type="text/xml" name="xml" 
src="" 
doctype-public-//OASIS//DTD DocBook XML 
V4.2//EN/doctype-public 
doctype-systemhttp://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd/doctype-system/map:serializer
I would like to see this:
!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML 
V4.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
I noticed the same behaviour with the "svgxml" serializer which leads me to 
believe that this is a feature of the XMLSerializer. Is there a way to generate 
XML output with a DTD declaration in it?
Bye
Perry Molendijk


DTD Declaration in sitemap/serializers

2002-12-04 Thread Perry Molendijk
Title: Blank






I'm sure there is a sensible explanation for this but I can't find it. When 
Ichange:
map:serializer name="html" mime-type="text/html" 
src=""/
to
map:serializer name="html" mime-type="text/html" 
src="" 
doctype-public-//W3C//DTD HTML 4.01 
Transitional//EN/doctype-public 
doctype-systemhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd/doctype-system 
encodingISO-8859-1/encoding/map:serializer
The resulting html output has the correct dtd declaration at the top of the 
file:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
Now when I try this with the xml serializer that doesn't happen e.g.
map:serializer mime-type="text/xml" name="xml" 
src="" 
doctype-public-//OASIS//DTD DocBook XML 
V4.2//EN/doctype-public 
doctype-systemhttp://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd/doctype-system/map:serializer
I would like to see this:
!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML 
V4.2//EN" 
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
I noticed the same behaviour with the "svgxml" serializer which leads me to 
believe that this is a feature of the XMLSerializer. Is there a way to generate 
XML output with a DTD declaration in it?
Bye
Perry Molendijk


Re: Xindice logicsheet - initial success

2002-10-10 Thread Perry Molendijk

I have successfully used this to query Xindice through Cocoon. The first
block is in sitemap.xmap of the cocoon distribution.

map:match pattern=xpath type=request-parameter
 map:generate src=xmldb:xindice://localhost:4080/db/{../1}#{1}/
 map:serialize type=xml/
/map:match



   map:match pattern=mac-find
map:act type=request
 map:parameter name=parameters value=true/
 map:generate src=cocoon:/xmldb/shakespear/?xpath={findThis}/
 map:serialize type=xml/
/map:act
   /map:match

Perhaps this may not be the best way but it works a treat.

Perry


- Original Message -
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 10, 2002 7:02 AM
Subject: Re: Xindice logicsheet - initial success


 Josema Alonso wrote:

 Dear Friends,
 
 Since I got no response to my previous email message,
 

 I've sent email. Why do you need xsp logicsheet and why don't you use
 xmldb protocol with cinclude? This works out of the box, with no effort.

 Vadim


  I tried it hard and I
 finally could make a xmldb logicsheet to work with Cocoon. It's the eXist
 logicsheet. I could only try it for retrieving documents by now but it
works
 as expected.
 I'm too tired now. It's been a lot of hours to make Xindice and the
 logicsheet work with Cocoon and I need some rest. I'll test more tomorrow
 and I'll try to make a How-To. Now that Isee it running I must say it
 shoudn't be so hard...
 I hope I could understand better the whole Cocon Wiki thing and make it
 available there...if someone can help me a bit here...
 
 Best.
 
 ps: I've browsed carefully the archives and I read the mailing list
 frequently. I know there are still some people who can't make Xindice
work
 with Cocoon. I understand you all... and I must say to all of you...it
can
 be done! Don't give up! :-)
 
 



 -
 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: How-to for sendmail published

2002-05-07 Thread Perry Molendijk

Hello Horst

Sorry it's taken a while for a reply.
Like I wrote I have only tried this on Win2K, jdk1.3.1, tomcat 4.0.1 and
Cocoon 2.0.2.

But do you have activation.jar and mail.jar in your cocoon/WEB-INF/lib
directory? If you haven't, give it a try. I may have done something wrong
myself but it was the only way I got it to work.

Regards

Perry

- Original Message -
From: Horst Rutter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, May 02, 2002 3:48 AM
Subject: Re: How-to for sendmail published


 I followed your instructions for sendmail (thanks for putting time into
this) but ran into the following:

 The xsp compiled fine I can see the generated class file in the working
dir,
 but when sendmail.xsp gets invoked it hangs and my sitemap.log says:

 WARN(2002-05-01) 12:18.27:262   [sitemap](/ba/xsp/sendmail)
HttpProcessor[8080][4]/PipelineNode: Resource not found in pipeline
 at file:/C:/eclipseworkspace/test/webapp/sitemap.xmap:888:17
 org.apache.cocoon.ResourceNotFoundException: javax/mail/MessagingException
  at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
.java:210)
  at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:202)
  at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:278)
  etc..

 This is weird since javax.mail is in my classpath for both compilation and
runtime (j2ee.jar).

 Regards,
 Horst (XP, JDK1.4, Tomcat  4.0.4-b2, C2.1-dev)



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




How-to for sendmail published

2002-05-01 Thread Perry Molendijk



Hello

Here is a how-to on the sendmail logicsheet: http://members.iinet.net.au/~xions/jigsaws/sendmail.html.

It's written in the stylebook format so if it's usefull to be added to the 
Cocoon docs I'll send it to you.

Cheers,

Perry Molendijk
Inflexions (WA) Pty Ltd
Perth
Australia


Re: Cocoon will not run

2002-04-30 Thread Perry Molendijk

I tried running Cocoon 2 with Tomcat 4.0.3 without any luck. Try 4.0.1 or
4.0.4. Those work first time every time, for me anyway.

Perry
- Original Message -
From: Andreas Rittershofer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 1:53 PM
Subject: Cocoon will not run


 My setup is:
 Java 1.3.1
 Tomcat 4.0.3 (examples are running fine)
 Cocoon 2.0.2

 When I invoke
 http://host:8080/cocoon
 I get:

 Apache Tomcat/4.0.3 - HTTP Status 500 - Internal Server Error

 --
 --

 type Exception report

 message Internal Server Error

 description The server encountered an internal error (Internal Server
 Error) that prevented it from fulfilling this request.

 exception

 javax.servlet.ServletException: Servlet.init() for servlet Cocoon2
 threw exception
 at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.j
 ava:935)
 at
 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java
 :653)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
 lve.java:214)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
 lve.java:190)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
 343)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
 va:180)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
 Valve.java:170)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:564)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
 va:170)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:564)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:4
 68)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:564)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
 e.java:174)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor
 .java:1012)
 at
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.jav
 a:1107)
 at java.lang.Thread.run(Thread.java:484)


 root cause

 java.lang.NoClassDefFoundError: javax/xml/transform/Source
 at org.apache.cocoon.Cocoon.contextualize(Cocoon.java:183)
 at
 org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.jav
 a:1209)
 at
 org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:407)
 at
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.j
 ava:916)
 at
 org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java
 :653)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
 lve.java:214)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
 lve.java:190)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java
 :472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2
 343)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
 va:180)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:566)
 at
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcher
 Valve.java:170)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:564)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
 va:170)
 at
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.
 java:564)
 at
 

sendmail again

2002-04-30 Thread Perry Molendijk

inflexions.com: homeFinally got the cocoon part of the sendmail logicsheet
working but now I get an error from java mail:

javax.mail.internet.ParseException

This is the XSP

?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
 page
  xsp:logic
  String text =
Hi, this mail has been send through a web form;
/xsp:logic
  sendmail:send-mail
   sendmail:from[EMAIL PROTECTED]/sendmail:from
   sendmail:to[EMAIL PROTECTED]/sendmail:to
   sendmail:subjectCocoon send mail test/sendmail:subject
   sendmail:smtphostmailServerAddress/sendmail:smtphost
   sendmail:body
xsp:exprtext/xsp:expr
   /sendmail:body
  /sendmail:send-mail
 /page
/xsp:page

I'm using the recently fixed sendmail.xsl, and after getting An error
occured while sending email. a couple of times I replaced this in
sendmail.xsl

error type=serverAn error occured while sending email./error

with

error type=serverxsp:expr_sendmail_exception/xsp:expr/error

and rebuild cocoon to end up with: javax.mail.internet.ParseException

The javamail docs say:

The exception thrown due to an error in parsing RFC822 or MIME headers

Which as a simple user doesn't mean much too me.

Thanks in advance.

Perry Molendijk
Inflexion (WA) Pty Ltd
http://www.inflexions.com
[EMAIL PROTECTED]
+61 0401 677 453

©2002 Inflexions (WA) Pty Ltd
IMPORTANT INFORMATION: This message and any files transmitted with it are
confidential and should be read only by those persons to whom it is
addressed. If you have received this message in error, please notify us
immediately by way of reply. Please also destroy and delete the message from
your computer. Any unauthorised form of reproduction of this message is
strictly prohibited. It is the duty of the recipient to virus scan and
otherwise test the information provided before loading onto any computer
system. Inflexions (WA) Pty Ltd does not warrant that the information is
free of a virus or any other defect or error. Inflexions (WA) Pty Ltd is not
liable for the proper and complete transmission of the information contained
in this communication, nor for any delay in its receipt. Any views expressed
in this message are those of the individual sender, except where the sender
specifically states them to be the views of Inflexions (WA) Pty Ltd.


-
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: sendmail again

2002-04-30 Thread Perry Molendijk

Works a treat now. Thank you.

Perry
- Original Message -
From: Christian Haul [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 5:33 PM
Subject: Re: sendmail again


 On 30.Apr.2002 -- 05:11 PM, Perry Molendijk wrote:
  inflexions.com: homeFinally got the cocoon part of the sendmail
logicsheet
  working but now I get an error from java mail:

  I'm using the recently fixed sendmail.xsl, and after getting An error
  occured while sending email. a couple of times I replaced this in
  sendmail.xsl

 This problem should have been fixed Sunday. A workaround is to supply
 a charset (sedmail:charsetISO-8859-1/sendmail:charset).

 Chris.

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

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/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: mutli-level stylesheets

2002-04-29 Thread Perry Molendijk

in webapp/documentation/sitemap.xmap you'll find:

map:match pattern=body-todo.xml
 map:generate type=file-nolabel src=xdocs/todo.xml/
 map:transform src=stylesheets/todo2document.xsl label=content/
 map:transform src=stylesheets/document2html.xsl/
 map:serialize/
/map:match

which is pretty much what you're after I think.

Cheers,

Perry

- Original Message - 
From: Vadim Gritsenko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 30, 2002 9:43 AM
Subject: RE: mutli-level stylesheets


  From: Ethan Kennelly [mailto:[EMAIL PROTECTED]]
  
  I've looked and looked for a way to apply multilevel styles sheets in
  cocoon2 like I can in cocoon 1 using xsl:processing-instruction
  name=cocoon-process, but can't find anything. My problem is I want
 to
  have an xml file that uses an xsl file that has xsp processing in it
 and
  uses another xsl file that has FOP instructions. Does anyone have any
 idea
  how I can do this?
 
 Look into webapp/sub/sitemap.xmap, spend some time there self-educating,
 and build on top of it.
 
 Happy hacking,
 Vadim
 
 
  Ethan Kennelly
 
 
 -
 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]




sendmail xsl problem

2002-04-16 Thread Perry Molendijk

Hello,

When I run the sendmail logicsheet I get a problem with the
transformation of sendmail.xsl.

Somewhere in the process the values of sendmail:subject, sendmail:body
and sendmail:smtphost are not added to the generated java code.

e.g. (from .java file in tomcat\work)

if (!null.equals(String.valueOf())) {
_sendmail_properties.put(mail.smtp.host,String.valueOf());
  }

instead of:

if (!null.equals(String.valueOf(my.mail.host))) {

_sendmail_properties.put(mail.smtp.host,String.valueOf(my.mail.host));
  }

I got this by running sendmail.xsl against may XSP with Saxon from the
commandline, so not problem with the XSL.

Below are all the details:

environment: Win2K, Tomcat 4, Cocoon-2.0.2, JDK1.3.1

The XSP:

?xml version=1.0 encoding=UTF-8?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:sendmail=http://apache.org/cocoon/sendmail/1.0;
 page
  sendmail:send-mail
   sendmail:from[EMAIL PROTECTED]/sendmail:from
   sendmail:to[EMAIL PROTECTED]/sendmail:to
   sendmail:subjecta/sendmail:subject
   sendmail:bodya/sendmail:body
   sendmail:smtphostmail.m.iinet.net.au/sendmail:smtphost
  /sendmail:send-mail
 /page
/xsp:page

original message

org.apache.cocoon.components.language.LanguageException: Error compiling
mail_xsp:
Line 128, column 32: method valueOf() not found in class java.lang.String
Line 129, column 57: method valueOf() not found in class java.lang.String
Line 146, column 42: method valueOf() not found in class java.lang.String
Line 147, column 39: method valueOf() not found in class java.lang.String
Line 0, column 0:
4 errors

Full Exception Chain Stacktrace

Original exception :
org.apache.cocoon.components.language.LanguageException: Error compiling
mail_xsp:
Line 128, column 32: method valueOf() not found in class java.lang.String
Line 129, column 57: method valueOf() not found in class java.lang.String
Line 146, column 42: method valueOf() not found in class java.lang.String
Line 147, column 39: method valueOf() not found in class java.lang.String
Line 0, column 0:
4 errors

at
org.apache.cocoon.components.language.programming.java.JavaLanguage.compile(
JavaLanguage.java:243)
at
org.apache.cocoon.components.language.programming.CompiledProgrammingLanguag
e.load(CompiledProgrammingLanguage.java:197)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:383)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.createR
esource(ProgramGeneratorImpl.java:328)
at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:291)
at
org.apache.cocoon.generation.ServerPagesGenerator.setup(ServerPagesGenerator
.java:203)
at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:202)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:279)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:142)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:320)
at
org.apache.cocoon.www.sitemap_xmap.matchN10585(C:\tomcat\work\localhost\coco
on\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:7214)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat\work\localhost\cocoon\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3102)
at
org.apache.cocoon.www.sitemap_xmap.process(C:\tomcat\work\localhost\cocoon\c
ocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2571)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:201)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
at

sendmail logicsheet problem

2002-04-13 Thread Perry Molendijk

Sorry forgot to add the log file bits for the problem. This is from
core.log:

REQUEST: /cocoon/xsp/mail

CONTEXT PATH: /cocoon
SERVLET PATH: /xsp/mail
PATH INFO: null

REMOTE HOST: 203.59.174.6
REMOTE ADDRESS: 203.59.174.6
REMOTE USER: null
REQUEST SESSION ID: null
REQUEST PREFERRED LOCALE: en_AU
SERVER HOST: inflexions
SERVER PORT: 82

METHOD: GET
CONTENT LENGTH: -1
PROTOCOL: HTTP/1.1
SCHEME: http
AUTH TYPE: null

CURRENT ACTIVE REQUESTS: 1
REQUEST PARAMETERS:

HEADER PARAMETERS:

PARAM: 'accept' VALUES: '[*/*]'
PARAM: 'accept-language' VALUES: '[en-au]'
PARAM: 'accept-encoding' VALUES: '[gzip, deflate]'
PARAM: 'user-agent' VALUES: '[Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0)]'
PARAM: 'host' VALUES: '[inflexions:82]'
PARAM: 'connection' VALUES: '[Keep-Alive]'

SESSION ATTRIBUTES:


DEBUG   (2002-04-13) 23:57.06:718   [core.source-handler](/cocoon/xsp/mail)
HttpProcessor[82][4]/SourceHandlerImpl: Getting the SourceFactories
DEBUG   (2002-04-13) 23:57.06:734   [core.source-handler](/cocoon/xsp/mail)
HttpProcessor[82][4]/SourceHandlerImpl:  for protocol: file
org.apache.cocoon.components.source.FileSourceFactory
DEBUG   (2002-04-13) 23:57.06:734   [core.source-handler](/cocoon/xsp/mail)
HttpProcessor[82][4]/SourceHandlerImpl:  for protocol: xmldb
org.apache.cocoon.components.source.XMLDBSourceFactory
DEBUG   (2002-04-13) 23:57.06:812
[core.program-generator](/cocoon/xsp/mail)
HttpProcessor[82][4]/ProgramGeneratorImpl: The instance was not accessible
from the internal cache. Proceeding.
DEBUG   (2002-04-13) 23:57.06:828
[core.program-generator](/cocoon/xsp/mail)
HttpProcessor[82][4]/ProgramGeneratorImpl: The program was not preloaded
DEBUG   (2002-04-13) 23:57.06:828
[core.program-generator](/cocoon/xsp/mail)
HttpProcessor[82][4]/ProgramGeneratorImpl: Creating resource
org\apache\cocoon\www\sitemap_xmap
DEBUG   (2002-04-13) 23:57.07:109   [core.markup.sitemap](/cocoon/xsp/mail)
HttpProcessor[82][4]/AbstractMarkupLanguage: addLogicsheetToList: name:
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl, location:
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl, instance:
org.apache.cocoon.components.language.markup.Logicsheet@78c4c
DEBUG   (2002-04-13) 23:57.07:109   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl getTemplates:
stylesheet
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl
DEBUG   (2002-04-13) 23:57.07:125   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: Creating new Templates for
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl
DEBUG   (2002-04-13) 23:57.08:234   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: Source =
org.apache.cocoon.components.source.URLSource@30122, templatesHandler =
org.apache.xalan.processor.StylesheetHandler@3f7916
DEBUG   (2002-04-13) 23:57.10:859   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl getTemplates:
stylesheet
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl
DEBUG   (2002-04-13) 23:57.10:859   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: Reusing Templates for
jar:file:/C:/tomcat/webapps/cocoon/WEB-INF/lib/cocoon-2.0.2.jar!/org/apache/
cocoon/components/language/markup/sitemap/java/sitemap.xsl
DEBUG   (2002-04-13) 23:57.24:421   [core.language.java](/cocoon/xsp/mail)
HttpProcessor[82][4]/JavaLanguage: Compiling
C:\tomcat\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_x
map.java
DEBUG   (2002-04-13) 23:57.32:968   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.32:968   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.32:968   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.32:984   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.33:000   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.33:000   [core.xslt-processor](/cocoon/xsp/mail)
HttpProcessor[82][4]/XSLTProcessorImpl: XSLTProcessorImpl component
initialized.
DEBUG   (2002-04-13) 23:57.33:000   [core.xslt-processor](/cocoon/xsp/mail)

Xindice and Cocoon How To

2002-02-21 Thread Perry Molendijk

Infexions (WA) Pty LtdHope this is useful to anyone

Finally got around to attempt to make xindice / dbxml work with C2.
Checked the FAQ's and archive and ended up very confused.
Anyway I kind of summarised all the advice / postings I found and got it to
work [in the end].

Here is a rundown on what I did / modified to cocoon to get it to work.

The environment Win2K, Cocoon 2.0.1, Tomcat 4.0.1 and xindice-1.0rc1

Assumption: xindice is running on localhost:4080 and the addressbook example
db has been created.

There are apparently two ways of doing this:
1. using a generator
2. using a source-handler

In a recent posting it was noted however that the generator will be
deprecated shortly, so first I got rid of the bits in sitemap.xmap that deal
with the generator:

First comment out this section (it's near the top of sitemap.xmap)

map:generator name=xmldb
src=org.apache.cocoon.generation.XMLDBGenerator
logger=sitemap.generator.xmldb
driverorg.dbxml.client.xmldb.DatabaseImpl/driver
basexmldb:dbxml:///db//base
   /map:generator
   map:generator name=xmldbcollection
src=org.apache.cocoon.generation.XMLDBCollectionGenerator
logger=sitemap.generator.xmldbcollection
driverorg.dbxml.client.xmldb.DatabaseImpl/driver
basexmldb:dbxml:///db//base
   /map:generator

Next comment out these lines (near the end of sitemap.xmap):

   map:match pattern=xmldb-generator/db/**/
map:generate type=xmldbcollection src=/{1}/
map:serialize type=xml/
   /map:match
   map:match pattern=xmldb-generator/db/**
map:generate type=xmldb src=/{1}/
map:serialize type=xml/
   /map:match

Now modify the remaining map:match entry:

   map:match pattern=xmldb/**
map:match type=request-parameter pattern=xpath
 map:generate src=xmldb:dbxml://localhost:4080/{../1}#{1}/
 map:serialize type=xml/
/map:match
map:generate src=xmldb:dbxml://localhost:4080/{1}/
map:serialize type=xml/
   /map:match

so it looks like this:

   map:match pattern=xmldb/**
map:match type=request-parameter pattern=xpath
 map:generate src=xmldb:xindice://localhost:4080/db/{../1}#{1}/
 map:serialize type=xml/
/map:match
map:generate src=xmldb:xindice://localhost:4080/db/{1}/
map:serialize type=xml/
   /map:match

Replace:
xmldb:dbxml://localhost:4080/
With:
xmldb:xindice://localhost:4080/db/

Untill I added the db/ at the end I was getting an error saying a file
named:
_bootstrap.ior not found. Where  is the collection name used in the
request. In fact if you look in %XINDICE_HOME%/docs there is only one .ior
file and it's called db_bootstrap.ior.

Next to cocoon.xconf. Modify the following lines:

 source-handler logger=core.source-handler
  !-- xmldb pseudo protocol --
  protocol name=xmldb
class=org.apache.cocoon.components.source.XMLDBSourceFactory
   !-- dbXML driver --
   driver type=dbxml class=org.dbxml.client.xmldb.DatabaseImpl/
   !-- Add here other XML:DB compliant databases drivers --
  /protocol
 /source-handler

so they look like this:

 source-handler logger=core.source-handler
  !-- xmldb pseudo protocol --
  protocol name=xmldb
class=org.apache.cocoon.components.source.XMLDBSourceFactory
   !-- xindice driver --
   driver type=xindice
class=org.apache.xindice.client.xmldb.DatabaseImpl/
   !-- Add here other XML:DB compliant databases drivers --
  /protocol
 /source-handler

Copy xindice.jar into the cocoon\WEB-INF\lib directory.

Start xindice, if it isn't running yet.

Start Tomcat.

And try: http://localhost:8080/cocoon/xmldb/addressbook/

The result looks something like this [I have three entries in the
addressbook db]:

?xml version=1.0 encoding=UTF-8?
collection:collections resources=3 collections=0
xmlns:collection=http://apache.org/cocoon/xmldb/1.0;
 collection:resource name=017f1f9fdabb00ec2b2a4110/
 collection:resource name=017f1f9fdabb00ec2b30c130/
 collection:resource name=017f1f9fdabb00ec2b8cabd3/
/collection:collections

To see all the entries in you addressbook db try:
http://localhost:8080/cocoon/xmldb/addressbook/?xpath=//person

Although all this is working sweet, I do get this error in error.log:

ERROR   (2002-02-22) 13:51.08:468   [sitemap.generator.velocity]
(/cocoon/xmldb/addressbook/) HttpProcessor[82][4]/VelocityGenerator:
ResourceManager : unable to find resource 'VM_global_library.vm' in any
resource loader.
ERROR   (2002-02-22) 13:51.08:578   [sitemap.generator.velocity]
(/cocoon/xmldb/addressbook/) HttpProcessor[82][4]/VelocityGenerator:
ResourceManager : unable to find resource 'VM_global_library.vm' in any
resource loader.

Always 2 entries like this but all seems to running fine.

I have written this in StyleBook format. You can download it from:
http://members.iinet.net.au/~xions/dev/xindice.zip
Unzip it to %PATH_TO_SERVLET_ENGINE%\webapps\cocoon\documentation\xdocs
Access it via:
http://localhost:8080/cocoon/documents/xindice/index.html


Inflexions (WA) Pty Ltd
to
body
Perry Molendijk

Inflexions (WA) Pty Ltd

Re: work around for xsl:text disable-output-escaping=yes?

2001-06-27 Thread Perry Molendijk



Try this:

xsl:for-each select="parent/child[position() mod 2 = 
0]"tr
tdxsl:value-of 
select="preceding-sibling::child/name"//td
tdxsl:value-of select="name"//td/tr/xsl:for-each

and as you can seeyou canmake this 
work for any number of columns:

xsl:for-each select="parent/child[position() mod4 = 
0]"tr 
tdxsl:value-of 
select="preceding-sibling::child[3]/name"//td
tdxsl:value-of 
select="preceding-sibling::child[2]/name"//td
tdxsl:value-of 
select="preceding-sibling::child[1]/name"//td
tdxsl:value-of select="name"//td/tr/xsl:for-each

Just be aware that the preceding-sibling:: axis 
is a reverse axis so counting is reverse document order.

Perry

  - Original Message - 
  From: 
  Robert 
  McKinnon 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, June 27, 2001 8:22 
  PM
  Subject: work around for xsl:text 
  disable-output-escaping="yes"?
  
  Hello,I am trying to dynamically build table rows from an xml 
  file. The solutionthat I came across indicated that I would need to 
  use xsl:textdisable-output-escaping="yes". When I tried to 
  apply this solution Idiscovered that Cocoon does not support 
  disable-output-escaping. What wouldbe an alternative solution? 
  The following are example 
  snippets:[XML]parentchildnamechild1/name/childchildnamechild2/name/childchildnamechild3/name/childchildnamechild4/name/childchildnamechild5/name/childchildnamechild6/name/child/parent[OUTPUT 
  DESIRED]trtdchild1/tdtdchild2/td/trtrtdchild3/tdtdchild4/td/trtrtdchild5/tdtdchild6/td/tr[RECOMMENDED 
  XSL SOLUTION NOT SUPPORTED BY COCOON]trxsl:for-each 
  select="parent/child"tdxsl:value-of 
  select="name"//tdxsl:if test="position() mod 2 = 
  0"xsl:text 
  disable-output-escaping="yes"![CDATA[/trtr]]/xsl:text/xsl:if/xsl:for-each/tr-Please 
  check that your question has not already been answered in theFAQ before 
  posting. http://xml.apache.org/cocoon/faqs.htmlTo 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED]