OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Customizing chapter.titlepage


Hello,

I'd like to change the output generated by chapter.titlepage (in html/titlepage.templates.xsl) but when I include a copy of it in my customization layer, I get the following errors from xsltproc:

xsltproc --output title.html html.xsl title.xml
runtime error: file html.xsl line 17 element choose
function-available() : prefix exsl is not bound
runtime error: file html.xsl line 32 element choose
function-available() : prefix exsl is not bound
error: file title.xml
xsltRunStylesheet : run failed

I've attached the test document and customization stylesheet -- is there something else I need to do to successfully customize chapter.titlepage?

Thanks,
Ken

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";>
<book>
	<title>Book Title</title>
	<chapter id="chapterone">
		<title>Chapter Title</title>
		<sect1 id="s1">
			<title>Section One Title</title>
			<para>
				Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
			</para>
		</sect1>
	</chapter>
</book>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet 
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
 version="1.0"> 
 
<xsl:import href="http://docbook.sourceforge.net/release/xsl/1.72.0/html/docbook.xsl"/>
<xsl:output method="html" encoding="UTF-8" indent="yes"/>

<!-- from html/titlepage.templates.xsl -->
<xsl:template name="chapter.titlepage">
  <div class="titlepage">
    <xsl:variable name="recto.content">
      <xsl:call-template name="chapter.titlepage.before.recto"/>
      <xsl:call-template name="chapter.titlepage.recto"/>
    </xsl:variable>
    <xsl:variable name="recto.elements.count">
      <xsl:choose>
        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
        <xsl:otherwise>1</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
      <div><xsl:copy-of select="$recto.content"/></div>
    </xsl:if>
    <xsl:variable name="verso.content">
      <xsl:call-template name="chapter.titlepage.before.verso"/>
      <xsl:call-template name="chapter.titlepage.verso"/>
    </xsl:variable>
    <xsl:variable name="verso.elements.count">
      <xsl:choose>
        <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
        <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
          <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
        <xsl:otherwise>1</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>
    <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
      <div><xsl:copy-of select="$verso.content"/></div>
    </xsl:if>
    <xsl:call-template name="chapter.titlepage.separator"/>
  </div>
</xsl:template>

</xsl:stylesheet> 
<?xml version="1.0"?>
<!DOCTYPE catalog
	PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
	"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
	<group prefer="public" xml:base="file:///C:/DocBook/dtd/4.5/">
		<public 
			publicId="-//OASIS//DTD DocBook XML V4.5//EN"
			uri="docbookx.dtd"
		/>
	
		<system
			systemId="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd";
			uri="docbookx.dtd"
		/>
	
		<system
			systemId="docbook4.5.dtd"
			uri="docbookx.dtd"
		/>
	</group>

	<rewriteURI
		uriStartString="http://docbook.sourceforge.net/release/xsl/1.72.0/";
		rewritePrefix="file:///C:/DocBook/xsl/1.72.0/"
	/>

</catalog>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]