Преглед на файлове

Using profiles for print output.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3931 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Manuel Canales Esparcia преди 21 години
родител
ревизия
1d505377b8
променени са 4 файла, в които са добавени 15 реда и са изтрити 4 реда
  1. 3 2
      Makefile
  2. 1 1
      chapter01/changelog.xml
  3. 2 1
      stylesheets/lfs-print.xsl
  4. 9 0
      stylesheets/lfs-profile.xsl

+ 3 - 2
Makefile

@@ -34,8 +34,9 @@ pdf:
 	fop.sh lfs.fo $(PDF_OUTPUT)
 
 print:
-	xsltproc --xinclude --nonet --output lfs-print.fo \
-	  stylesheets/lfs-print.xsl index.xml
+	xsltproc --xinclude --nonet --stringparam profile.condition print --output lfs-print.xml \
+	  stylesheets/lfs-profile.xsl index.xml
+	xsltproc --nonet --output lfs-print.fo stylesheets/lfs-print.xsl lfs-print.xml
 	sed -i -e "s/inherit/all/" lfs-print.fo
 	fop.sh lfs-print.fo $(PRINT_OUTPUT)
 

+ 1 - 1
chapter01/changelog.xml

@@ -3,7 +3,7 @@
   <!ENTITY % general-entities SYSTEM "../general.ent">
   %general-entities;
 ]>
-<sect1 id="ch-scatter-changelog">
+<sect1 id="ch-scatter-changelog" condition="no-print">
 <title>Changelog</title>
 <?dbhtml filename="changelog.html"?>
 

+ 2 - 1
stylesheets/lfs-print.xsl

@@ -36,7 +36,8 @@
   <xsl:param name="toc.indent.width" select="18"></xsl:param>
 
     <!-- Page number in Xref-->
-  <xsl:param name="insert.xref.page.number">yes</xsl:param> <xsl:template match="*" mode="page.citation">
+  <xsl:param name="insert.xref.page.number">yes</xsl:param> 
+  <xsl:template match="*" mode="page.citation">
     <xsl:param name="id" select="'???'"/>
     <fo:inline keep-together.within-line="always">
       <xsl:text>[p</xsl:text>

+ 9 - 0
stylesheets/lfs-profile.xsl

@@ -0,0 +1,9 @@
+<?xml version='1.0' encoding='ISO-8859-1'?>
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                version="1.0">
+
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/profiling/profile.xsl"/>
+
+</xsl:stylesheet>