Jason
> A way to test this would be to remove the xinclude transform step
> from your pipeline and see if the includes are still processed.
I tried this and the xi:include element is left untouched.
I have included the cocoon.log messages for when the XInclude fails (if
that helps):
ERROR (2006-05-09) 16:36.23:429 [sitemap.transformer.xinclude]
(/cocoon/argyleC/ui/selectCompany.html)
http-8080-Processor24/XIncludeTransformer.XIncludePipe: xIncluded
resource not found:
file:/C:/Apache/Tomcat-5.5/webapps/cocoon/argyleC/../../content/resource
s/site/selectCompany.xml
java.io.FileNotFoundException:
C:\Apache\Tomcat-5.5\webapps\cocoon\argyleC\..\..\content\resources\site
\selectCompany.xml (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.ja
va:146)
at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:190
)
at
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:139
)
at
org.apache.cocoon.transformation.XIncludeTransformer$XIncludePipe.proces
sXIncludeElement(XIncludeTransformer.java:435)
at
org.apache.cocoon.transformation.XIncludeTransformer$XIncludePipe.startE
lement(XIncludeTransformer.java:221)
at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
94)
at
org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:
94)
at
org.apache.cocoon.transformation.AbstractSAXTransformer.startElement(Abs
tractSAXTransformer.java:466)
at
org.apache.cocoon.webapps.session.transformation.SessionPreTransformer.s
tartElement(SessionPreTransformer.java:119)
at
net.sf.saxon.event.ContentHandlerProxy.startContent(ContentHandlerProxy.
java:290)
at
net.sf.saxon.event.ProxyReceiver.startContent(ProxyReceiver.java:166)
at
net.sf.saxon.event.NamespaceReducer.startContent(NamespaceReducer.java:1
68)
at
net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOu
tputter.java:492)
at
net.sf.saxon.event.ComplexContentOutputter.startElement(ComplexContentOu
tputter.java:145)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:157)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:189)
at
net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.j
ava:153)
at
net.sf.saxon.instruct.Block.processLeavingTail(Block.java:336)
at
net.sf.saxon.instruct.Instruction.process(Instruction.java:91)
at
net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.j
ava:164)
at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
at net.sf.saxon.instruct.Template.expand(Template.java:108)
at
net.sf.saxon.instruct.Template.applyLeavingTail(Template.java:92)
at
net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
319)
at
net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.processLeavin
gTail(ApplyTemplates.java:452)
at
net.sf.saxon.Controller.transformDocument(Controller.java:1566)
at
net.sf.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.j
ava:133)
at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:5
5)
at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransfo
rmer.java:585)
at
net.sf.saxon.event.ContentHandlerProxy.close(ContentHandlerProxy.java:20
3)
at net.sf.saxon.event.ProxyReceiver.close(ProxyReceiver.java:90)
at
net.sf.saxon.event.ComplexContentOutputter.close(ComplexContentOutputter
.java:448)
at
net.sf.saxon.Controller.transformDocument(Controller.java:1587)
at
net.sf.saxon.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.j
ava:133)
at
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:5
5)
at
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransfo
rmer.java:585)
at
org.apache.cocoon.generation.RequestGenerator.generate(RequestGenerator.
java:197)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
XMLPipeline(AbstractProcessingPipeline.java:578)
at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
(AbstractProcessingPipeline.java:480)
at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
SerializeNode.java:120)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:46)
at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(Ac
tTypeNode.java:138)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:46)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:142)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:92)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
(ConcreteTreeProcessor.java:234)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
(ConcreteTreeProcessor.java:176)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:248)
at
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun
tNode.java:117)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:46)
at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:130)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:142)
at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:68)
at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:92)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
(ConcreteTreeProcessor.java:234)
at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process
(ConcreteTreeProcessor.java:176)
at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:248)
at org.apache.cocoon.Cocoon.process(Cocoon.java:679)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
8)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:663)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)
at java.lang.Thread.run(Unknown Source)
Regards
Philip Fennell
-----Original Message-----
From: Jason Johnston [mailto:[EMAIL PROTECTED]
Sent: 09 May 2006 15:52
To: [email protected]
Subject: Re: Cocoon's Xinclude behaviour changed with Saxon 8.7.1 - Why?
Fennell, Philip wrote:
> Jason,
>
>> My guess is that Saxon 8.6 was actually performing the XInclude
> inclusions,
>> not the xinclude transformer, since as far as I know the transformer
> doesn't
>> have a concept of "source document location" and resolves relative
> paths from
>> the sitemap context. Perhaps something changed with Saxon 8.7.x so
> that it
>> no longer evaluates XIncludes, so now you're seeing the transformer
>> in
> action.
>
> Although you say that 'the xinclude transformer, since as far as I
> know the transformer doesn't have a concept of "source document
> location"' that doesn't explain why both Xalan and Saxon 8.6.x Where
> quite happy with paths relative to the source document (the document
> being processed by Cocoon) And only when Saxon 8.7.x is introduced
> does the context shift to the Cocoon web application.
I thought we were just talking about Saxon here; now that you say Xalan
behaves the same way that changes the picture and blows my theory out of
the water. ;)
So perhaps it's actually the other way around: Xalan and Saxon 8.6.x do
not process XIncludes, whereas 8.7.x does but does not know how to
properly determine the source document location? Just trying to find a
pattern here. A way to test this would be to remove the xinclude
transform step from your pipeline and see if the includes are still
processed.
>
> A compliant XInclude processor, in the absence of an xml:base
> attribute, should resolve URIs relative to the document in which the
> XInclude instruction is encountered.
>
>> Perhaps you could handle both cases by using:
>> <xi:include href="context:/content/resources/site/login.xml">
>
> I try to avoid where possible using context, cocoon and resource
> protocols as they tie the content to this application.
>
> As I cannot provide the whole source for the webapp I am working on I
> will endevour to construct a simple test example webapp that
> illustrates the problem.
>
> Thanks.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]