[Clfs-commits] [Cross-LFS]Cross-LFS Book branch, simp, updated. d10f81ab05999574cbd43463cee52478b8cad324

git git at cross-lfs.org
Sat Apr 23 15:30:14 PDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cross-LFS Book".

The branch, simp has been updated
       via  d10f81ab05999574cbd43463cee52478b8cad324 (commit)
       via  5c560cb66bc4dd2c6a845ae989932e3160d9b932 (commit)
       via  5f27dfa3b841372f217532358568797f51af11ad (commit)
      from  441840bfbf8389c3ed6367efeac46cd03bc0871f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d10f81ab05999574cbd43463cee52478b8cad324
Author: Joe Ciccone <jciccone at gmail.com>
Date:   Sat Apr 23 18:29:49 2011 -0400

    Also parse the c:install element. Currently only the c:para and c:command child elements.

diff --git a/BOOK/stylesheets/clfs-profile.xsl b/BOOK/stylesheets/clfs-profile.xsl
index 474d448..c1d67b2 100644
--- a/BOOK/stylesheets/clfs-profile.xsl
+++ b/BOOK/stylesheets/clfs-profile.xsl
@@ -181,89 +181,96 @@
 
 </xsl:text>
 
-    </xsl:element><!-- Sect1 -->
-    
-<!--
-    <xsl:for-each select="sect1">
-
-      <xsl:copy>
-
-        <xsl:attribute name="id">
-          <xsl:value-of select="concat($id, $idsuffix)" />
-        </xsl:attribute>
-
-        <xsl:processing-instruction name="dbhtml">
-          <xsl:text>filename="</xsl:text>
-          <xsl:value-of select="concat($id, $idsuffix)" />
-          <xsl:text>.html"</xsl:text>
-        </xsl:processing-instruction>
-
-        <xsl:variable name="titlesuffix">
-          <xsl:if test="contains($clfs.multilib, ',') and ($multibuild = 'true')">
-            <xsl:choose>
-              <xsl:when test="$bits = '32'">
-                <xsl:text>32Bit</xsl:text>
-              </xsl:when>
-              <xsl:when test="$bits = 'n32'">
-                <xsl:text>N32</xsl:text>
-              </xsl:when>
-              <xsl:when test="$bits = '64'">
-                <xsl:text>64Bit</xsl:text>
-              </xsl:when>
-            </xsl:choose>
-          </xsl:if>
-        </xsl:variable>
-
-        <xsl:for-each select="title">
+      <!-- c:install -> sect2: For each c:install build a sect2 section -->
+      <xsl:for-each select="c:install">
+        <xsl:element name="sect2">
+          <xsl:text>
+  </xsl:text>
           <xsl:element name="title">
-            <xsl:copy-of select="@*|node()" />
-            <xsl:if test="string-length($titlesuffix) > 0">
-              <xsl:text> - </xsl:text>
-              <xsl:value-of select="$titlesuffix"/>
-            </xsl:if>
+            <xsl:text>Installing</xsl:text>
           </xsl:element>
-        </xsl:for-each>
+          <xsl:text>
 
-        <xsl:element name="indexterm">
-          <xsl:attribute name="zone">
-            <xsl:value-of select="concat($id, $idsuffix)" />
-          </xsl:attribute>
-          <xsl:element name="primary">
-            <xsl:attribute name="sortas">
-              <xsl:text>a-</xsl:text>
-              <xsl:value-of select="title" />
-            </xsl:attribute>
-            <xsl:value-of select="title" />
-          </xsl:element>
-          <xsl:if test="string-length($titlesuffix) > 0">
-            <xsl:element name="secondary">
-              <xsl:value-of select="$titlesuffix" />
-            </xsl:element>
-          </xsl:if>
+</xsl:text>
+          <xsl:choose>
+            <xsl:when test="$bits = '32'">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
+            </xsl:when>
+            <xsl:when test="$bits = 'n32'">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
+            </xsl:when>
+            <xsl:when test="$bits = '64'">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
+            </xsl:when>
+          </xsl:choose>
+          <xsl:text>
+</xsl:text>
         </xsl:element>
+      </xsl:for-each><!-- c:install -> sect2  -->
 
-        <xsl:choose>
-          <xsl:when test="$bits = '32'">
-            <xsl:apply-templates select="@*|node()[not(self::title)]" mode="filter-bits-32" />
-          </xsl:when>
-          <xsl:when test="$bits = 'n32'">
-            <xsl:apply-templates select="@*|node()[not(self::title)]" mode="filter-bits-n32" />
-          </xsl:when>
-          <xsl:when test="$bits = '64'">
-            <xsl:apply-templates select="@*|node()[not(self::title)]" mode="filter-bits-64" />
-          </xsl:when>
-        </xsl:choose>
+      <!-- New Line x2 -->
+      <xsl:text>
 
-      </xsl:copy>
+</xsl:text>
 
-    </xsl:for-each>
--->
+    </xsl:element><!-- Sect1 -->
 
-  </xsl:template>
+  </xsl:template><!-- package-stub -->
 
   <!-- Apply the profile to the 32bit package -->
+  
+  <xsl:template match="c:para" mode="filter-bits-32">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',32,')">
+          <xsl:element name="para">
+            <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
 
-  <xsl:template match="@*|node()" mode="filter-bits-32">
+  <xsl:template match="c:install/c:command" mode="filter-bits-32">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',32,')">
+          <xsl:element name="userinput">
+            <xsl:if test="@c:nodump = 'true'">
+              <xsl:attribute name="role">
+                <xsl:text>nodump</xsl:text>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:element name="screen">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
+            </xsl:element>
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="c:literal" mode="filter-bits-32">
     <xsl:variable name="ismultilib">
       <xsl:choose>
         <xsl:when test="contains($clfs.multilib, ',')">
@@ -277,9 +284,9 @@
     <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
       <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
         <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',32,')">
-          <xsl:copy>
+          <xsl:element name="literal">
             <xsl:apply-templates select="@*|node()" mode="filter-bits-32" />
-          </xsl:copy>
+          </xsl:element>
         </xsl:if>
       </xsl:if>
     </xsl:if>
@@ -290,8 +297,30 @@
   <xsl:template match="@c:multilib" mode="filter-bits-32" />
 
   <!-- Apply the profile to the n32 package -->
+  
+  <xsl:template match="c:para" mode="filter-bits-n32">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',n32,')">
+          <xsl:element name="para">
+            <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
 
-  <xsl:template match="@*|node()" mode="filter-bits-n32">
+  <xsl:template match="c:install/c:command" mode="filter-bits-n32">
     <xsl:variable name="ismultilib">
       <xsl:choose>
         <xsl:when test="contains($clfs.multilib, ',')">
@@ -305,9 +334,38 @@
     <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
       <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
         <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',n32,')">
-          <xsl:copy>
+          <xsl:element name="userinput">
+            <xsl:if test="@c:nodump = 'true'">
+              <xsl:attribute name="role">
+                <xsl:text>nodump</xsl:text>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:element name="screen">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
+            </xsl:element>
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="c:literal" mode="filter-bits-n32">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',n32,')">
+          <xsl:element name="literal">
             <xsl:apply-templates select="@*|node()" mode="filter-bits-n32" />
-          </xsl:copy>
+          </xsl:element>
         </xsl:if>
       </xsl:if>
     </xsl:if>
@@ -318,8 +376,59 @@
   <xsl:template match="@c:multilib" mode="filter-bits-n32" />
 
   <!-- Apply the profile to the 64bit package -->
+  
+  <xsl:template match="c:para" mode="filter-bits-64">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',64,')">
+          <xsl:element name="para">
+            <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
 
-  <xsl:template match="@*|node()" mode="filter-bits-64">
+  <xsl:template match="c:install/c:command" mode="filter-bits-64">
+    <xsl:variable name="ismultilib">
+      <xsl:choose>
+        <xsl:when test="contains($clfs.multilib, ',')">
+          <xsl:text>true</xsl:text>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:text>false</xsl:text>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
+      <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
+        <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',64,')">
+          <xsl:element name="userinput">
+            <xsl:if test="@c:nodump = 'true'">
+              <xsl:attribute name="role">
+                <xsl:text>nodump</xsl:text>
+              </xsl:attribute>
+            </xsl:if>
+            <xsl:element name="screen">
+              <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
+            </xsl:element>
+          </xsl:element>
+        </xsl:if>
+      </xsl:if>
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template match="c:literal" mode="filter-bits-64">
     <xsl:variable name="ismultilib">
       <xsl:choose>
         <xsl:when test="contains($clfs.multilib, ',')">
@@ -333,9 +442,9 @@
     <xsl:if test="(string-length(@c:arch) = 0) or contains(concat(',', at c:arch,','), concat(',', $clfs.arch, ','))">
       <xsl:if test="(string-length(@c:multilib) = 0) or contains(concat(',', at c:multilib,','), concat(',', $ismultilib, ','))">
         <xsl:if test="(string-length(@c:bits) = 0) or contains(concat(',', at c:bits,','), ',64,')">
-          <xsl:copy>
+          <xsl:element name="literal">
             <xsl:apply-templates select="@*|node()" mode="filter-bits-64" />
-          </xsl:copy>
+          </xsl:element>
         </xsl:if>
       </xsl:if>
     </xsl:if>
diff --git a/BOOK/testpart.xml b/BOOK/testpart.xml
index ef2c908..dca506b 100644
--- a/BOOK/testpart.xml
+++ b/BOOK/testpart.xml
@@ -62,7 +62,6 @@
 
 </c:package>
 
-
 <c:package id="ch-system-test" c:multibuild="true">
   <c:title>TestPackage</c:title>
   <c:version>1.2.3</c:version>

commit 5c560cb66bc4dd2c6a845ae989932e3160d9b932
Author: Joe Ciccone <jciccone at gmail.com>
Date:   Sat Apr 23 17:45:35 2011 -0400

    This is the first part of the 2nd format to use as a simplification.
    This format proposes using a completely custom stylesheet. Instead
    of trying to merge together with docbook. The first attempt works it
    is just extremely problematic. This is much easier, and it is the goal
    anyway.

diff --git a/BOOK/schema/clfs/0.1/rng/clfs.rnc b/BOOK/schema/clfs/0.1/rng/clfs.rnc
index 2bb9f8a..330da63 100644
--- a/BOOK/schema/clfs/0.1/rng/clfs.rnc
+++ b/BOOK/schema/clfs/0.1/rng/clfs.rnc
@@ -12,9 +12,9 @@ include "../../../docbook/4.5/rng/docbook.rnc" {
       ((divcomponent.mix+, (refentry.class* | sect2* | simplesect*))
        | refentry.class+
        | sect2+
-         | simplesect+),
-    nav.class*
-    } | clfs.sect1.package )
+       | simplesect+),
+      nav.class*
+    } | clfs.sect.package )
 }
 
 # Extend the standard profiling attributes
@@ -23,32 +23,78 @@ local.effectivity.attrib &=
   clfs.attrib.bits,
   clfs.attrib.multilib
 
-# Custom attributes unsed in this schema
+# Profiling Attributes
 clfs.attrib.arch = attribute c:arch { text }?
 clfs.attrib.bits = attribute c:bits { text }?
 clfs.attrib.multilib = attribute c:multilib { "true" | "false" }?
-clfs.attrib.multibuild = attribute c:multibuild { "true" | "false" }
 
-# Package element to be used inside of the chapter element
-clfs.sect1.package = 
+# Inline Elements
+
+clfs.inline =
+  (clfs.inline.strong |
+   clfs.inline.dirname |
+   clfs.inline.filename |
+   clfs.inline.command |
+   text)+
+
+clfs.inline.strong = 
+  element c:strong { 
+    clfs.inline 
+  }
+clfs.inline.dirname = 
+  element c:dirname { 
+    clfs.inline 
+  }
+clfs.inline.filename =
+  element c:filename {
+    clfs.inline
+  }
+clfs.inline.command =
+  element c:command {
+    clfs.inline
+  }
+
+# Block Elements
+
+clfs.block.para =
+  element c:para {
+    clfs.inline
+  }
+  
+clfs.block.note =
+  element c:note {
+    clfs.block.para*
+  }
+
+clfs.block.command =
+  element c:command {
+    clfs.attrib.arch,
+    clfs.attrib.bits,
+    clfs.attrib.multilib,
+    attribute c:nodump {
+      "true" | "false"
+    }?,
+    (element c:literal { text } | text)+
+  }
+
+# The Package
+clfs.sect.package = 
   element c:package {
     attribute id { text },
     clfs.attrib.arch,
     clfs.attrib.bits,
     clfs.attrib.multilib,
-    clfs.attrib.multibuild,
-    sect1
-  }
-
-# Switch case to be used inside of a sect1
-clfs.sect1.switch = 
-  element c:switch {
-    element c:case {
-      clfs.attrib.arch,
-      clfs.attrib.bits,
-      clfs.attrib.multilib
-    }*,
-    element c:default {
-      empty
-    }
+    attribute c:multibuild {
+      "true" | "false"
+    },
+    
+    element c:title { text },
+    element c:version { text },
+    element c:description { clfs.inline },
+    
+    element c:install {
+      (clfs.block.para |
+       clfs.block.command |
+       clfs.block.note)+
+    }+
   }
diff --git a/BOOK/schema/clfs/0.1/rng/clfs.rng b/BOOK/schema/clfs/0.1/rng/clfs.rng
index 3696702..412901f 100644
--- a/BOOK/schema/clfs/0.1/rng/clfs.rng
+++ b/BOOK/schema/clfs/0.1/rng/clfs.rng
@@ -44,7 +44,7 @@
             <ref name="nav.class"/>
           </zeroOrMore>
         </element>
-        <ref name="clfs.sect1.package"/>
+        <ref name="clfs.sect.package"/>
       </choice>
     </define>
   </include>
@@ -54,7 +54,7 @@
     <ref name="clfs.attrib.bits"/>
     <ref name="clfs.attrib.multilib"/>
   </define>
-  <!-- Custom attributes unsed in this schema -->
+  <!-- Profiling Attributes -->
   <define name="clfs.attrib.arch">
     <optional>
       <attribute name="c:arch"/>
@@ -75,38 +75,107 @@
       </attribute>
     </optional>
   </define>
-  <define name="clfs.attrib.multibuild">
-    <attribute name="c:multibuild">
+  <!-- Inline Elements -->
+  <define name="clfs.inline">
+    <oneOrMore>
       <choice>
-        <value>true</value>
-        <value>false</value>
+        <ref name="clfs.inline.strong"/>
+        <ref name="clfs.inline.dirname"/>
+        <ref name="clfs.inline.filename"/>
+        <ref name="clfs.inline.command"/>
+        <text/>
       </choice>
-    </attribute>
+    </oneOrMore>
   </define>
-  <!-- Package element to be used inside of the chapter element -->
-  <define name="clfs.sect1.package">
-    <element name="c:package">
-      <attribute name="id"/>
+  <define name="clfs.inline.strong">
+    <element name="c:strong">
+      <ref name="clfs.inline"/>
+    </element>
+  </define>
+  <define name="clfs.inline.dirname">
+    <element name="c:dirname">
+      <ref name="clfs.inline"/>
+    </element>
+  </define>
+  <define name="clfs.inline.filename">
+    <element name="c:filename">
+      <ref name="clfs.inline"/>
+    </element>
+  </define>
+  <define name="clfs.inline.command">
+    <element name="c:command">
+      <ref name="clfs.inline"/>
+    </element>
+  </define>
+  <!-- Block Elements -->
+  <define name="clfs.block.para">
+    <element name="c:para">
+      <ref name="clfs.inline"/>
+    </element>
+  </define>
+  <define name="clfs.block.note">
+    <element name="c:note">
+      <zeroOrMore>
+        <ref name="clfs.block.para"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="clfs.block.command">
+    <element name="c:command">
       <ref name="clfs.attrib.arch"/>
       <ref name="clfs.attrib.bits"/>
       <ref name="clfs.attrib.multilib"/>
-      <ref name="clfs.attrib.multibuild"/>
-      <ref name="sect1"/>
+      <optional>
+        <attribute name="c:nodump">
+          <choice>
+            <value>true</value>
+            <value>false</value>
+          </choice>
+        </attribute>
+      </optional>
+      <oneOrMore>
+        <choice>
+          <element name="c:literal">
+            <text/>
+          </element>
+          <text/>
+        </choice>
+      </oneOrMore>
     </element>
   </define>
-  <!-- Switch case to be used inside of a sect1 -->
-  <define name="clfs.sect1.switch">
-    <element name="c:switch">
-      <zeroOrMore>
-        <element name="c:case">
-          <ref name="clfs.attrib.arch"/>
-          <ref name="clfs.attrib.bits"/>
-          <ref name="clfs.attrib.multilib"/>
-        </element>
-      </zeroOrMore>
-      <element name="c:default">
-        <empty/>
+  <!-- The Package -->
+  <define name="clfs.sect.package">
+    <element name="c:package">
+      <attribute name="id"/>
+      <ref name="clfs.attrib.arch"/>
+      <ref name="clfs.attrib.bits"/>
+      <ref name="clfs.attrib.multilib"/>
+      <attribute name="c:multibuild">
+        <choice>
+          <value>true</value>
+          <value>false</value>
+        </choice>
+      </attribute>
+      <element name="c:title">
+        <text/>
+      </element>
+      <element name="c:version">
+        <text/>
       </element>
+      <element name="c:description">
+        <ref name="clfs.inline"/>
+      </element>
+      <oneOrMore>
+        <element name="c:install">
+          <oneOrMore>
+            <choice>
+              <ref name="clfs.block.para"/>
+              <ref name="clfs.block.command"/>
+              <ref name="clfs.block.note"/>
+            </choice>
+          </oneOrMore>
+        </element>
+      </oneOrMore>
     </element>
   </define>
 </grammar>
diff --git a/BOOK/stylesheets/clfs-profile.xsl b/BOOK/stylesheets/clfs-profile.xsl
index 4a8bf8c..474d448 100644
--- a/BOOK/stylesheets/clfs-profile.xsl
+++ b/BOOK/stylesheets/clfs-profile.xsl
@@ -71,7 +71,119 @@
     <xsl:param name="idsuffix" /> <!-- Suffix to attach to the end of the ID for this perticular instance -->
     <xsl:param name="bits" /> <!-- Which bit sizes to create a package for -->
     <xsl:param name="multibuild" /> <!-- Are there multiple instances of this package? -->
+    
+    <!-- Translate the package into a sect1 -->
+    <xsl:element name="sect1">
+      
+      <!-- Set the ID of the target Sect1 -->
+      <xsl:attribute name="id">
+        <xsl:value-of select="concat($id, $idsuffix)" />
+      </xsl:attribute>  
+      
+      <!-- New Line -->
+      <xsl:text>
+</xsl:text>
+      
+      <!-- Set the Target Filename -->
+      <xsl:processing-instruction name="dbhtml">
+        <xsl:text>filename="</xsl:text>
+        <xsl:value-of select="concat($id, $idsuffix)" />
+        <xsl:text>.html"</xsl:text>
+      </xsl:processing-instruction>
+      
+      <!-- New Line x2 -->
+      <xsl:text>
+
+</xsl:text>
+      
+      <!-- Determine if the title is going to have a suffix or not -->
+      <xsl:variable name="titlesuffix">
+        <xsl:if test="contains($clfs.multilib, ',') and ($multibuild = 'true')">
+          <xsl:choose>
+            <xsl:when test="$bits = '32'">
+              <xsl:text>32Bit</xsl:text>
+            </xsl:when>
+            <xsl:when test="$bits = 'n32'">
+              <xsl:text>N32</xsl:text>
+            </xsl:when>
+            <xsl:when test="$bits = '64'">
+              <xsl:text>64Bit</xsl:text>
+            </xsl:when>
+          </xsl:choose>
+        </xsl:if>
+      </xsl:variable>
+      
+      <!-- title: Write out a new title tag -->
+      <xsl:element name="title">
+        <xsl:value-of select="c:title" />
+        <xsl:text>-</xsl:text>
+        <xsl:value-of select="c:version" />
+        <xsl:if test="string-length($titlesuffix) > 0">
+          <xsl:text> - </xsl:text>
+          <xsl:value-of select="$titlesuffix"/>
+        </xsl:if>
+      </xsl:element><!-- title -->
+
+      <!-- New Line x2 -->
+      <xsl:text>
+
+</xsl:text>
+
+      <!-- indexterm: Add the Intex Entry for this package -->
+      <xsl:element name="indexterm">
+        <xsl:attribute name="zone">
+          <xsl:value-of select="concat($id, $idsuffix)" />
+        </xsl:attribute>
+        <xsl:text>
+  </xsl:text>
+        <xsl:element name="primary">
+          <xsl:attribute name="sortas">
+            <xsl:text>a-</xsl:text>
+            <xsl:value-of select="c:title" />
+          </xsl:attribute>
+          <xsl:value-of select="c:title" />
+        </xsl:element>
+        <xsl:if test="string-length($titlesuffix) > 0">
+          <xsl:text>
+  </xsl:text>
+          <xsl:element name="secondary">
+            <xsl:value-of select="$titlesuffix" />
+          </xsl:element>
+        </xsl:if>
+        <xsl:text>
+</xsl:text>
+      </xsl:element><!-- indexterm -->
+      
+      <!-- New Line x2 -->
+      <xsl:text>
+
+</xsl:text>
+
+      <!-- sect2[role="installation"]: Add the sect2 for the package header -->
+      <xsl:element name="sect2">
+        <xsl:attribute name="role">
+          <xsl:text>installation</xsl:text>
+        </xsl:attribute>
+        <xsl:text>
+  </xsl:text>
+        <xsl:element name="title" />
+        <xsl:text>
+  </xsl:text>
+        <xsl:element name="para">
+          <xsl:copy-of select="c:description/@*|c:description/node()" />
+        </xsl:element>
+        <xsl:text>
+</xsl:text>
+      </xsl:element>
+
+      <!-- New Line x2 -->
+      <xsl:text>
+
+</xsl:text>
 
+    </xsl:element><!-- Sect1 -->
+    
+<!--
     <xsl:for-each select="sect1">
 
       <xsl:copy>
@@ -145,6 +257,7 @@
       </xsl:copy>
 
     </xsl:for-each>
+-->
 
   </xsl:template>
 
diff --git a/BOOK/testpart.xml b/BOOK/testpart.xml
index 6dc3c63..ef2c908 100644
--- a/BOOK/testpart.xml
+++ b/BOOK/testpart.xml
@@ -20,51 +20,77 @@
         <para>Testing... 1.. 2.. 3..</para>
       </sect1>
 
-      <c:package id="blah" c:multibuild="false">
-        <sect1>
-          <title><phrase>Blah</phrase></title>
+<c:package id="ch-system-bash" c:multibuild="false">
+  <c:title>Bash</c:title>
+  <c:version>4.0.1</c:version>
+  <c:description>The Bash package contains the Bourne-Again SHell.</c:description>
 
-          <para>Testing... 1.. 2.. 3..</para>
+  <c:install>
 
-          <para c:bits="32">32</para>
-          <para c:bits="n32">n32</para>
-          <para c:bits="64">64</para>
+    <c:para>Apply this patch</c:para>
 
-        </sect1>
-      </c:package>
+<c:command>patch -Np1 -i ../&bash-branch_update-patch;</c:command>
 
-      <c:package id="blarg" c:multibuild="true">
-        <sect1>
-          <title>Blarg</title>
+    <c:para>Prepare the package for compilation</c:para>
 
-          <para>Testing... 1.. 2.. 3..</para>
+<c:command>./configure -prefix=/usr -bindir=/bin \
+    -without-bash-malloc -with-installed-readline</c:command>
 
-          <para c:multilib="true" c:bits="64">This is for 64bit multilib only</para>
+    <c:para>Compile the package:</c:para>
 
-          <para c:bits="32,n32">Only 32,N32</para>
+<c:command>make</c:command>
 
-<screen c:bits="32"><userinput>echo 32bit Build</userinput></screen>
+    <c:para>To test the results, issue:
+    <c:command>make tests</c:command>.</c:para>
 
-<screen c:bits="32"><userinput>cat << "EOF"
-<literal>Another
-32bit
-Command</literal>
-EOF</userinput></screen>
+    <c:para>Install the package:</c:para>
 
-          <para c:bits="64">Only 64</para>
+<c:command>make htmldir=/usr/share/doc/bash-&bash-version; install</c:command>
 
-<screen c:bits="64"><userinput>echo 64bit Build</userinput></screen>
+    <c:para>Run the newly compiled <c:command>bash</c:command> program (replacing
+    the one that is currently being executed):</c:para>
 
-          <sect2>
-            <title>Hi There</title>
+<c:command c:nodump="true">exec /bin/bash -login +h</c:command>
 
-            <para>You should always see me</para>
+    <c:note>
+      <c:para>(note+warn) The parameters used make the <c:command>bash</c:command>
+      process an interactive login shell and continue to disable hashing so
+      that new programs are found as they become available.</c:para>
+    </c:note>
 
-            <para c:bits="32" c:multilib="true">You will only see me on multilib 32bit</para>
-          </sect2>
+  </c:install>
 
-        </sect1>
-      </c:package>
+</c:package>
+
+
+<c:package id="ch-system-test" c:multibuild="true">
+  <c:title>TestPackage</c:title>
+  <c:version>1.2.3</c:version>
+  <c:description>The <c:strong>Test</c:strong> package contains a test.</c:description>
+
+  <c:install>
+
+    <c:para>Prepare the package for compilation</c:para>
+
+<c:command c:multilib="false">./configure --prefix=/usr</c:command>
+<c:command c:multilib="true" c:bits="32">CC="gcc ${BUILD32}" ./configure --prefix=/usr</c:command>
+<c:command c:multilib="true" c:bits="n32">CC="gcc ${BUILDN32}" ./configure --prefix=/usr</c:command>
+<c:command c:multilib="true" c:bits="64">CC="gcc ${BUILD64}" ./configure --prefix=/usr</c:command>
+
+    <c:para>Compile the package:</c:para>
+
+<c:command>make</c:command>
+
+    <c:para>To test the results, issue:
+    <c:command>make tests</c:command>.</c:para>
+
+    <c:para>Install the package:</c:para>
+
+<c:command>make install</c:command>
+
+  </c:install>
+
+</c:package>
 
     </chapter>
 

commit 5f27dfa3b841372f217532358568797f51af11ad
Author: Joe Ciccone <jciccone at gmail.com>
Date:   Sat Apr 23 15:29:53 2011 -0400

    Add another test case.

diff --git a/BOOK/testpart.xml b/BOOK/testpart.xml
index f10cef9..6dc3c63 100644
--- a/BOOK/testpart.xml
+++ b/BOOK/testpart.xml
@@ -45,6 +45,12 @@
 
 <screen c:bits="32"><userinput>echo 32bit Build</userinput></screen>
 
+<screen c:bits="32"><userinput>cat << "EOF"
+<literal>Another
+32bit
+Command</literal>
+EOF</userinput></screen>
+
           <para c:bits="64">Only 64</para>
 
 <screen c:bits="64"><userinput>echo 64bit Build</userinput></screen>

-----------------------------------------------------------------------

Summary of changes:
 BOOK/schema/clfs/0.1/rng/clfs.rnc |   90 +++++++---
 BOOK/schema/clfs/0.1/rng/clfs.rng |  119 ++++++++++---
 BOOK/stylesheets/clfs-profile.xsl |  362 ++++++++++++++++++++++++++++++-------
 BOOK/testpart.xml                 |   81 ++++++---
 4 files changed, 510 insertions(+), 142 deletions(-)


hooks/post-receive
-- 
Cross-LFS Book



More information about the Clfs-commits mailing list