cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leona Slepetis" <le...@gorillacommunications.com>
Subject null pointer passed as base exception
Date Thu, 27 Jun 2002 20:35:41 GMT
Hi All,

I have part of  a pipeline that looks like this:

    <map:match pattern="matrix">
      <map:generate src="gs.xml"/>
      <map:transform src="gs.xsl">
        <map:parameter name="pagename" value="matrix"/>
        <map:parameter name="dealID" value="{1}"/>
        <map:parameter name="playerID" value="123"/>
        <map:parameter name="matrixfile" value="{3}"/>
        <map:parameter name="projectname" value="{4}"/>
      </map:transform>
      <map:transform src="default-html.xsl"/>
      <map:serialize type="html"/>
    </map:match>

In gs.xml I have:

<application>
  <page name="matrix"/>
<!-- some other stuff that doesn't matter in this example -->
</application>

In gs.xsl I have:

  <xsl:template match="application">
    <xsl:if test="not($pagename)">
      <xsl:apply-templates select="page[@name='default']"/>
    </xsl:if>
    <xsl:if test="$pagename">
      <xsl:apply-templates select="page[@name=$pagename]"/>
    </xsl:if>
  </xsl:template>

And default-html.xsl has:

  <xsl:template match="page">
    <html>
      <head>
        <title>title</title>
      </head>
      <body>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>

I get to it by calling
http://localhost:8080/GS/matrix?dealID=1001&playerID=&matrixfile=file:///D:/
matrix.xml&projectname=new

When I run it, the following error occurs:
Could not read resource file:/D:/tomcat/webapps/GS/gs.xml

org.apache.cocoon.ProcessingException: Could not read resource
file:/D:/tomcat/webapps/GorillaStation/gs.xml: java.lang.RuntimeException:
java.lang.IllegalArgumentException: Null pointer passed as base

One thing I notice is that playerID is not set to the value '123'. Why is
this?
The other thing is that if I take out    <map:parameter name="pagename"
value="matrix"/>  from the pipeline it works
according to the default logic in <xsl:application>.

There doesn't appear to be anything wrong with gs.xml; it was working under
C1.
Other pipeline segments using the parameter "pagename" work just fine, such
as:

    <map:match pattern="summary">
      <map:generate src="gs.xml"/>
      <map:transform src="gs.xsl">
        <map:parameter name="pagename" value="summary"/>
      </map:transform>
      <map:transform src="default-html.xsl"/>
      <map:serialize type="html"/>
    </map:match>

Can anyone give me a clue as to what is wrong?

Thanks very much,
Leona


---------------------------------------------------------------------
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