cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Re: Quick point on xinclude syntax.
Date Mon, 19 Feb 2001 16:38:28 GMT
My question was prompted by my trying it out and having no joy.

I've got a document "test.xml":

	<?xml version="1.0"?>
	<test xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
	    <xinclude:include href="test2.xml" />
	    <something>Some text</something>
	</test>

and a document "test2.xml":

	<?xml version="1.0"?>
	<document>
		<content>
			Some more text
		</content>
	</document>

and a match in my sitemap:

    <map:match pattern="test.xml">
        <map:generate src="test.xml" />
        <map:transform type="xinclude" />
        <map:serialize type="xml"/>
    </map:match>

I'm expecting to get:

	<?xml version="1.0"?>
	<test>
		<document>
			<content>
				Some more text
			</content>
		</document>
	    <something>Some text</something>
	</test>

Instead I get a stack trace:

java.lang.NullPointerException
        at org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryImpl.java:82)
        at org.apache.cocoon.transformation.XIncludeTransformer.processXIncludeElement(XIncludeTransformer.java:184)
        at org.apache.cocoon.transformation.XIncludeTransformer.startElement(XIncludeTransformer.java:122)
        at org.apache.xalan.transformer.QueuedStartElement.flush(QueuedStartElement.java:286)
        at org.apache.xalan.transformer.ResultTreeHandler.flushPending(ResultTreeHandler.java:774)
        at org.apache.xalan.transformer.ResultTreeHandler.endElement(ResultTreeHandler.java:283)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:749)
        at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
        at org.apache.xalan.templates.ElemCopy.execute(ElemCopy.java:151)
        at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:495)
        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:193)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2154)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2097)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2029)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1189)
        at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:2894)
        at java.lang.Thread.run(Thread.java:479)


On Monday, February 19, 2001, at 04:11 PM, Paul Russell wrote:

> * Stuart Roebuck (stuart.roebuck@adolos.co.uk) wrote : 
> > While we're talking xinclude.  What's the current status on xinclude 
> > support under the latest C2 build? 
>  
> Um. It works. :) 
>  
> Just stick the xinclude transformer in the pipeline, although this may 
> well become unnecessary RealSoonNow (I'm drip feeding an e-mail on the 
> subject at the moment. Expect it when my copious free time allows :/) 
>  
>  
> Paul. 
> --  
> Paul Russell                                 Email:   paul@luminas.co.uk 
> Technical Director                             Tel:  +44 (0)20 8553 6622 
> Luminas Internet Applications                  Fax:  +44 (0)870 28 47489 
> This is not an official statement or order.    Web:    www.luminas.co.uk 
>  
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org 
> For additional commands, email: cocoon-dev-help@xml.apache.org 
>  
>  


-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Lead Developer                               Java, XML, MacOS X, XP, etc.
ADOLOS                                             http://www.adolos.com/
Mime
View raw message