Move quotes around element/attribute links outside of the link itself.
authorCameron McCormack <cam@mcc.id.au>
Fri, 01 Jun 2012 09:44:52 +1000
changeset 29 c0f94921f354
parent 28 d154f3fcbf2b
child 30 74884712dfc7
Move quotes around element/attribute links outside of the link itself.
publish.xsl
--- a/publish.xsl	Sun May 27 16:13:49 2012 +1000
+++ b/publish.xsl	Fri Jun 01 09:44:52 2012 +1000
@@ -1142,11 +1142,11 @@
                               <xsl:if test='position() != 1'>, </xsl:if>
                               <xsl:choose>
                                 <xsl:when test='$defs/x:element[@name=current()]'>
-                                  <a href='{$defs/x:element[@name=current()]/@href}'>
-                                    <span class='element-name'>
-                                      <xsl:value-of select='concat("‘", ., "’")'/>
-                                    </span>
-                                  </a>
+                                  <span class='element-name'>
+                                    <xsl:text>‘</xsl:text>
+                                    <a href='{$defs/x:element[@name=current()]/@href}'><span><xsl:value-of select='.'/></span></a>
+                                    <xsl:text>’</xsl:text>
+                                  </span>
                                 </xsl:when>
                                 <xsl:otherwise>
                                   <xsl:message>Unknown name "<xsl:value-of select='.'/>" at <xsl:value-of select="concat(base-uri($category), ' line ', saxon:line-number())"/>.</xsl:message>
@@ -1410,7 +1410,11 @@
           <xsl:copy-of select='x:attribute-link(., (), true(), $attributecategory)'/>
         </xsl:for-each>
         <xsl:for-each select='$attributecategory/x:attribute'>
-          <a href="{@href}"><span class="attr-name">‘<xsl:value-of select='@name'/>’</span></a>
+          <span class="attr-name">
+            <xsl:text>‘</xsl:text>
+            <a href="{@href}"><span><xsl:value-of select='@name'/></span></a>
+            <xsl:text>’</xsl:text>
+          </span>
         </xsl:for-each>
       </xsl:perform-sort>
     </xsl:variable>
@@ -1510,14 +1514,16 @@
         <a href='data:,' style='background: red; color: white'>@@ ambiguous attribute '<xsl:value-of select='$name'/>'</a>
       </xsl:when>
       <xsl:when test='$x'>
-        <a href='{$x/@href}'>
-          <xsl:if test='$title != ""'>
-            <xsl:attribute name='title'><xsl:value-of select='$title'/></xsl:attribute>
-          </xsl:if>
-          <span class='attr-name'>
-            <xsl:value-of select='concat("‘", $name, "’")'/>
-          </span>
-        </a>
+        <span class="attr-name">
+          <xsl:text>‘</xsl:text>
+          <a href='{$x/@href}'>
+            <xsl:if test='$title != ""'>
+              <xsl:attribute name='title'><xsl:value-of select='$title'/></xsl:attribute>
+            </xsl:if>
+            <span><xsl:value-of select='$name'/></span>
+          </a>
+          <xsl:text>’</xsl:text>
+        </span>
       </xsl:when>
       <xsl:otherwise>
         <xsl:message>Unknown attribute "<xsl:value-of select='$name'/>" at <xsl:value-of select="concat(base-uri($referencing-element), ' line ', saxon:line-number())"/>.</xsl:message>
@@ -1536,11 +1542,11 @@
         <a href='data:,' style='background: red; color: white'>@@ ambiguous element '<xsl:value-of select='$name'/>'</a>
       </xsl:when>
       <xsl:when test='$element'>
-        <a href='{$element/@href}'>
-          <span class='element-name'>
-            <xsl:value-of select='concat("‘", $name, "’")'/>
-          </span>
-        </a>
+        <span class="element-name">
+          <xsl:text>‘</xsl:text>
+          <a href='{$element/@href}'><span><xsl:value-of select='$name'/></span></a>
+          <xsl:text>’</xsl:text>
+        </span>
       </xsl:when>
       <xsl:otherwise>
         <xsl:message>Unknown element "<xsl:value-of select='$name'/>" at <xsl:value-of select="concat(base-uri($referencing-element), ' line ', saxon:line-number())"/>.</xsl:message>
@@ -1572,11 +1578,15 @@
     <xsl:variable name='property' select='x:lookup-property($name)'/>
     <xsl:choose>
       <xsl:when test='$property'>
-        <a href='{$property/@href}'>
-          <span class='attr-name' title='Presentation attribute for property ‘{$name}’'>
-            <xsl:value-of select='concat("‘", $name, "’")'/>
-          </span>
-        </a>
+        <span class="attr-name">
+          <xsl:text>‘</xsl:text>
+          <a href='{$property/@href}'>
+            <span title='Presentation attribute for property ‘{$name}’'>
+              <xsl:value-of select='$name'/>
+            </span>
+          </a>
+          <xsl:text>’</xsl:text>
+        </span>
       </xsl:when>
       <xsl:otherwise>
         <xsl:message>Presentation attribute for unknown property "<xsl:value-of select='$name'/>" at <xsl:value-of select="concat(base-uri($referencing-element), ' line ', saxon:line-number())"/>.</xsl:message>
@@ -1623,11 +1633,11 @@
         <xsl:text>’</xsl:text>
       </xsl:when>
       <xsl:otherwise>
-        <a href='{$all/@href}'>
-          <span class='{if ($element) then "element-name" else "attr-name"}'>
-            <xsl:value-of select='concat("‘", $name, "’")'/>
-          </span>
-        </a>
+        <span class='{if ($element) then "element-name" else "attr-name"}'>
+          <xsl:text>‘</xsl:text>
+          <a href='{$all/@href}'><span><xsl:value-of select='$name'/></span></a>
+          <xsl:text>’</xsl:text>
+        </span>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:function>