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?

Chris

GENERATED XML
-------------
<?xml version="1.0" encoding="UTF-8"?>
<ldap xmlns:xsp="http://apache.org/xsp";
xmlns:util="http://apache.org/xsp/util/2.0";
xmlns:xsp-request="http://apache.org/xsp/request/2.0";>

<users>
  <user accountStatus="active" cn="Chris Wilkes"
   mailAlternateAddress="[EMAIL PROTECTED]" mailHost="ladro.com"
   uid="chriswj"/>
</users>
</ldap>

XSLT to convert to HTML
-----------------------
<?xml version="1.0"?>

<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
    xmlns:xsp="http://apache.org/xsp";
    xmlns:util="http://apache.org/xsp/util/2.0";
    xmlns:xsp-request="http://apache.org/xsp/request/2.0";
>

   <xsl:template match="/">

                <head>
                        <title>Muliple LDAP query results</title>
                        <style type="text/css">
                           .name {        COLOR: black;
       FONT-FAMILY: Verdana, Helvetica, Sans-serif;
       FONT-SIZE: 10pt;
       FONT-WEIGHT: bold;
       }
                .user {
                        BACKGROUND-COLOR: yellow;
                        }
                        span.switch { cursor: pointer; margin-left: 5px;
text-decoration: underline; }
       </style>
       <script src="/scripts/main2.js" type="text/javascript"></script>
         </head>
        <body>
        <xsl:apply-templates />
        </body>
   </xsl:template>
   

   <xsl:template match="user">
                <p>
                <div class="user">
<span class="switch" id="user-switch" onclick="toggle('user')">+</span>
        <div class="name"><xsl:value-of select="@cn"/></div>
<pre id="full user info" style="display: none">
                <br/><a href="mailto:[EMAIL PROTECTED]"><xsl:value-of
select="@mail"/></a>
                                <br/><xsl:value-of select="@telephoneNumber"/>
                                <br/>Some other useful info
                </pre>
                </div>
                </p>

   </xsl:template>
   </xsl:stylesheet>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to