cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Larson" <Tdlar...@ci.canton.oh.us>
Subject Re: xInclude and SQL Transformer NullPointerException
Date Wed, 16 Oct 2002 15:51:16 GMT
I had a similar problem.  When I used the XInclude transformer, I got
a NullPointerException when I tried to refer to the results with the
"cocoon:/" protocol. Here was my solution (bad hack, but it worked):

I made a stylesheet "copy-of.xsl" that simply copied what it was passed
without changing it.  Then I used this stylesheet after the XInclude
transformer to get rid of the errors:

<map:match pattern="somefile.xml">
  <map:generate src="somefile.xml"/>
  <map:transform type="xinclude"/>
  <map:transform src="copy-of.xsl"/>
  <!-- maybe SLQTransformer will work here now :) -->
  <map:serialize/>
</map:match>

<map:match pattern="otherfile.xml">
  <map:generate src="cocoon:/somefile"/>
  <map:serialize/>
</map:match>

Hope this helps,
Tim

>>> cocoon-users@schimak.at 10/16/02 09:27AM >>>
I experience the following problem: I am including fragments of another xml file using xinclude
and 
the xpointer() syntax. Works fine. If I then want to use the SQLTransformer within the same

pipeline, I get a

org.apache.cocoon.ProcessingException: Failed to execute pipeline.: java.lang.NullPointerException
Original exception : java.lang.Original exception : java.lang.NullPointerException
at org.apache.xml.utils.AttList.getValue(AttList.java:247)
at org.apache.cocoon.transformation.SQLTransformer.startQueryElement(SQLTransformer.java:403)
at org.apache.cocoon.transformation.SQLTransformer.startTransformingElement(SQLTransformer.java:742)
...

If I take the result of the xinclude step, save it as a file and just process it using the
same 
SQLTransformer step, everything works fine...

Using 2.03 / Tomcat 4.04, but a recent CVS shows the same behaviour.

I personally didn't find anything in bugzilla, but is it a known bug, or could I have done
something 
wrong? Any ideas?

Martin.



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message