You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2003/08/05 18:32:54 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/xslt/menu menu.xsl
andreas 2003/08/05 09:32:54
Modified: src/webapp/lenya/xslt/menu menu.xsl
Log:
changed href and uc:* attribute handling
Revision Changes Path
1.20 +26 -2 cocoon-lenya/src/webapp/lenya/xslt/menu/menu.xsl
Index: menu.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/menu/menu.xsl,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- menu.xsl 28 Jul 2003 10:32:05 -0000 1.19
+++ menu.xsl 5 Aug 2003 16:32:54 -0000 1.20
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:uc="http://apache.org/cocoon/lenya/usecase/1.0"
+ >
<xsl:template match="menu">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="menu">
@@ -109,7 +112,11 @@
<xsl:for-each select="item">
<xsl:choose>
<xsl:when test="@href">
- <a class="mI"><xsl:attribute name="href"><xsl:value-of select="normalize-space(@href)"/></xsl:attribute><xsl:value-of select="."/></a>
+ <a class="mI">
+ <xsl:attribute name="href">
+ <xsl:value-of select="@href"/>
+ <xsl:apply-templates select="@*[local-name() != 'href']"/>
+ </xsl:attribute><xsl:value-of select="."/></a>
</xsl:when>
<xsl:otherwise>
<span class="mI"><xsl:value-of select="."/></span>
@@ -127,5 +134,22 @@
</div>
</div>
</xsl:template>
+
+
+<xsl:template match="item/@uc:usecase">
+ <xsl:text/>
+ <xsl:choose>
+ <xsl:when test="contains(../@href, '?')">&</xsl:when>
+ <xsl:otherwise>?</xsl:otherwise>
+ </xsl:choose>
+ <xsl:text/>lenya.usecase=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
+</xsl:template>
+
+<xsl:template match="item/@uc:step">
+ <xsl:text/>&lenya.step=<xsl:value-of select="normalize-space(.)"/><xsl:text/>
+</xsl:template>
+
+<xsl:template match="item/@*[not(namespace-uri() = 'http://apache.org/cocoon/lenya/usecase/1.0')]"><xsl:copy-of select="."/></xsl:template>
+
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org