Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Allow attributes (i.e. xml:id) to pass through on drop @attribute nodes

  • Loading branch information...
commit 92b18cf87546163d6d2b8976bfc52f60e3c3c72d 1 parent 80ceb35
Jamie Lentin lentinj authored

Showing 2 changed files with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 0  docs/CHANGES.txt
  2. +2 1  lib/diazo/normalize-rules.xsl
3  docs/CHANGES.txt
@@ -4,6 +4,9 @@ Changelog
4 4 1.0.2 (unreleased)
5 5 ------------------
6 6
  7 +* Allow attributes (i.e. xml:id) to pass through on drop @attribute nodes
  8 + [lentinj]
  9 +
7 10 1.0.1 (2012-05-09)
8 11 ------------------
9 12
3  lib/diazo/normalize-rules.xsl
@@ -109,9 +109,10 @@
109 109 <xsl:template match="//diazo:rules/diazo:drop[@attributes and @content]">
110 110 <xsl:variable name="attributes" select="concat(' ', normalize-space(@attributes), ' ')"/>
111 111 <xsl:variable name="content" select="@content"/>
  112 + <xsl:variable name="node_attrs" select="@*"/>
112 113 <xsl:for-each select="str:tokenize(normalize-space(@attributes), ' ')">
113 114 <xsl:element name="diazo:drop">
114   - <xsl:apply-templates select="@*"/>
  115 + <xsl:apply-templates select="$node_attrs"/>
115 116 <xsl:attribute name="content"><xsl:value-of select="$content"/><xsl:choose>
116 117 <xsl:when test="contains($attributes, ' * ')">/@*</xsl:when>
117 118 <xsl:otherwise>/@*[contains('<xsl:value-of select="$attributes"/>', concat(' ', name(), ' '))]</xsl:otherwise>

0 comments on commit 92b18cf

Please sign in to comment.
Something went wrong with that request. Please try again.