[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: sorting bibliography by authors
Hi, Deepak. Try these templates. For HTML processing: <xsl:template match="bibliography"> <div class="{name(.)}"> <xsl:if test="$generate.id.attributes != 0"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> </xsl:if> <xsl:call-template name="bibliography.titlepage"/> <xsl:apply-templates> <xsl:sort select=".//surname"/> </xsl:apply-templates> <xsl:if test="not(parent::article)"> <xsl:call-template name="process.footnotes"/> </xsl:if> </div> </xsl:template> For FO: <xsl:template match="bibliography"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:choose> <xsl:when test="not(parent::*) or parent::part or parent::book"> <xsl:variable name="master-reference"> <xsl:call-template name="select.pagemaster"/> </xsl:variable> <fo:page-sequence hyphenate="{$hyphenate}" master-reference="{$master-reference}"> <xsl:attribute name="language"> <xsl:call-template name="l10n.language"/> </xsl:attribute> <xsl:attribute name="format"> <xsl:call-template name="page.number.format"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:call-template> </xsl:attribute> <xsl:attribute name="initial-page-number"> <xsl:call-template name="initial.page.number"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:call-template> </xsl:attribute> <xsl:attribute name="force-page-count"> <xsl:call-template name="force.page.count"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:call-template> </xsl:attribute> <xsl:attribute name="hyphenation-character"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'hyphenation-character'"/> </xsl:call-template> </xsl:attribute> <xsl:attribute name="hyphenation-push-character-count"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'hyphenation-push-character-count'"/> </xsl:call-template> </xsl:attribute> <xsl:attribute name="hyphenation-remain-character-count"> <xsl:call-template name="gentext"> <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/> </xsl:call-template> </xsl:attribute> <xsl:apply-templates select="." mode="running.head.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <xsl:apply-templates select="." mode="running.foot.mode"> <xsl:with-param name="master-reference" select="$master-reference"/> </xsl:apply-templates> <fo:flow flow-name="xsl-region-body"> <fo:block id="{$id}"> <xsl:call-template name="bibliography.titlepage"/> </fo:block> <xsl:apply-templates/> </fo:flow> </fo:page-sequence> </xsl:when> <xsl:otherwise> <fo:block id="{$id}" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em"> <xsl:call-template name="bibliography.titlepage"/> </fo:block> <xsl:apply-templates> <xsl:sort select=".//surname"/> </xsl:apply-templates> </xsl:otherwise> </xsl:choose> </xsl:template> # BTW, is there any way to define `advice' (in elisp sense) in XSLT? -- Yoshihiro Toda yoshihiro_toda@mac.com __________________________________ Do You Yahoo!? Upgrade Your Life http://bb.yahoo.co.jp/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]