]> granicus.if.org Git - docbook-dsssl/commitdiff
Fourth time's a charm?
authorNorman Walsh <ndw@nwalsh.com>
Wed, 9 Apr 2008 19:40:26 +0000 (19:40 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 9 Apr 2008 19:40:26 +0000 (19:40 +0000)
docbook/relaxng/docbook/spec/Makefile
docbook/relaxng/docbook/spec/docbook.xml
docbook/relaxng/docbook/spec/fo.xsl
docbook/relaxng/docbook/spec/html.xsl

index 0b4c06d07b939710edf673f35cd575255722a0ef..acd98468e0b9b41976d56073691dee640de86c68 100644 (file)
@@ -23,7 +23,7 @@ docbook.fo: docbook.xml fo.xsl
        $(XSLT) $< $(FOSTYLE) docbook.fo $(XSLPARAM)
 
 docbook.pdf: docbook.fo
-       xep $<
+       xep -q $<
 
 elemdiff.xml: elemdiff.pl 44-50-elements.diff
        perl elemdiff.pl > $@
index f45970eddaeedbe3a0a6620153c1ad7c8bb311ba..87b2246f6b57797bb8a3672f9cc1b5905a62f0f9 100644 (file)
@@ -2,7 +2,7 @@
 <!ENTITY standard "Committee Draft">
 <!ENTITY tracker "http://sourceforge.net/tracker">
 <!ENTITY RFE "&tracker;/index.php?func=detail&amp;group_id=21935&amp;atid=384107&amp;">
-<!ENTITY root "http://www.oasis-open.org/docbook/">
+<!ENTITY root "http://docs.oasis-open.org/docbook/">
 ]>
 <article xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -18,7 +18,7 @@ $Id$
 <!-- productVersion --> <productnumber>5.0</productnumber>
 <!-- artifactType       spec; what else? :-) -->
 <!-- stage -->          <releaseinfo role="stage">cd</releaseinfo>
-<!-- revision -->       <biblioid class="pubsnumber">02</biblioid>
+<!-- revision -->       <biblioid class="pubsnumber">04</biblioid>
 <!-- language           en; see /article/@xml:lang -->
 <!-- form               xml -->
 
@@ -57,15 +57,26 @@ $Id$
 </editor>
 </authorgroup>
 
-<pubdate>2008-02-06</pubdate>
+<pubdate>2008-04-09</pubdate>
 
 <bibliomisc role="namespace">http://docbook.org/ns/docbook</bibliomisc>
 
-<bibliorelation type="replaces"
+<bibliorelation type="replaces" condition="online"
+    xlink:href="http://docbook.org/specs/docbook-5.0-spec-cd-03.html"/>
+<bibliorelation type="replaces" condition="online"
     xlink:href="http://docbook.org/specs/docbook-5.0CR7-spec-wd-01.html"/>
 
-<bibliorelation type="references"
-    xlink:href="http://www.oasis-open.org/docbook/specs/docbook-4.5-spec.html"/>
+<bibliorelation type="replaces" condition="print"
+    xlink:href="http://docbook.org/specs/docbook-5.0-spec-cd-03.html"/>
+<bibliorelation type="replaces" condition="print"
+    xlink:href="http://docbook.org/specs/docbook-5.0CR7-spec-wd-01.pdf"/>
+
+<bibliorelation type="references" condition="online"
+    xlink:href="http://docs.oasis-open.org/docbook/specs/docbook-4.5-spec.html"/>
+
+<bibliorelation type="references" condition="print"
+    xlink:href="http://docs.oasis-open.org/docbook/specs/docbook-4.5-spec.pdf"/>
+
 
 <copyright>
 <year>2001</year><year>2002</year><year>2003</year>
@@ -94,8 +105,7 @@ XML DTD, but the RELAX NG Schema is now the normative schema.</para>
 
 <legalnotice role="status">
 <para>This &standard; was
-[FIXME: URI]
-<link xlink:href="???">approved</link>
+<link xlink:href="http://lists.oasis-open.org/archives/docbook-tc/200711/msg00007.html">approved</link>
 for publication by the
 OASIS DocBook Technical Committee. It represents the
 consensus of the committee.
index 99b11595454943c427c061a976707dc1013fe04e..25d55c4f04204f3a13917ec6ce9297e54a973636 100644 (file)
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:db="http://docbook.org/ns/docbook"
+                xmlns:m="http://docbook.org/xslt/ns/mode"
+                xmlns:t="http://docbook.org/xslt/ns/template"
                xmlns:xlink="http://www.w3.org/1999/xlink"
-               exclude-result-prefixes="db xlink"
-                version="1.0">
+                xmlns:xs="http://www.w3.org/2001/XMLSchema"
+               exclude-result-prefixes="db m t xlink xs"
+                version="2.0">
 
-<xsl:import href="/projects/oasis/spectools/stylesheets/oasis-docbook-fo.xsl"/>
+<xsl:import href="/sourceforge/docbook/xsl2/base/fo/docbook.xsl"/>
 
 <xsl:param name="draft.watermark.image"
            select="'/sourceforge/docbook/xsl/images/draft.png'"/>
 
-<!-- These get evaluated before stripping! -->
-
-<xsl:variable name="tcProduct" 
-             select="//db:info/db:productname[1]"/>
-<xsl:variable name="tcProductVersion"
-             select="//db:info/db:productnumber[1]"/>
-<xsl:variable name="tcArtifactType" select="'spec'"/>
-<xsl:variable name="tcStage"
-             select="//db:info/db:releaseinfo[@role='stage'][1]"/>
-<xsl:variable name="tcRevision"
-             select="//db:info/db:biblioid[@class='pubsnumber'][1]"/>
-<xsl:variable name="tcLanguage" select="/@xml:lang"/>
-<xsl:variable name="tcForm" select="'xml'"/>
-
-<xsl:variable name="odnRoot">
-  <xsl:value-of select="$tcProduct"/>
-  <xsl:text>-</xsl:text>
-  <xsl:value-of select="$tcProductVersion"/>
-  <xsl:text>-</xsl:text>
-  <xsl:value-of select="$tcArtifactType"/>
-  <xsl:text>-</xsl:text>
-  <xsl:value-of select="$tcStage"/>
-  <xsl:text>-</xsl:text>
-  <xsl:value-of select="$tcRevision"/>
-  <xsl:if test="$tcLanguage != 'en' and $tcLanguage != ''">
+<xsl:param name="generate.toc" as="element()*">
+  <tocparam path="appendix" toc="0" title="0"/>
+  <tocparam path="article"  toc="1" title="1"/>
+</xsl:param>
+
+<xsl:param name="autolabel.elements">
+  <db:appendix format="A"/>
+  <db:chapter/>
+  <db:figure/>
+  <db:example/>
+  <db:table/>
+  <db:equation/>
+  <db:part format="I"/>
+  <db:reference format="I"/>
+  <db:preface/>
+  <db:qandadiv/>
+  <db:section format="1"/>
+  <db:refsection/>
+</xsl:param>
+
+<xsl:param name="ulink.footnotes" select="0"/>
+
+<xsl:param name="ulink.hyphenate" select="'&#xAD;'"/>
+
+<xsl:param name="section.label.includes.component.label" select="1"/>
+
+<xsl:param name="bibliography.collection" select="'bibliography.xml'"/>
+
+<xsl:param name="linenumbering" as="element()*">
+<ln path="literallayout" everyNth="0"/>
+<ln path="programlisting" everyNth="0"/>
+<ln path="programlistingco" everyNth="0"/>
+<ln path="screen" everyNth="0"/>
+<ln path="synopsis" everyNth="0"/>
+<ln path="address" everyNth="0"/>
+<ln path="epigraph/literallayout" everyNth="0"/>
+</xsl:param>
+
+<xsl:param name="profile.condition" select="'print'"/>
+
+<xsl:attribute-set name="section.title.level1.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'18pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level2.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'14pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level3.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'13pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level4.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'12pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level5.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'10pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="section.title.level6.properties" use-attribute-sets="section.title.properties">
+  <xsl:attribute name="font-size" select="'10pt'"/>
+</xsl:attribute-set>
+
+<xsl:template name="t:head-sep-rule">
+  <xsl:param name="pageclass"/>
+  <xsl:param name="sequence"/>
+  <xsl:param name="gentext-key"/>
+
+  <xsl:if test="$sequence != 'first' and $header.rule != 0">
+    <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
+    <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
+    <xsl:attribute name="border-bottom-color">black</xsl:attribute>
+  </xsl:if>
+</xsl:template>
+
+<!-- ============================================================ -->
+<!-- Wicked hack! -->
+
+<xsl:template match="db:link" mode="m:normalize">
+  <xsl:choose>
+    <xsl:when test="contains(@xlink:href,'/tracker/')">
+      <xsl:apply-templates mode="m:normalize"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:next-match/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<!-- ============================================================ -->
+
+<xsl:attribute-set name="oasis.header.properties">
+  <xsl:attribute name="color" select="'#66116D'"/>
+  <xsl:attribute name="font-family" select="'Arial, Helvetica, sans-serif'"/>
+  <xsl:attribute name="font-weight" select="'bold'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="oasis.head1.properties"
+                  use-attribute-sets="oasis.header.properties">
+  <xsl:attribute name="font-size" select="'18pt'"/>
+  <xsl:attribute name="margin-top" select="'18pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="oasis.head2.properties"
+                  use-attribute-sets="oasis.header.properties">
+  <xsl:attribute name="font-size" select="'14pt'"/>
+  <xsl:attribute name="margin-top" select="'14pt'"/>
+</xsl:attribute-set>
+
+<xsl:attribute-set name="oasis.head3.properties"
+                  use-attribute-sets="oasis.header.properties">
+  <xsl:attribute name="font-size" select="'10pt'"/>
+  <xsl:attribute name="margin-top" select="'4pt'"/>
+</xsl:attribute-set>
+
+<!-- ============================================================ -->
+
+<xsl:template match="db:article/db:info" mode="m:titlepage-mode">
+  <xsl:variable name="odnRoot">
+    <xsl:value-of select="db:productname[1]"/>
+    <xsl:text>-</xsl:text>
+    <xsl:value-of select="db:productnumber[1]"/>
+    <xsl:text>-</xsl:text>
+    <xsl:value-of select="'spec'"/>
+    <xsl:text>-</xsl:text>
+    <xsl:value-of select="db:releaseinfo[@role='stage'][1]"/>
     <xsl:text>-</xsl:text>
-    <xsl:value-of select="$tcLanguage"/>
+    <xsl:value-of select="db:biblioid[@class='pubsnumber'][1]"/>
+    <xsl:if test="ancestor::*[@xml:lang][1]
+                 and ancestor::*[@xml:lang][1]/@xml:lang != 'en'">
+      <xsl:text>-</xsl:text>
+      <xsl:value-of select="ancestor::*[@xml:lang][1]/@xml:lang"/>
+    </xsl:if>
+  </xsl:variable>
+
+  <fo:block margin-top="-0.75in">
+    <fo:external-graphic
+       src="url(http://docs.oasis-open.org/templates/OASISLogo.jpg)"
+       margin-left="-5pt"/>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="oasis.head1.properties">
+    <xsl:apply-templates select="db:title/node()"/>
+    <xsl:text> Version </xsl:text>
+    <xsl:value-of select="db:productnumber"/>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="oasis.head2.properties">
+    <xsl:value-of select="../@status"/>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="oasis.head2.properties"
+           margin-bottom="4pt">
+    <xsl:value-of select="format-date(xs:date(db:pubdate[1]),
+                                     '[D01] [MNn,*-3] [Y0001]')"/>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="oasis.head3.properties"
+           margin-top="14pt">
+    <xsl:text>Specification URIs:</xsl:text>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+           keep-together.within-column="always" 
+           keep-with-next.within-column="always">
+    <xsl:text>This Version:</xsl:text>
+  </fo:block>
+
+  <fo:block margin-left="0.3in">
+    <xsl:for-each select="('.html','.pdf','.xml')">
+      <fo:block>
+       <xsl:text>http://docs.oasis-open.org/docbook/specs/</xsl:text>
+       <xsl:value-of select="$odnRoot"/>
+       <xsl:value-of select="."/>
+      </fo:block>
+    </xsl:for-each>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+           keep-together.within-column="always" 
+           keep-with-next.within-column="always">
+    <xsl:text>Technical Committee:</xsl:text>
+  </fo:block>
+
+  <fo:block margin-left="0.3in">
+    <xsl:for-each select="db:org/db:orgdiv">
+      <fo:block>
+       <xsl:value-of select="."/>
+      </fo:block>
+    </xsl:for-each>
+  </fo:block>
+
+  <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+           keep-together.within-column="always" 
+           keep-with-next.within-column="always">
+    <xsl:text>Chair</xsl:text>
+    <xsl:if test="count(db:othercredit[@otherclass = 'chair']) &gt; 1">
+      <xsl:text>s</xsl:text>
+    </xsl:if>
+  </fo:block>
+
+  <fo:block margin-left="0.3in">
+    <xsl:for-each select="db:othercredit[@otherclass = 'chair']">
+      <fo:block>
+       <xsl:apply-templates select="db:personname"/>
+      </fo:block>
+    </xsl:for-each>
+  </fo:block>
+
+  <xsl:variable name="editors" select="db:authorgroup/db:editor|db:editor"/>
+
+  <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+           keep-together.within-column="always" 
+           keep-with-next.within-column="always">
+    <xsl:text>Editor</xsl:text>
+    <xsl:if test="count($editors) &gt; 1">
+      <xsl:text>s</xsl:text>
+    </xsl:if>
+  </fo:block>
+
+  <fo:block margin-left="0.3in">
+    <xsl:for-each select="$editors">
+      <fo:block>
+       <xsl:apply-templates select="db:personname"/>
+      </fo:block>
+    </xsl:for-each>
+  </fo:block>
+
+  <xsl:variable name="replaces" select="db:bibliorelation[@type='replaces']"/>
+  <xsl:variable name="supersedes" select="db:bibliorelation[@othertype='supersedes']"/>
+  <xsl:variable name="related" select="db:bibliorelation[@type='references']"/>
+
+  <xsl:if test="$replaces | $supersedes | $related">
+    <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+             keep-together.within-column="always" 
+             keep-with-next.within-column="always">
+         <xsl:text>Related Work:</xsl:text>
+    </fo:block>
+
+    <fo:block margin-left="0.3in">
+      <xsl:if test="$replaces|$supersedes">
+       <fo:block xsl:use-attribute-sets="list.item.spacing"  
+                 keep-together.within-column="always" 
+                 keep-with-next.within-column="always"
+                 font-weight="bold" font-family="Arial, Helvetica, sans-serif">
+         <xsl:text>This specification replaces or supersedes:</xsl:text>
+       </fo:block>
+       <fo:block margin-left="0.3in">
+         <xsl:for-each select="$replaces|$supersedes">
+           <fo:block>
+             <xsl:value-of select="@xlink:href"/>
+           </fo:block>
+         </xsl:for-each>
+       </fo:block>
+      </xsl:if>
+
+      <xsl:if test="$related">
+       <fo:block xsl:use-attribute-sets="list.item.spacing"  
+                 keep-together.within-column="always" 
+                 keep-with-next.within-column="always"
+                 font-weight="bold" font-family="Arial, Helvetica, sans-serif">
+         <xsl:text>This specification is related to:</xsl:text>
+       </fo:block>
+       <fo:block margin-left="0.3in">
+         <xsl:for-each select="$related">
+           <fo:block>
+             <xsl:value-of select="@xlink:href"/>
+           </fo:block>
+         </xsl:for-each>
+       </fo:block>
+      </xsl:if>
+    </fo:block>
   </xsl:if>
-</xsl:variable>
 
-<xsl:template match="productname" mode="titlepage.mode">
-  <xsl:variable name="pn" select="../productnumber[1]"/>
+  <xsl:if test="db:bibliomisc[@role='namespace']">
+      <fo:block xsl:use-attribute-sets="list.item.spacing oasis.head3.properties"
+               keep-together.within-column="always" 
+               keep-with-next.within-column="always">
+       <xsl:text>Declared XML Namespace</xsl:text>
+       <xsl:if test="count(db:bibliomisc[@role='namespace']) &gt; 1">s</xsl:if>
+      </fo:block>
+
+      <fo:block margin-left="0.3in">
+       <xsl:for-each select="db:bibliomisc[@role='namespace']">
+         <fo:block>
+           <xsl:value-of select="."/>
+         </fo:block>
+       </xsl:for-each>
+      </fo:block>
+  </xsl:if>
 
   <fo:block>
-    <fo:block font-family="{$title.font.family}"
-              space-before="0.5em">Document identifier:</fo:block>
-    <fo:block margin-left="2em">
-      <xsl:value-of select="$odnRoot"/>
+    <fo:block xsl:use-attribute-sets="oasis.head3.properties" margin-top="14pt"
+             keep-with-next.within-column="always">
+      <xsl:text>Abstract:</xsl:text>
+    </fo:block>
+    <fo:block margin-left="0.3in" font-family="Arial, Helvetica, sans-serif">
+      <xsl:apply-templates select="db:abstract"/>
     </fo:block>
   </fo:block>
-</xsl:template>
 
-<xsl:template match="legalnotice[@role='status']" mode="titlepage.mode">
   <fo:block>
-    <fo:block font-family="{$title.font.family}"
-              space-before="0.5em">
+    <fo:block xsl:use-attribute-sets="oasis.head3.properties" margin-top="14pt"
+             keep-with-next.within-column="always">
       <xsl:text>Status:</xsl:text>
     </fo:block>
-    <fo:block margin-left="2em">
-      <xsl:apply-templates mode="titlepage.mode"/>
+    <fo:block margin-left="0.3in" font-family="Arial, Helvetica, sans-serif">
+      <xsl:apply-templates select="db:legalnotice[@role='status']"/>
     </fo:block>
   </fo:block>
-</xsl:template>
-
-<xsl:template match="pubdate" mode="titlepage.mode">
-  <fo:block keep-with-next="always"
-            font-size="18pt"
-            space-before="10pt"
-            space-after="8pt"
-            font-weight="bold"
-            font-family="{$title.font.family}">
-    <xsl:choose>
-      <xsl:when test="/*/@status">
-        <xsl:value-of select="/*/@status"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:text>???Unknown Status???</xsl:text>
-      </xsl:otherwise>
-    </xsl:choose>
-
-    <xsl:text>&#160;</xsl:text>
-
-    <xsl:if test="../productnumber">
-      <xsl:text>V</xsl:text>
-      <xsl:value-of select="../productnumber[1]"/>
-      <xsl:text>,&#160;</xsl:text>
-    </xsl:if>
 
-    <xsl:call-template name="datetime.format">
-      <xsl:with-param name="date" select="."/>
-      <xsl:with-param name="format" select="'d B Y'"/>
-    </xsl:call-template>
+  <fo:block>
+    <fo:block xsl:use-attribute-sets="oasis.head3.properties" margin-top="14pt"
+             keep-with-next.within-column="always">
+      <xsl:text>Notices:</xsl:text>
+    </fo:block>
+    <fo:block font-family="Arial, Helvetica, sans-serif">
+      <xsl:apply-templates select="db:legalnotice[@role='notices']"/>
+    </fo:block>
   </fo:block>
 </xsl:template>
 
+<!-- ============================================================ -->
+
 </xsl:stylesheet>
index e715857d48f0322a3eb22dd823817f1af68dbc19..fd68c168333c399a601670ade8e7f9de6c6f7474 100644 (file)
@@ -34,6 +34,8 @@
 <ln path="epigraph/literallayout" everyNth="0"/>
 </xsl:param>
 
+<xsl:param name="profile.condition" select="'online'"/>
+
 <!-- ============================================================ -->
 
 <xsl:template name="t:user-head-content">
@@ -114,16 +116,15 @@ div.toc p b {
       <h3>Specification URIs:</h3>
       <dl>
        <dt>This Version:</dt>
-       <dd>
-         <xsl:text>http://docs.oasis-open.org/docbook/specs/</xsl:text>
-         <xsl:value-of select="$odnRoot"/>
-         <xsl:text>.html</xsl:text>
-       </dd>
-       <dd>
-         <xsl:text>http://docs.oasis-open.org/docbook/specs/</xsl:text>
-         <xsl:value-of select="$odnRoot"/>
-         <xsl:text>.pdf</xsl:text>
-       </dd>
+       <xsl:for-each select="('.html','.pdf','.xml')">
+         <dd>
+           <a href="{$odnRoot}{.}">
+             <xsl:text>http://docs.oasis-open.org/docbook/specs/</xsl:text>
+             <xsl:value-of select="$odnRoot"/>
+             <xsl:value-of select="."/>
+           </a>
+         </dd>
+       </xsl:for-each>
       </dl>
     </div>
 
@@ -132,7 +133,7 @@ div.toc p b {
        <dt>Technical Committee:</dt>
        <xsl:for-each select="db:org/db:orgdiv">
          <dd>
-           <a href="@xlink:href">
+           <a href="{@xlink:href}">
              <xsl:value-of select="."/>
            </a>
          </dd>