RE: Exception when using copy-of

2003-06-20 Thread Carmona Perez, David
I haven't seen in http://www.apache.org/dist/cocoon/ the existence of Cocoon 2.0.5!!!

Does it really exist? What's new?



David

-Mensaje original-
De: Stefan Hilzinger [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 19 de junio de 2003 17:38
Para: [EMAIL PROTECTED]
Asunto: Exception when using copy-of

this message had been rejected because of its previous subject, so I send it
again. Sorry if you should receive twice as well!

hi!

I'm creating a website using the following software:
Tomcat:4.1.24
Cocoon: version 2.0.5-dev
Xalan: 2.5.1
Xerces: 2.4.0
jdk 1.4.1_02
os's: windows xpp / suse linux 8.0


What I'd like to do is the following:
Create a new tag in the result tree and copy a part of another xml-file in
there.
Just like this:

   xsl:template match=content_element
  abcdef
 xsl:copy-of select=document(concat('../xmldocs/',
tring($document)))/*/
  /abcdef
   /xsl:template

This gives the following error which seems strange to me.

ERROR MESSAGE-

The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies
that org.apache.cocoon.ProcessingException says:

Exception during processing of
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml

More precisely:

org.apache.cocoon.ProcessingException: Exception during processing of
file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml:
java.lang.RuntimeException: Errors in XSLT transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1

-END OF ERROR MESSAGE-


I get the same error if I use

   xsl:template match=content_element
  xsl:element name=abcdef
  xsl:copy-of select=document(concat('../xmldocs/',
string($document)))/*/
  xsl:element/
   /xsl:template



Every other tag than xsl:copy of.../ works as it should.


Below, I have attached the complete exception trace.


I would be very glad if someone could help me!
Thanks in advance!
Stefan


Original exception : java.lang.RuntimeException: Errors in XSLT
transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1

at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:589)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:302)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:197)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:258)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:412)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:148)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:145)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java

RE: Exception when using copy-of

2003-06-20 Thread Reinhard Pötz
Cocoon 2.0.5 has not been released yet. It is the version in the CVS
repository. AFAIK only bug fixes are included but no enhancements. Those
are only part of 2.1 which has not been released too.

Reinhard

 -Original Message-
 From: Carmona Perez, David [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 20, 2003 10:20 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Exception when using copy-of
 
 
 I haven't seen in http://www.apache.org/dist/cocoon/ the 
 existence of Cocoon 2.0.5!!!
 
 Does it really exist? What's new?
 
 
 
 David
 
 -Mensaje original-
 De: Stefan Hilzinger [mailto:[EMAIL PROTECTED]
 Enviado el: jueves, 19 de junio de 2003 17:38
 Para: [EMAIL PROTECTED]
 Asunto: Exception when using copy-of
 
 this message had been rejected because of its previous 
 subject, so I send it again. Sorry if you should receive 
 twice as well!
 
 hi!
 
 I'm creating a website using the following software: Tomcat:4.1.24
 Cocoon: version 2.0.5-dev
 Xalan: 2.5.1
 Xerces: 2.4.0
 jdk 1.4.1_02
 os's: windows xpp / suse linux 8.0
 
 
 What I'd like to do is the following:
 Create a new tag in the result tree and copy a part of 
 another xml-file in there. Just like this:
 
xsl:template match=content_element
   abcdef
  xsl:copy-of select=document(concat('../xmldocs/',
 tring($document)))/*/
   /abcdef
/xsl:template
 
 This gives the following error which seems strange to me.
 
 ERROR MESSAGE-
 
 The 
 org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
 e notifies that org.apache.cocoon.ProcessingException says:
 
 Exception during processing of 
 file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/ed
 uceth/commondocs/structure.xml
 
 More precisely:
 
 org.apache.cocoon.ProcessingException: Exception during processing of
 file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/edu
 ceth/commondocs/structure.xml:
 java.lang.RuntimeException: Errors in XSLT transformation:
 Fatal: File
 file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/ed
 uceth/stylesheets/assembly.xsl;
 Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1
 
 -END OF ERROR MESSAGE-
 
 
 I get the same error if I use
 
xsl:template match=content_element
   xsl:element name=abcdef
   xsl:copy-of select=document(concat('../xmldocs/',
 string($document)))/*/
   xsl:element/
/xsl:template
 
 
 
 Every other tag than xsl:copy of.../ works as it should.
 
 
 Below, I have attached the complete exception trace.
 
 
 I would be very glad if someone could help me!
 Thanks in advance!
 Stefan
 
 
 Original exception : java.lang.RuntimeException: Errors in XSLT
 transformation:
 Fatal: File
 file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/ed
 uceth/stylesheets/assembly.xsl;
 Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1
 
 at
 org.apache.xalan.transformer.TransformerImpl.run(TransformerIm
 pl.java:3364)
 at
 org.apache.xalan.transformer.TransformerHandlerImpl.endDocumen
 t(TransformerHandlerImpl.java:427)
 at
 org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLP
 ipe.java:91)
 at
 org.apache.cocoon.transformation.TraxTransformer.endDocument(T
raxTransformer.java:589)
 at 
 org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknow
 n Source) at 
 org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknow
 n Source) at 
 org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown 
 Source) at 
 org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) 
 at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown 
 Source) at 
 org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDisp
 atcher.dispatch(Unknown
 Source)
 at 
 org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocu
 ment(Unknown
 Source)
 at org.apache.xerces.parsers.XML11Configuration.parse(Unknown 
 Source) at 
 org.apache.xerces.parsers.DTDConfiguration.parse(Unknown 
 Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown 
 Source) at 
 org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
 Source) at 
 org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:302)
 at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321)
 at
 org.apache.cocoon.components.source.AbstractStreamSource.toSAX
 (AbstractStreamSource.java:197)
 at
 org.apache.cocoon.generation.FileGenerator.generate(FileGenera
 tor.java:143)
 at
 org.apache.cocoon.components.pipeline.CachingEventPipeline.pro
 cess(CachingEventPipeline.java:258)
 at
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
 ocess(CachingStreamPipeline.java:412)
 at
 org.apache.cocoon.components.treeprocessor.sitemap.SerializeNo
 de.invoke(SerializeNode.java:148)
 at
 org.apache.cocoon.components.treeprocessor.AbstractParentProce
 ssingNode.invokeNodes(AbstractParentProcessingNode.java:84

RE: Exception when using copy-of

2003-06-20 Thread Upayavira
 I haven't seen in http://www.apache.org/dist/cocoon/ the existence of
 Cocoon 2.0.5!!!
 
 Does it really exist? What's new?

It is the current development version of the 2.0 branch, and can only be got directly 
from CVS. There'll probably be a status.xml file in with it that'll tell you what's 
new.

Regards, Upayavira


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



Re: Exception when using copy-of

2003-06-20 Thread Bruno PIERRE
you can use :

xsl:template match=document
  xsl:apply-templates
select=document(concat('../page/',string(.),'.xml'))/* mode=copy/
/xsl:template

xsl:template match=/|*|@*|text() mode=copy
xsl:copyxsl:copy-of select=@*/xsl:apply-templates
mode=copy//xsl:copy
/xsl:template

but their is a problem cocoon reindent automatically.
the tag xsl:output is ignored

and when building your variable $document be carefful not doing it with
xsl:variable name=document
  xsl:value-of select=dir/
  xsl:text//xsl:text
  xsl:value-of select=file/
/xsl:variable

but with
xsl:variable name=document select=concat(dir,'/',file)/

-Mensaje original-
De: Stefan Hilzinger [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 19 de junio de 2003 17:38
Para: [EMAIL PROTECTED]
Asunto: Exception when using copy-of

this message had been rejected because of its previous subject, so I send it
again. Sorry if you should receive twice as well!

hi!

I'm creating a website using the following software:
Tomcat:4.1.24
Cocoon: version 2.0.5-dev
Xalan: 2.5.1
Xerces: 2.4.0
jdk 1.4.1_02
os's: windows xpp / suse linux 8.0


What I'd like to do is the following:
Create a new tag in the result tree and copy a part of another xml-file in
there.
Just like this:

   xsl:template match=content_element
  abcdef
 xsl:copy-of select=document(concat('../xmldocs/',
tring($document)))/*/
  /abcdef
   /xsl:template

This gives the following error which seems strange to me.

ERROR MESSAGE-

The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies
that org.apache.cocoon.ProcessingException says:

Exception during processing of
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/commondo
cs/structure.xml

More precisely:

org.apache.cocoon.ProcessingException: Exception during processing of
file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/educeth/commondoc
s/structure.xml:
java.lang.RuntimeException: Errors in XSLT transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/styleshe
ets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1

-END OF ERROR MESSAGE-


I get the same error if I use

   xsl:template match=content_element
  xsl:element name=abcdef
  xsl:copy-of select=document(concat('../xmldocs/',
string($document)))/*/
  xsl:element/
   /xsl:template



Every other tag than xsl:copy of.../ works as it should.


Below, I have attached the complete exception trace.


I would be very glad if someone could help me!
Thanks in advance!
Stefan


Original exception : java.lang.RuntimeException: Errors in XSLT
transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/styleshe
ets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1

at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364)
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:589)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:302)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:197)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:258)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:412)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(Seri
alizeNode.java:148)
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

Exception when using copy-of

2003-06-19 Thread Stefan Hilzinger
this message had been rejected because of its previous subject, so I send it 
again. Sorry if you should receive twice as well!

hi!

I'm creating a website using the following software:
Tomcat:4.1.24
Cocoon: version 2.0.5-dev
Xalan: 2.5.1
Xerces: 2.4.0
jdk 1.4.1_02
os's: windows xpp / suse linux 8.0
What I'd like to do is the following:
Create a new tag in the result tree and copy a part of another xml-file in
there.
Just like this:
  xsl:template match=content_element
 abcdef
xsl:copy-of select=document(concat('../xmldocs/',
tring($document)))/*/
 /abcdef
  /xsl:template
This gives the following error which seems strange to me.

ERROR MESSAGE-

The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies
that org.apache.cocoon.ProcessingException says:
Exception during processing of
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml
More precisely:

org.apache.cocoon.ProcessingException: Exception during processing of
file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml:
java.lang.RuntimeException: Errors in XSLT transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1
-END OF ERROR MESSAGE-

I get the same error if I use

  xsl:template match=content_element
 xsl:element name=abcdef
 xsl:copy-of select=document(concat('../xmldocs/',
string($document)))/*/
 xsl:element/
  /xsl:template


Every other tag than xsl:copy of.../ works as it should.

Below, I have attached the complete exception trace.

I would be very glad if someone could help me!
Thanks in advance!
Stefan
Original exception : java.lang.RuntimeException: Errors in XSLT 
transformation:
Fatal: File
file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;
Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1

at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364)
at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:589)
at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
Source)
at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:302)
at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:197)
at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:258)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:412)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:148)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:151)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:145)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:340)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:301)
at org.apache.cocoon.Cocoon.process(Cocoon.java:581)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1048)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at