[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Creating customized "itemizedlist" ...
Hello Folks, I am trying to add a parameter list, which will have a list of parameters. I added new element parlist by duplicating the existing element "itemizedlist" and I added, as it's member, an element "paritem" (duplicated the existing element "listitem"). I have created a customized the XSL in order to see these newly-added elements in the PDF. However, the "paritem" elements do no appear in the PDF, they appear as XML fragments. Do I need some more customizations in the XSL? Please advise. Thank you, Anagha -------------------------------------------------------------- Customized XSL is as following: <?xml version="1.0" encoding="UTF-8"?> <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="./docbook/xsl/fo/docbook.xsl"/> <xsl:template match="itemizedlist|parlist"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="pi-label-width"> <xsl:call-template name="pi.dbfo_label-width"/> </xsl:variable> <xsl:variable name="label-width"> <xsl:choose> <xsl:when test="$pi-label-width = ''"> <xsl:value-of select="$itemizedlist.label.width"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="$pi-label-width"/> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:if test="title"> <xsl:apply-templates select="title" mode="list.title.mode"/> </xsl:if> <!-- Preserve order of PIs and comments --> <xsl:apply-templates select="*[not(self::listitem or self::title or self::titleabbrev)] |comment()[not(preceding-sibling::listitem)] |processing-instruction()[not(preceding-sibling::listitem)]"/> <xsl:variable name="content"> <xsl:apply-templates select="listitem |comment()[preceding-sibling::listitem] |processing-instruction()[preceding-sibling::listitem]"/> </xsl:variable> <!-- nested lists don't add extra list-block spacing --> <xsl:choose> <xsl:when test="ancestor::listitem"> <fo:list-block id="{$id}" xsl:use-attribute-sets="itemizedlist.properties"> <xsl:attribute name="provisional-distance-between-starts"> <xsl:value-of select="$label-width"/> </xsl:attribute> <xsl:copy-of select="$content"/> </fo:list-block> </xsl:when> <xsl:otherwise> <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing itemizedlist.properties"> <xsl:attribute name="provisional-distance-between-starts"> <xsl:value-of select="$label-width"/> </xsl:attribute> <xsl:copy-of select="$content"/> </fo:list-block> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="listitem/*[1][local-name()='para' or local-name()='simpara' or local-name()='formalpara'] |glossdef/*[1][local-name()='para' or local-name()='simpara' or local-name()='formalpara'] |step/*[1][local-name()='para' or local-name()='simpara' or local-name()='formalpara'] |callout/*[1][local-name()='para' or local-name()='simpara' or local-name()='formalpara'] |paritem/*[1][local-name()='para' or local-name()='simpara' or local-name()='formalpara']" priority="2"> <fo:block> <xsl:call-template name="anchor"/> <xsl:apply-templates/> </fo:block> </xsl:template> </xsl:stylesheet> -------------------------------------------------------------- |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]