cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4062] New: - XIncludeTransformer not work inside XSP pages
Date Wed, 10 Oct 2001 05:33:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4062>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

XIncludeTransformer not work inside XSP pages

           Summary: XIncludeTransformer not work inside XSP pages
           Product: Cocoon 2
           Version: 2.0rc1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: core
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: A.Nuzhdov@ftc.ru


I'm work with Win2000 SP2, resin 2.0.2, C2 rc1a, Jikes compiler.
I build my own webapp called "mysite" (through Ant) & place it into Resin 
webapps dir.

> mysite structure:
[mysite]
  [docs]
    menu.xml
    index.xsp
  [stylesheets]
    index.xsl
    error2html.xsl
  [WEB-INF]
    [classes]
    [lib]
    [logs]
    [tmp]
    logkit.xconf
    web.xml
  cocoon.xconf
  sitemap.xmap

> Contents:
menu.xml:
<?xml version="1.0" encoding="UTF-8"?>
<block title="main">
<menu>
 <menu-item title="a" link="index.xml"/>
</menu>
</block>

index.xsp:
<?xml version="1.0" encoding="UTF-8"?>
<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>

index.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
 </xsl:template>
</xsl:stylesheet>

sitemap.xmap pipelines:
 <map:pipelines>
  <map:pipeline>
   <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>
   <map:match pattern="**.xml">                           
    <map:generate src="docs/{1}.xml"/>
    <map:transform type="xinclude"/>
    <map:transform src="stylesheets/index.xsl"/>
    <map:serialize/>
   </map:match> 
   <map:handle-errors>
    <map:transform src="stylesheets/error2html.xsl"/>
    <map:serialize status-code="500"/>
   </map:handle-errors>
  </map:pipeline>
 </map:pipelines>

> URL: http://localhost/mysite/index.xsp

> Log:
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.wildcardMatchN40009E
(sitemap_xmap.java) 
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
[...skipped...]
java.lang.NullPointerException 
	at 
org.apache.cocoon.transformation.XIncludeTransformer.processXIncludeElement
(XIncludeTransformer.java:201) 
	at org.apache.cocoon.transformation.XIncludeTransformer.startElement
(XIncludeTransformer.java:116) 
	at org.apache.cocoon.generation.ServerPagesGenerator.startElement
(ServerPagesGenerator.java:316) 
	at org.apache.cocoon.www.docs.index_xsp.generate(index_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.wildcardMatchN40009E
(sitemap_xmap.java) 
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
	at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
[...skipped...]

> Error source:
  The current_xml_base variable=null in
  XIncludeTransformer.processXIncludeElement()
  function, because XIncludeTransformer.setDocumentLocator() not called.
  When XML processed, all ok - XMLByteStreamInterpreter call
  setDocumentLocator(). But when XSP processed, ServerPagesGenerator
  not call setDocumentLocator() never.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message