forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Leeds <cle...@medata.com>
Subject Re: OOo Problem with sub-level Headings
Date Wed, 06 Oct 2004 16:00:33 GMT
On Oct 5, 2004, at 12:46 PM, Clay Leeds wrote:
> I would change the following section:
>
>   <xsl:template match="text:h[@text:level]">
>     <xsl:variable name="level" select="@text:level"/>
>     <xsl:call-template name="createSection">
>       <xsl:with-param name="currentLevel" select="$level"/>
>       <xsl:with-param name="prevLevel" 
> select="preceding-sibling::text:h[@text:level &lt; 
> $level][1]/@text:level "/>
>     </xsl:call-template>
>   </xsl:template>
>
> to something like this:

I couldn't sleep last night as my mind went back over (of all things!) 
this e-mail... I had an incorrect contains(string1, string2) function, 
the proper XSL/XPATH should be:

    <xsl:template match="text:h[@text:level] || text:p
@text:style-name[contains(.,"Heading")]">
      <xsl:variable name="level" select="@text:level"/>
      <xsl:call-template name="createSection">
        <xsl:with-param name="currentLevel" select="$level"/>
        <xsl:with-param name="prevLevel"
select="preceding-sibling::text:h[@text:level <
$level][1]/@text:level "/>
      </xsl:call-template>
    </xsl:template>

Web Maestro Clay
-- 
Clay Leeds - <cleeds@medata.com>
Webmaster/Developer - Medata, Inc. - <http://www.medata.com/>
PGP Public Key: <https://mail.medata.com/pgp/cleeds.asc>


Mime
View raw message