You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Stocker <ch...@gmx.at> on 2002/06/12 21:36:48 UTC

define elements.xsl

hi!

i have a test.xsp and a test.xsl and a elements.xsl

i use tags like <input>, <span>, <div>, .... in my XSP-page.
so i write a elements.xsl which defines these tags like (i put
the elements.xsl also as attachement) -->

<xsl:template match="div">
    <div>
    	<xsl:if test="@id!=''">
    		<xsl:attribute name="id"><xsl:value-of
select="@id"/></xsl:attribute>
    	</xsl:if>
    	<xsl:if test="@class!=''">
    		<xsl:attribute name="class"><xsl:value-of
select="@class"/></xsl:attribute>
    	</xsl:if>
    	<xsl:if test="@style!=''">
    		<xsl:attribute name="style"><xsl:value-of
select="@style"/></xsl:attribute>
    	</xsl:if>
    	
      <xsl:apply-templates/>
      
    </div>
</xsl:template>


i import these elements.xsl in the testxsl, so all my
tags in the xsp-site are defined.



is there a possibility to write down this in a logicsheet, so that i 
have not to import the elements.xsl in the test.xsl and define the
logicsheet in the xsp-page?


i tried the logicsheet (mylogic.xsl) at 
http://www.cocooncenter.de/cc/documents/resources/logicsheet/filelist.ht
ml
it works fine - i want to add a template given above for <div> -->
but this doesn't work (no <div> is written out to my page.

what's wrong with my logicsheet.


greetings, chris