Re: Re: [xsl] a newbie struggling

Subject: Re: Re: [xsl] a newbie struggling
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Tue, 30 Apr 2002 00:28:25 -0700
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 29 April 2002 21:59, pandianoliver@xxxxxxxxxxxx wrote:
> I am converting the xml/xslt document to pdf using fop.  
>
> >> How can I go through the document and replace subscript with the tag
> >> <sub>value</sub> to the actual subscript?
> >
> >What does this mean?  
>
> ex: in the xml document I have the tag 5<sup>2</sup>.  with the xslt
> transformation, I would like to see 5 tothepowerof 2.  Hope this makes
> sense...

I don't know much about XSL/FO, but I think you want to use a template that 
matches the "<sup>" element:

<xsl:template match="sup">
  <fo:inline baseline-shift="super" font-size=".75em">
    <xsl:apply-templates/>
  </xsl:fo>
</xsl:template>

Whenever you apply-templates on a <sup> element, that template will output a 
<fo:inline> element (replace this with whatever fo tag you want, I'm probably 
wrong), and then it apply-templates to the *children* of the <sup> element.  
If <sup> contains the text "value", the effect will be that it outputs 
<fo:inline ...>value</fo:inline>

Hope that helps!

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8zkeZNSZCJx7tYycRAvz+AKCj6e3fS+UJ3lH44rXEJfF2DSKZrQCdFB//
um/TVZvzYIFYcqdwD5riGd8=
=/Cfc
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread