[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Preserving output formatting after XSL transformation
I'm wondering how to preserve the formatting of my transformed HTML output text.... instead of text appearing like so: <table> <tr> <td> .... I would like it to appear like this instead: <table> <tr> <td> ... Attached is a copy of my XSL document, and a sample piece of XML code. Any help, advice or links would be greatly appreciated! -=Tek Boy=- ***************************************************************** <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:space="preserve"> <xsl:output method="html" version="3.2" indent="yes"/> <xsl:template match="PROMOTIONS"> <xsl:for-each select="PROMOTION[position() mod 3 = 1]" > <center> <table cellpadding="5" cellspacing="5" border="1"> <tr> <xsl:for-each select="self::PROMOTION | following-sibling::PROMOTION[position() < 3]"> <td><img> <xsl:attribute name="src"><xsl:value-of select="IMAGE_URL"/></xsl:attribute> <xsl:attribute name="border">0</xsl:attribute> </img></td> </xsl:for-each> </tr> </table> </center> </xsl:for-each> </xsl:template> </xsl:stylesheet> ***************************************************************** <?xml version="1.0"?> <PROMOTIONS> <PROMOTION> <ID>6606</ID> <SHORT_TITLE>Buy 10 Gerber 1st Foods (2.5oz) get $1.00 off.</SHORT_TITLE> <FULL_TITLE>Buy 10, get US$ 1 discount.</FULL_TITLE> <IMAGE_URL>http://oc-dev-01/resources/issuer/promotions/images/10/1/1st_food s_1d_10_2pt5oz.gif</IMAGE_URL> </PROMOTION> <PROMOTION> <ID>6545</ID> <SHORT_TITLE>Buy 3 Ben & Jerry Ice Cream get $2.00 off</SHORT_TITLE> <FULL_TITLE>Buy 3, get US$ 2.00 discount.</FULL_TITLE> <IMAGE_URL>http://oc-dev-01/resources/issuer/promotions/images/10000/1/b3_ge t_2d.gif</IMAGE_URL> </PROMOTION> </PROMOTIONS> ***************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|