> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

First of all, it may be worth mentioning that this question is actually
better suited for an XSLT-related list.

Furtermore...

> I have a span tag which looks like
>
> <span style="font-family:Times;text-decoration:underline">Thank you for
> investing in our services</span>
>
> In my xsl-fo I have templates as
>       <xsl:template match="html:[EMAIL 
> PROTECTED]'text-decoration:underline']">
<snip />
>       <xsl:template
match="html:[EMAIL PROTECTED]'font-family:Times;font-size:12pt']
                           | html:[EMAIL PROTECTED]'font-size:Normalpt']">
<snip />

None of the above would be a match for the described span element. It would
help if you could provide us with a more complete picture of what you're
trying to do, but something like this may be of help:

<xsl:template match="span">
  <fo:block>
    <xsl:apply-templates select="@style">
      <xsl:with-param name="prop-string" select="@style" />
    </xsl:apply-templates>
  </fo:block>
</xsl:template>

<xsl:template match="@style">
  <xsl:param name="prop-string" select="''" />

  <xsl:choose>
    <xsl:when test="contains($prop-string,';')">
      <xsl:attribute name="{substring-before($prop-string,':')}">
        <xsl:value-of select="substring-before(substring-after(
                         $prop-string,':'),';')" />
      </xsl:attribute>
      <xsl:apply-templates select=".">
        <xsl:with-param name="prop-string"
                        select="substring-after($prop-string,';')" />
      </xsl:apply-templates>
    </xsl:when>
    <xsl:otherwise>
      <xsl:attribute name="{substring-before($prop-string,':')}">
        <xsl:value-of select="substring-after($prop-string,':')" />
      </xsl:attribute>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Hope this helps!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to