You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Stefano Mazzocchi <st...@apache.org> on 2000/01/10 17:47:19 UTC

Re: xsl:include and xsl:import still not working using Jan 08 2000 1 PM cvs

Paul_Dick@lotus.com wrote:
> 
> Vincent,
> 
> This error looks very familiar.  The last time someone was getting this,
> they were trying to output newline characters or whitespace characters to
> the DOM before they had created a root node?  Check to be sure this is not
> happening in your code.

I get the same stack trace with these files

<?xml version="1.0"?>
<?xml-stylesheet href="import-page-html.xsl" type="text/xsl"?>

<page>
 <title>Hello</title>
 <content>
  <paragraph>This is my first Cocoon file!</paragraph>
 </content>
</page>

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="../hello/hello-page-html.xsl"/>
  
  <xsl:template match="paragraph">
   <p align="left">
    <b>
     <xsl:apply-templates/>
    </b>
   </p>
  </xsl:template>

</xsl:stylesheet>


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="page">
   <html>
    <head>
     <title>
      <xsl:value-of select="title"/>
     </title>
    </head>
    <body bgcolor="#ffffff">
     <xsl:apply-templates/>
    </body>
   </html>
  </xsl:template>

  <xsl:template match="title">
   <h1 align="center">
    <xsl:apply-templates/>
   </h1>
  </xsl:template>

  <xsl:template match="paragraph">
   <p align="center">
    <i>
     <xsl:apply-templates/>
    </i>
   </p>
  </xsl:template>

</xsl:stylesheet>

which work just fine from the command line. It must be something with
the liaison since from the command line this works with no problems...
very strange.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------