You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Wilkes <cw...@ladro.com> on 2003/09/05 18:56:25 UTC
Re: XSP works, XSLT works, XSLT after XSP doesn't work
On Fri, Aug 29, 2003 at 11:10:30AM -0700, Chris Wilkes wrote:
> Hi all,
>
> I have an XSP that generates XML and then I want to run that XML
> through an XSL to make into an HTML page. Pretty straightforward.
> Except that I'm getting this error when doing so:
> org.apache.cocoon.ProcessingException: Exception in
> ServerPagesGenerator.generate(): java.lang.RuntimeException
> 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)
> on my Cocoon-2.1rc1 running under Jetty.
>
> I took out my XSLT and serialized the XSP output to XML. That works,
> and I took that file and put it on the webserver. I then ran that XML
> through the XSLT and it worked fine.
> So I'm thinking it has something to do with the hand off between the
> two.
> Does anyone have any debugging tips for this? I do have the .java and
> .class files generated from my XSP when I take out the XSLT part, is
> there something I can look at in there? Is this a namespace issue
> perhaps?
Figured out my problem. A Serializer takes as inputs SAX events:
http://wiki.cocoondev.org/Wiki.jsp?page=Serializer
And I wasn't giving it that, rather some straight text. The solution
was to put take my XML string and use the xsp:util logicsheet:
<util:include-expr expr="xmlString"/>
It would be nice if I could feed it a DOM or JDOM variable and have it
do it for me, since that's what I have in the first place. Is there
such a construct?
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XSP works, XSLT works, XSLT after XSP doesn't work
Posted by Vadim Gritsenko <va...@verizon.net>.
Conal Tuohy wrote:
>Chris Wilkes wrote:
>
>
>
>>Figured out my problem. A Serializer takes as inputs SAX events:
>> http://wiki.cocoondev.org/Wiki.jsp?page=Serializer
>>And I wasn't giving it that, rather some straight text. The solution
>>was to put take my XML string and use the xsp:util logicsheet:
>> <util:include-expr expr="xmlString"/>
>>
>>It would be nice if I could feed it a DOM or JDOM variable and have it
>>do it for me, since that's what I have in the first place. Is there
>>such a construct?
>>
>>
<xsp:expr>myDOMvariable</xsp:expr>
See XSPObjectHelper for details.
Vadim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: XSP works, XSLT works, XSLT after XSP doesn't work
Posted by Conal Tuohy <co...@paradise.net.nz>.
Chris Wilkes wrote:
> Figured out my problem. A Serializer takes as inputs SAX events:
> http://wiki.cocoondev.org/Wiki.jsp?page=Serializer
> And I wasn't giving it that, rather some straight text. The solution
> was to put take my XML string and use the xsp:util logicsheet:
> <util:include-expr expr="xmlString"/>
>
> It would be nice if I could feed it a DOM or JDOM variable and have it
> do it for me, since that's what I have in the first place. Is there
> such a construct?
Have you considered upgrading your XSP into a Transformer or Generator?
You could extend the AbstractDOMTransformer, or just use the DOMStreamer to
"stream" your DOM objects as SAX events. Rather than generate a DOM and then
stream it (as SAX), you may be able to stream it as you generate it.
Just a thought.
Con
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org