]> granicus.if.org Git - docbook-dsssl/commitdiff
Remove all references and code for obsolete olink attributes
authorBob Stayton <bobs@sagehill.net>
Fri, 26 Oct 2012 18:24:02 +0000 (18:24 +0000)
committerBob Stayton <bobs@sagehill.net>
Fri, 26 Oct 2012 18:24:02 +0000 (18:24 +0000)
@linkmode @targetdocent and @localinfo.

xsl/common/olink.xsl
xsl/fo/xref.xsl
xsl/html/param.ent
xsl/html/param.xweb
xsl/html/xref.xsl

index bfb95a45544df472d58fe5a93c33fcebe814474b..fb382f5c6cddcddf5187d8865beec133ba3d092b 100644 (file)
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
-    <xsl:when test="@targetdoc != '' or @targetptr != ''">
+    <xsl:otherwise>
       <xsl:if test="$olink.key != ''">
         <xsl:message>
           <xsl:text>Olink error: no generated text for </xsl:text>
         </xsl:message>
       </xsl:if>
       <xsl:text>????</xsl:text>
-    </xsl:when>
-    <xsl:otherwise>
-      <!-- old style olink -->
-      <xsl:call-template name="olink.outline">
-        <xsl:with-param name="outline.base.uri"
-                        select="unparsed-entity-uri(@targetdocent)"/>
-        <xsl:with-param name="localinfo" select="@localinfo"/>
-        <xsl:with-param name="return" select="'xreftext'"/>
-      </xsl:call-template>
     </xsl:otherwise>
   </xsl:choose>
 </xsl:template>
index 4406f6d58c8b38e86653cee07877a63e0a2046c6..86b50a0c6036309c55e92a9832c1cb661f06839a 100644 (file)
   <!-- olink content may be passed in from xlink olink -->
   <xsl:param name="content" select="NOTANELEMENT"/>
 
-  <xsl:variable name="localinfo" select="@localinfo"/>
-
   <xsl:choose>
     <!-- olinks resolved by stylesheet and target database -->
     <xsl:when test="@targetdoc or @targetptr or
 </xsl:template>
 
 
-<xsl:template name="olink.outline">
-  <xsl:param name="outline.base.uri"/>
-  <xsl:param name="localinfo"/>
-  <xsl:param name="return" select="href"/>
-
-  <xsl:message terminate="yes">Fatal error: olink.outline template: what is this supposed to do?</xsl:message>
-</xsl:template>
-
 <!-- ==================================================================== -->
 
 <xsl:template name="title.xref">
index 23bfb38d64d02dded746b1172445a587c92b365b..d33ac4840f57859c09e1a52116ce5edaf7612543 100644 (file)
 <!ENTITY insert.olink.page.number SYSTEM "../params/insert.olink.page.number.xml">
 <!ENTITY insert.olink.pdf.frag SYSTEM "../params/insert.olink.pdf.frag.xml">
 <!ENTITY olink.lang.fallback.sequence SYSTEM "../params/olink.lang.fallback.sequence.xml">
-<!ENTITY olink.fragid SYSTEM "../params/olink.fragid.xml">
-<!ENTITY olink.outline.ext SYSTEM "../params/olink.outline.ext.xml">
-<!ENTITY olink.pubid SYSTEM "../params/olink.pubid.xml">
-<!ENTITY olink.resolver SYSTEM "../params/olink.resolver.xml">
-<!ENTITY olink.sysid SYSTEM "../params/olink.sysid.xml">
 <!ENTITY abstract.notitle.enabled SYSTEM "../params/abstract.notitle.enabled.xml">
 <!ENTITY othercredit.like.author.enabled SYSTEM "../params/othercredit.like.author.enabled.xml">
 <!ENTITY part.autolabel SYSTEM "../params/part.autolabel.xml">
index 7a719aa96aa344160df9d718fa9807f3f718d222..ef2db9e736dfff497660434196a650e0ed28bc99 100644 (file)
@@ -217,11 +217,6 @@ $Id$
 &prefer.internal.olink;
 &link.mailto.url;
 &ulink.target;
-&olink.fragid;
-&olink.outline.ext;
-&olink.pubid;
-&olink.sysid;
-&olink.resolver;
 </reference>
 <reference xml:id="xrefs"><title>Cross References</title>
 &collect.xref.targets;
index bfc1eed633f9d18241f8a52b4232f80ab6171fba..6ba899233dc75e631a6900b8baf490437673ef30 100644 (file)
 
   <xsl:call-template name="anchor"/>
 
-  <xsl:variable name="localinfo" select="@localinfo"/>
-
   <xsl:choose>
     <!-- olinks resolved by stylesheet and target database -->
     <xsl:when test="@targetdoc or @targetptr or
 
     </xsl:when>
 
-    <!-- Or use old olink mechanism -->
     <xsl:otherwise>
-      <xsl:variable name="href">
-        <xsl:choose>
-          <xsl:when test="@linkmode">
-            <!-- use the linkmode to get the base URI, use localinfo as fragid -->
-            <xsl:variable name="modespec" select="key('id',@linkmode)"/>
-            <xsl:if test="count($modespec) != 1
-                          or local-name($modespec) != 'modespec'">
-              <xsl:message>Warning: olink linkmode pointer is wrong.</xsl:message>
-            </xsl:if>
-            <xsl:value-of select="$modespec"/>
-            <xsl:if test="@localinfo">
-              <xsl:text>#</xsl:text>
-              <xsl:value-of select="@localinfo"/>
-            </xsl:if>
-          </xsl:when>
-          <xsl:when test="@type = 'href'">
-            <xsl:call-template name="olink.outline">
-              <xsl:with-param name="outline.base.uri"
-                              select="unparsed-entity-uri(@targetdocent)"/>
-              <xsl:with-param name="localinfo" select="@localinfo"/>
-              <xsl:with-param name="return" select="'href'"/>
-            </xsl:call-template>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="$olink.resolver"/>
-            <xsl:text>?</xsl:text>
-            <xsl:value-of select="$olink.sysid"/>
-            <xsl:value-of select="unparsed-entity-uri(@targetdocent)"/>
-            <!-- XSL gives no access to the public identifier (grumble...) -->
-            <xsl:if test="@localinfo">
-              <xsl:text>&amp;</xsl:text>
-              <xsl:value-of select="$olink.fragid"/>
-              <xsl:value-of select="@localinfo"/>
-            </xsl:if>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:variable>
-    
       <xsl:choose>
-        <xsl:when test="$href != ''">
-          <a href="{$href}">
-            <xsl:apply-templates select="." mode="common.html.attributes"/>
-            <xsl:call-template name="id.attribute"/>
-            <xsl:call-template name="olink.hottext"/>
-          </a>
+        <xsl:when test="@linkmode or @targetdocent or @localinfo">
+          <!-- old olink mechanism -->
+          <xsl:message>
+            <xsl:text>ERROR: olink using obsolete attributes </xsl:text>
+            <xsl:text>@linkmode, @targetdocent, @localinfo are </xsl:text>
+            <xsl:text>not supported.</xsl:text>
+          </xsl:message>
         </xsl:when>
         <xsl:otherwise>
-          <xsl:call-template name="olink.hottext"/>
+          <xsl:message>
+            <xsl:text>ERROR: olink is missing linking attributes.</xsl:text>
+          </xsl:message>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
   <!-- no-op in HTML -->
 </xsl:template>
 
-
-<xsl:template name="olink.outline">
-  <xsl:param name="outline.base.uri"/>
-  <xsl:param name="localinfo"/>
-  <xsl:param name="return" select="href"/>
-
-  <xsl:variable name="outline-file"
-                select="concat($outline.base.uri,
-                               $olink.outline.ext)"/>
-
-  <xsl:variable name="outline" select="document($outline-file,.)/div"/>
-
-  <xsl:variable name="node-href">
-    <xsl:choose>
-      <xsl:when test="$localinfo != ''">
-        <xsl:variable name="node" select="$outline//
-                                   *[@id=$localinfo or @xml:id=$localinfo]"/>
-        <xsl:value-of select="$node/@href"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$outline/@href"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:variable name="node-xref">
-    <xsl:choose>
-      <xsl:when test="$localinfo != ''">
-        <xsl:variable name="node" select="$outline//
-                               *[@id=$localinfo or @xml:id=$localinfo]"/>
-        <xsl:copy-of select="$node/xref"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="$outline/xref"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-  <xsl:choose>
-    <xsl:when test="$return = 'href'">
-      <xsl:value-of select="$node-href"/>
-    </xsl:when>
-    <xsl:when test="$return = 'xref'">
-      <xsl:value-of select="$node-xref"/>
-    </xsl:when>
-    <xsl:otherwise>
-      <xsl:copy-of select="$node-xref"/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
 <!-- ==================================================================== -->
 
 <xsl:template name="xref.xreflabel">