You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christian Parpart <cp...@t-online.de> on 2000/11/16 01:38:56 UTC

creating/using taglib doesn't work, why?

Hi

I tried to create my own taglib as follows:

file: lstest.xml
-----------------------------------------------
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="lstest.xsl"?>

<?cocoon-process type="xsp"?>
<?logicsheet href="/lstest-tl.xsl"?>

<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:lstest="/lstest"
>
  <page>
    <title>Everything</title>
    <lstest:test/>
  </page>
</xsp:page>

file: lstest.xsl
-----------------------------------------------
<?xml version="1.0"?>

<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
>
  <xsl:template match="page">
    <html>
      <head>
        <title>LogicSheet Test</title>
      </head>
      <xsl:apply-templates/>
    </html>
  </xsl:template>
	
  <xsl:template match="title">
    <h1><xsl:value-of select="."/></h1>
  </xsl:template>

</xsl:stylesheet>

file: lstest-tl.xsl
-----------------------------------------------
<?xml version="1.0"?>

<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:lstest="/lstest"
>
  <xsl:template match="@*|*|text()|processing-instruction()">
    <xsl:copy>
      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    </xsl:copy>
  </xsl:template>
	
  <xsl:template match="lstest:test">
    lstest:test called<br/>
  </xsl:template>
</xsl:stylesheet>

==============================================
These are one of my files where I've tried to understand it.
But it doesn't work. Why?

He never loads the taglib. Even if I add an entry to my cocoon.properties
I can't see any response. So, what's wrong?

Regards,
Christian Parpart
mailto:cparpart@surakware.com
http://www.surakware.com (new http://surak.cocoonhost.com)