r1623 - branches/bxe_2_0/xsl
[email protected] Fri, 10 Nov 2006 11:11:55 +0100 (CET)
| Newsgroups | gmane.editors.bitflux.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: chregu
Date: Fri Nov 10 11:11:54 2006
New Revision: 1623
Modified:
branches/bxe_2_0/xsl/transformxsl.xsl
Log:
less trackingnodes
Modified: branches/bxe_2_0/xsl/transformxsl.xsl
==============================================================================
--- branches/bxe_2_0/xsl/transformxsl.xsl (original)
+++ branches/bxe_2_0/xsl/transformxsl.xsl Fri Nov 10 11:11:54 2006
@@ -44,43 +44,70 @@
<xsl:apply-templates select="document(@href)/xsl:stylesheet/xsl:template"/>
</xsl:template>
- <xsl:template match="xsl:value-of[not (ancestor::xsl:attribute) and not(contains(@select,'$')) and not(contains(@select,'('))]|xsl:copy-of">
- <span> <xsl:element name="attribute" namespace="http://www.w3.org/1999/XSL/Transform">
- <xsl:attribute name="name">__bxe_id</xsl:attribute>
- <xsl:element name="value-of" namespace="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:choose>
- <xsl:when test="contains(@select, '@')"><xsl:attribute name="select"><xsl:value-of select="@select"/>/parent::*/@__bxe_id</xsl:attribute></xsl:when>
- <xsl:when test="@select"><xsl:attribute name="select"><xsl:value-of select="@select"/>/@__bxe_id</xsl:attribute></xsl:when>
- <xsl:otherwise><xsl:attribute name="select">@__bxe_id</xsl:attribute></xsl:otherwise>
- </xsl:choose>
+ <xsl:template match="xsl:value-of[ not (ancestor::xsl:attribute) and not(contains(@select,'$')) and not(contains(@select,'('))]|xsl:copy-of">
+ <xsl:choose>
+ <xsl:when test="not(../@__bxe_id)">
+ <span>
+ <xsl:element name="attribute" namespace="http://www.w3.org/1999/XSL/Transform">
+ <xsl:attribute name="name">__bxe_id</xsl:attribute>
+ <xsl:element name="value-of" namespace="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:choose>
+ <xsl:when test="contains(@select, '@')">
+ <xsl:attribute name="select">
+ <xsl:value-of select="@select"/>/parent::*/@__bxe_id</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@select">
+ <xsl:attribute name="select">
+ <xsl:value-of select="@select"/>/@__bxe_id</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="select">@__bxe_id</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:element>
</xsl:element>
- </xsl:element>
+ <xsl:call-template name="copyValueOfNode"/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="copyValueOfNode"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template name="copyValueOfNode">
<!-- attribute nodes... -->
- <xsl:if test="contains(@select, '@')">
- <xsl:element name="attribute" namespace="http://www.w3.org/1999/XSL/Transform"><xsl:attribute name="name">__bxe_attribute</xsl:attribute><xsl:value-of select="substring-after(@select,'@')"/></xsl:element>
-
-
- </xsl:if>
- <xsl:element name="copy-of" namespace="http://www.w3.org/1999/XSL/Transform"><xsl:attribute name="select"><xsl:choose>
- <xsl:when test="@select"><xsl:value-of select="@select"/>/@__bxe_defaultcontent</xsl:when>
- <xsl:otherwise>@__bxe_defaultcontent</xsl:otherwise>
- </xsl:choose></xsl:attribute></xsl:element>
-
-
-
+ <xsl:if test="contains(@select, '@')">
+ <xsl:element name="attribute" namespace="http://www.w3.org/1999/XSL/Transform">
+ <xsl:attribute name="name">__bxe_attribute</xsl:attribute>
+ <xsl:value-of select="substring-after(@select,'@')"/>
+ </xsl:element>
+
+
+ </xsl:if>
+ <xsl:element name="copy-of" namespace="http://www.w3.org/1999/XSL/Transform">
+ <xsl:attribute name="select">
+ <xsl:choose>
+ <xsl:when test="@select">
+ <xsl:value-of select="@select"/>/@__bxe_defaultcontent</xsl:when>
+ <xsl:otherwise>@__bxe_defaultcontent</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:element>
+
<xsl:copy>
<xsl:for-each select="@*">
<xsl:copy/>
</xsl:for-each>
-
-
+
+
<xsl:apply-templates/>
</xsl:copy>
-
-</span>
+
</xsl:template>
-
+
+
<xsl:template match="*[((namespace-uri() = '' and xsl:apply-templates) or
(namespace-uri()='http://www.w3.org/1999/XSL/Transform' and local-name()='element')) and not(@__bxe_id and @__bxe_id = 'none')]">
--
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs