|
Subject: eacutes driving me nuts From: Deirdre Saoirse Moen <deirdre@xxxxxxxxxxx> Date: Wed, 9 Jun 2004 20:57:07 -0700 |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE novel SYSTEM 'prose.dtd'
[
<!ENTITY ch03 SYSTEM "iop-chap-03.xml">
] >
<novel>
<title>Isle of Pearls</title>
<author>Deirdre Saoirse Moen</author>
&ch03;
</novel><!ENTITY % versioninfo
"version CDATA #IMPLIED
date CDATA #IMPLIED">
<!ENTITY % metainfo
"(title,subtitle?,author+,address*,wordcount?,heading*)">
<!ENTITY % content
"(par|secbreak|comment)*"><!ELEMENT novel ( %metainfo; ,chapter*)> <!ATTLIST novel %versioninfo;>
<!ELEMENT story (%metainfo;,%content;)> <!ATTLIST story %versioninfo;>
<!ELEMENT title (#PCDATA)> <!ELEMENT subtitle (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT address (#PCDATA)> <!ELEMENT wordcount (#PCDATA)> <!ELEMENT heading (#PCDATA)>
<!ELEMENT par (#PCDATA|emph)*> <!ATTLIST par indent CDATA "0">
<!ELEMENT secbreak (title?)> <!ELEMENT comment (#PCDATA)>
<!ELEMENT emph (#PCDATA|emph)*> <!ATTLIST emph style (italic|bold|underline|standard) "standard">
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:fo='http://www.w3.org/1999/XSL/Format'>
<!-- Show comments in the prose as footnotes --> <xsl:param name="comments" select="true()"/>
<xsl:template match="/">
<fo:root font-family="Courier" font-size="12pt">
<fo:layout-master-set>
<fo:simple-page-master master-name="manuscript-title">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
<fo:simple-page-master master-name="manuscript-body">
<fo:region-before extent="1.5in"/>
<fo:region-body margin-left="1in" margin-right="1in"
margin-top="1.5in" margin-bottom="1in"/>
</fo:simple-page-master>
</fo:layout-master-set><xsl:template match="address">
<fo:block text-align="start">
<xsl:value-of select="."/>
</fo:block>
</xsl:template><xsl:template match="chapter/title">
<xsl:choose>
<xsl:when test="../subtitle">
<fo:block font-weight="bold" line-height="1"
text-align="center" space-before="4in">
<xsl:value-of select="../title"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block font-weight="bold" text-align="center" space-before="4in">
<xsl:value-of select="."/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="chapter/subtitle">
<fo:block font-weight="bold" text-align="center">
<xsl:value-of select="."/>
</fo:block>
</xsl:template><xsl:template match="par">
<fo:block text-indent="0.5in">
<xsl:if test="number(@indent) > 0">
<xsl:attribute name="start-indent">
<xsl:value-of select="concat(@indent*0.5,'in')"/>
</xsl:attribute>
<xsl:attribute name="end-indent">
<xsl:value-of select="concat(@indent*0.5,'in')"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</fo:block>
</xsl:template><xsl:template match="emph[@style='italic']">
<fo:inline font-style="italic">
<xsl:apply-templates/>
</fo:inline>
</xsl:template><xsl:template match="emph[@style='bold']">
<fo:inline font-weight="bold">
<xsl:apply-templates/>
</fo:inline>
</xsl:template><xsl:template match="secbreak"> <fo:block text-align="center">#</fo:block> </xsl:template>
<xsl:template match="comment">
<xsl:if test="boolean($comments)">
<fo:footnote>
<fo:inline baseline-shift="super" font-size="smaller">
(<xsl:number level="any"/>)
</fo:inline>
<fo:footnote-body>
<fo:list-block provisional-label-separation="0pt"
provisional-distance-between-starts="36pt"
space-after.optimum="6pt">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block>(<xsl:number level="any"/>) </fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>
<xsl:apply-templates/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:if>
<!--<xsl:with-param name="fncount" select="$fncount + 1"/>-->
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Returning a string from a, Barry Lay | Thread | Re: [xsl] eacutes driving me nuts, Niclas Hedhman |
| Re: [xsl] Returning a string from a, Barry Lay | Date | Re: [xsl] eacutes driving me nuts, Niclas Hedhman |
| Month |