Mercurial > hg > ooxml
diff refs.xsl @ 24:87e0d620deea
switch to elements from attributes and default namespace
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Thu, 06 Apr 2017 17:24:30 +0100 |
parents | bfa38afaea63 |
children | a5125a2e77ea |
line wrap: on
line diff
--- a/refs.xsl Thu Apr 06 16:47:53 2017 +0100 +++ b/refs.xsl Thu Apr 06 17:24:30 2017 +0100 @@ -10,7 +10,7 @@ <xsl:template match="s:c[s:f]"> <xsl:variable name="tokens" select="analyze-string(s:f/.,$pat)/xf:match/xf:group"/> - <xsl:if test="@r='B4'"><xsl:message><xsl:value-of select="$tokens/@nr"/></xsl:message> + <xsl:if test="@r='xxx'"><xsl:message><xsl:value-of select="$tokens/@nr"/></xsl:message> <xsl:message><xsl:value-of select="$tokens/."/></xsl:message> </xsl:if> <xsl:if test="$tokens[@nr=(7,8,9)]"> @@ -41,12 +41,15 @@ else $bit else ()"/> <ref c="{@r}"> - <!-- Assumes that space doesn't occur in variable names - Might occur in external names (who knows!) but I'm assuming we're - never going to split the value of @er back out... --> - <xsl:if test="count($singles)>0"><xsl:attribute name="r"><xsl:value-of select="distinct-values($singles)"/></xsl:attribute></xsl:if> - <xsl:if test="count($ranges)>0"><xsl:attribute name="rr"><xsl:value-of select="distinct-values($ranges)"/></xsl:attribute></xsl:if> - <xsl:if test="count($externals)>0"><xsl:attribute name="er"><xsl:value-of select="distinct-values($externals)"/></xsl:attribute></xsl:if> + <xsl:for-each select="$singles"> + <s><xsl:value-of select="."/></s> + </xsl:for-each> + <xsl:for-each select="$ranges"> + <r><xsl:value-of select="."/></r> + </xsl:for-each> + <xsl:for-each select="$externals"> + <e><xsl:value-of select="."/></e> + </xsl:for-each> </ref></xsl:if> </xsl:template>