You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew Answer <A....@ftc.ru> on 2001/09/28 07:09:25 UTC
XIncludeTransformer still not working
Hello cocoon-users,
Inside C2rc1 XIncludeTransformer still not working.
I do this:
index.xsp:
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:xinclude="http://www.w3.org/2001/XInclude">
<page>
<xinclude:include href="menu.xml"/>
</page>
</xsp:page>
sitemap.xmap:
<map:match pattern="*.xsp">
<map:generate type="serverpages" src="docs/{1}.xsp"/>
<map:transform type="xinclude"/>
<map:transform src="stylesheets/index.xsl"/>
<map:serialize/>
</map:match>
But error occured:
[
org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerException
at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:187)
at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:214)
at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)
at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN189(sitemap_xmap.java:1517)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:841)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:763)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:115)
at org.apache.cocoon.Cocoon.process(Cocoon.java:446)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
java.lang.NullPointerException
at org.apache.cocoon.transformation.XIncludeTransformer.processXIncludeElement(XIncludeTransformer.java:212)
at org.apache.cocoon.transformation.XIncludeTransformer.startElement(XIncludeTransformer.java:127)
at org.apache.cocoon.generation.ServerPagesGenerator.startElement(ServerPagesGenerator.java:316)
at org.apache.cocoon.www.docs.index2_xsp.generate(index2_xsp.java)
at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:175)
at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:214)
at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)
at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN189(sitemap_xmap.java:1517)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:841)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:763)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:115)
at org.apache.cocoon.Cocoon.process(Cocoon.java:446)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
]
Your comments?
Best regards,
Andrew Answer A.Nuzhdov@ftc.ru
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: XIncludeTransformer still not working
Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 12:09 PM +0700 28/9/01, Andrew Answer wrote:
><xsp:page
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xinclude="http://www.w3.org/2001/XInclude">
><page>
> <xinclude:include href="menu.xml"/>
></page>
></xsp:page>
As your page is an XSP, you _could_ use the xinclude tag of the util taglib.
However, if you want to use the XInclude Transformer, I believe you need to
provide an xml:base attribute.
ie. something like this:
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:xinclude="http://www.w3.org/2001/XInclude">
<page>
<xinclude:include
href="menu.xml"
xml:base="context://your-context/docs/"
/>
</page>
</xsp:page>
Hope this helps
regards Jeremy
--
___________________________________________________________________
Jeremy Quinn Karma Divers
webSpace Design
HyperMedia Research Centre
<ma...@mac.com> <http://www.media.demon.co.uk>
<phone:+44.[0].20.7737.6831> <pa...@vizzavi.net>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
AW: XIncludeTransformer still not working
Posted by Jorn Heid <he...@fh-heilbronn.de>.
The XIncludeTransformer is working perfectly for me.
The difference I have is that I'm using parse="xml" inside the XInclude-Tag
and I'm using static content.
As you get a NPE inside the generator, I think it's not a XInclude problem
...
JOERN_HEID
-----Ursprungliche Nachricht-----
Von: Andrew Answer [mailto:A.Nuzhdov@ftc.ru]
Gesendet: Freitag, 28. September 2001 07:09
An: cocoon-users@xml.apache.org
Betreff: XIncludeTransformer still not working
Hello cocoon-users,
Inside C2rc1 XIncludeTransformer still not working.
I do this:
index.xsp:
<xsp:page
xmlns:xsp="http://apache.org/xsp"
xmlns:xinclude="http://www.w3.org/2001/XInclude">
<page>
<xinclude:include href="menu.xml"/>
</page>
</xsp:page>
sitemap.xmap:
<map:match pattern="*.xsp">
<map:generate type="serverpages" src="docs/{1}.xsp"/>
<map:transform type="xinclude"/>
<map:transform src="stylesheets/index.xsl"/>
<map:serialize/>
</map:match>
But error occured:
[
org.apache.cocoon.ProcessingException: Exception in
ServerPagesGenerator.generate(): java.lang.NullPointerException
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:187)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:214)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:364)
at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN189(sitemap_xmap.java:1517)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:841)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:763)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:115)
at org.apache.cocoon.Cocoon.process(Cocoon.java:446)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:8
2)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
java.lang.NullPointerException
at
org.apache.cocoon.transformation.XIncludeTransformer.processXIncludeElement(
XIncludeTransformer.java:212)
at
org.apache.cocoon.transformation.XIncludeTransformer.startElement(XIncludeTr
ansformer.java:127)
at
org.apache.cocoon.generation.ServerPagesGenerator.startElement(ServerPagesGe
nerator.java:316)
at org.apache.cocoon.www.docs.index2_xsp.generate(index2_xsp.java)
at
org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenera
tor.java:175)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:214)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:364)
at
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN189(sitemap_xmap.java:1517)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:841)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:763)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:115)
at org.apache.cocoon.Cocoon.process(Cocoon.java:446)
at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:520)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at
com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:8
2)
at com.caucho.server.http.Invocation.service(Invocation.java:277)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:129)
at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
]
Your comments?
Best regards,
Andrew Answer A.Nuzhdov@ftc.ru
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>