Index: LFS/lfs.xsl
===================================================================
--- LFS/lfs.xsl	(revision aafcfa9fbd65ab565980440c1b43456490573bb7)
+++ LFS/lfs.xsl	(revision 1f104959e2f31621d102343d34c61893d4824ef5)
@@ -9,4 +9,7 @@
 
 <!-- XSLT stylesheet to create shell scripts from LFS books. -->
+
+    <!-- Including common extensions templates -->
+  <xsl:include href="../XSL/user.xsl"/>
 
 <!-- ####################### PARAMETERS ################################### -->
@@ -49,98 +52,4 @@
 <!-- ########### NAMED USER TEMPLATES TO ALLOW CUSTOMIZATIONS ############## -->
 <!-- ############ Maybe should be placed on a separate file ################ -->
-
-    <!-- Hock for user header additions -->
-  <xsl:template name="user_header">
-    <xsl:text>&#xA;</xsl:text>
-  </xsl:template>
-
-
-    <!-- Hock for user envars or extra commands after unpacking the tarball
-         but before cd into the sources dir -->
-  <xsl:template name="user_pre_commands">
-    <xsl:text>&#xA;</xsl:text>
-  </xsl:template>
-
-
-    <!-- Hock for user footer additions before remove sources dir -->
-  <xsl:template name="user_footer">
-    <xsl:text>&#xA;</xsl:text>
-  </xsl:template>
-
-
-    <!-- Hock for inserting scripts before a selected one -->
-  <xsl:template name="insert_script_before">
-      <!-- Inherited values -->
-    <xsl:param name="reference" select="foo"/>
-    <xsl:param name="order" select="foo"/>
-      <!-- Added a string to be sure that this scripts are run
-           before the selected one -->
-    <xsl:variable name="insert_order" select="concat($order,'_0')"/>
-      <!-- Add an xsl:if block for each referenced sect1 you want
-           to insert scripts before -->
-    <xsl:if test="$reference = 'ID_of_selected_sect1'">
-        <!-- Add an exsl:document block for each script to be inserted
-             at this point of the build. This one is only a dummy example. -->
-      <exsl:document href="{$insert_order}01-dummy" method="text">
-        <xsl:call-template name="header"/>
-        <xsl:text>
-PKG_PHASE=dummy
-PACKAGE=dummy
-VERSION=0.0.0
-TARBALL=dummy-0.0.0.tar.bz2
-        </xsl:text>
-        <xsl:call-template name="disk_usage"/>
-        <xsl:call-template name="unpack"/>
-        <xsl:text>
-cd $PKGDIR
-./configure --prefix=/usr
-make
-make check
-make install
-        </xsl:text>
-        <xsl:call-template name="disk_usage"/>
-        <xsl:call-template name="clean_sources"/>
-        <xsl:call-template name="footer"/>
-      </exsl:document>
-    </xsl:if>
-  </xsl:template>
-
-
-    <!-- Hock for inserting scripts after a selected one -->
-  <xsl:template name="insert_script_after">
-      <!-- Inherited values -->
-    <xsl:param name="reference" select="foo"/>
-    <xsl:param name="order" select="foo"/>
-      <!-- Added a string to be sure that this scripts are run
-           after the selected one -->
-    <xsl:variable name="insert_order" select="concat($order,'_z')"/>
-      <!-- Add an xsl:if block for each referenced sect1 you want
-           to insert scripts after -->
-    <xsl:if test="$reference = 'ID_of_selected_sect1'">
-        <!-- Add an exsl:document block for each script to be inserted
-             at this point of the build. This one is only a dummy example. -->
-      <exsl:document href="{$insert_order}01-dummy" method="text">
-        <xsl:call-template name="header"/>
-        <xsl:text>
-PKG_PHASE=dummy
-PACKAGE=dummy
-VERSION=0.0.0
-TARBALL=dummy-0.0.0.tar.bz2
-        </xsl:text>
-        <xsl:call-template name="disk_usage"/>
-        <xsl:call-template name="unpack"/>
-        <xsl:text>
-cd $PKGDIR
-./configure --prefix=/usr
-make
-make check
-make install
-        </xsl:text>
-        <xsl:call-template name="disk_usage"/>
-        <xsl:call-template name="clean_sources"/>
-        <xsl:call-template name="footer"/>
-      </exsl:document>
-    </xsl:if>
-  </xsl:template>
 
 
@@ -626,60 +535,4 @@
 
 
-    <!-- userinput @remap='pre' -->
-  <xsl:template match="userinput[@remap='pre']">
-    <xsl:apply-templates select="." mode="pre"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='configure' -->
-  <xsl:template match="userinput[@remap='configure']">
-    <xsl:apply-templates select="." mode="configure"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='make' -->
-  <xsl:template match="userinput[@remap='make']">
-    <xsl:apply-templates select="." mode="make"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='install' -->
-  <xsl:template match="userinput[@remap='install']">
-    <xsl:apply-templates select="." mode="install"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='adjust' -->
-  <xsl:template match="userinput[@remap='adjust']">
-    <xsl:apply-templates select="." mode="adjust"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='locale-test' -->
-  <xsl:template match="userinput[@remap='locale-test']">
-    <xsl:apply-templates select="." mode="locale-test"/>
-  </xsl:template>
-
-
-    <!-- userinput @remap='locale-full' -->
-  <xsl:template match="userinput[@remap='locale-full']">
-    <xsl:apply-templates select="." mode="locale-full"/>
-  </xsl:template>
-
-
-
-    <!-- userinput without @remap -->
-  <xsl:template match="userinput">
-    <xsl:choose>
-      <xsl:when test="ancestor::sect2[@role='configuration']">
-        <xsl:apply-templates select="." mode="configuration_section"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:apply-templates select="." mode="no_remap"/>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:template>
-
-
     <!-- replaceable -->
   <xsl:template match="replaceable">
@@ -770,63 +623,3 @@
   </xsl:template>
 
-
-    <!-- mode pre  -->
-  <xsl:template match="userinput" mode="pre">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode configure  -->
-  <xsl:template match="userinput" mode="configure">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode make  -->
-  <xsl:template match="userinput" mode="make">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode install  -->
-  <xsl:template match="userinput" mode="install">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode adjust  -->
-  <xsl:template match="userinput" mode="adjust">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode locale-test  -->
-  <xsl:template match="userinput" mode="locale-test">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode locale-full  -->
-  <xsl:template match="userinput" mode="locale-full">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode configuration_section  -->
-  <xsl:template match="userinput" mode="configuration_section">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode no_remap  -->
-  <xsl:template match="userinput" mode="no_remap">
-    <xsl:apply-templates select="." mode="default"/>
-  </xsl:template>
-
-
-    <!-- mode default  -->
-  <xsl:template match="userinput" mode="default">
-    <xsl:apply-templates/>
-  </xsl:template>
-
 </xsl:stylesheet>
