Re: [xsl] Generating ODF

Subject: Re: [xsl] Generating ODF
From: Michael B Allen <mba2000@xxxxxxxxxx>
Date: Tue, 13 Mar 2007 23:59:00 -0400
On Tue, 13 Mar 2007 23:00:19 -0400
Michael B Allen <mba2000@xxxxxxxxxx> wrote:

> <text:p text:style-name="Code_20_Sample"><text:s text:c="4"/>'scope' =&gt; 'sub',</text:p>
> There several hurdles in generating this.
> 1. Every line is text:p tagged separately
> 2. Indenting is represented using text:s tags.

Well that wasn't too bad:

<xsl:template match="pre">
    <xsl:for-each select="str:tokenize(., '&#10;')">
        <xsl:variable name="norm"
        <xsl:variable name="sp-count"
        <text:p text:style-name="Code_20_Sample">
            <xsl:element name="text:s">
                <xsl:attribute name="text:c">
                    <xsl:value-of select="$sp-count"/>
            <xsl:value-of select="$norm"/>

But I'd still be interested in hearing other people's experiences
generating ODF.

Now on to tables ...


Michael B Allen
PHP Active Directory SSO

Current Thread