[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: a newbie struggling

Subject: Re: Re: a newbie struggling
From: Peter Davis <pdavis152@xxxxxxxxx>
Date: Tue, 30 Apr 2002 00:28:25 -0700
Re: Re:  a newbie struggling
-----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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.