Author: thorsten
Date: Wed Feb 22 16:43:27 2006
New Revision: 380004
URL: http://svn.apache.org/viewcvs?rev=380004&view=rev
Log:
Implementing renaming of @type values now inline and block.
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/hooksMatcher-html.xsl
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/hooksMatcher-html.xsl
URL:
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/hooksMatcher-html.xsl?rev=380004&r1=380003&r2=380004&view=diff
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/hooksMatcher-html.xsl
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/hooksMatcher-html.xsl
Wed Feb 22 16:43:27 2006
@@ -23,30 +23,36 @@
<xsl:apply-templates/>
</xsl:template>
<!--This template will match the different combinations for hooks-->
- <xsl:template match="[EMAIL PROTECTED] and (@type='div' or not(@type) and
not(@class))]">
- <div id="[EMAIL PROTECTED]">
- <xsl:apply-templates/>
- <xsl:if test="@nbsp='true'"> </xsl:if>
- </div>
+ <xsl:template match="hook">
+ <xsl:if test="@type='block' or not(@type)">
+ <div>
+ <xsl:call-template name="attributes"/>
+ <xsl:if test="@nbsp='true'"><xsl:text> </xsl:text></xsl:if>
+ <xsl:apply-templates/>
+ </div>
+ </xsl:if>
+ <xsl:if test="@type='inline'">
+ <span id="[EMAIL PROTECTED]">
+ <xsl:call-template name="attributes"/>
+ <xsl:if test="@nbsp='true'"><xsl:text> </xsl:text></xsl:if>
+ <xsl:apply-templates/>
+ </span>
+ </xsl:if>
</xsl:template>
- <xsl:template match="[EMAIL PROTECTED] and (@type='div' or not(@type))]">
- <div class="[EMAIL PROTECTED]">
- <xsl:apply-templates/>
- <xsl:if test="@nbsp='true'"> </xsl:if>
- </div>
- </xsl:template>
- <xsl:template match="[EMAIL PROTECTED] and @type='span']">
- <span class="[EMAIL PROTECTED]">
- <xsl:apply-templates/>
- <xsl:if test="@nbsp='true'"> </xsl:if>
- </span>
- </xsl:template>
- <xsl:template match="[EMAIL PROTECTED] and @type='span']">
- <span id="[EMAIL PROTECTED]">
- <xsl:apply-templates/>
- <xsl:if test="@nbsp='true'"> </xsl:if>
- </span>
+
+ <xsl:template name="attributes">
+ <xsl:if test="@name">
+ <xsl:attribute name="id">
+ <xsl:value-of select="@name" />
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:if test="@class">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@class" />
+ </xsl:attribute>
+ </xsl:if>
</xsl:template>
+
<xsl:template match="@*|*|text()|processing-instruction()|comment()">
<xsl:copy>
<xsl:apply-templates