[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to put space between two characters?
Hi puja, I just realized that your original question was to put space between words, while the answers (including mine) were focused on images... Anyway, although you can, there is no real need to use DOCTYPE, you simply use   (which is output to the non-braking-space equivalent) in your XSL Stylesheet to separate whatever HTML elements, like this: <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method="html" encoding="UTF-8" indent="yes" /> <xsl:template match="/run"> <html> <head> <title>Title</title> </head> <body> <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img>    <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img> </body> </html> </xsl:template> </xsl:stylesheet> Alternativley, you can use a HTML table, set the border to '0', and play with the clellspacing attribute of the <td> elements, like this: <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method="html" encoding="UTF-8" indent="yes" /> <xsl:template match="/run"> <html> <head> <title>Title</title> </head> <body> <table border="0" cellspacing="10"> <tr> <td> <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img> </td> <td> <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img> </td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet> But note that this approach gives you 10 pixels AROUND the whole image, an effect you may not wish to use. A final approach (IMO, the best) that makes use of both techniques is to use a <table> element and add another <td> element between the two <img> elements, and fill it with the amount of non-breaking spaces like this: <xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> <xsl:output method="html" encoding="UTF-8" indent="yes" /> <xsl:template match="/run"> <html> <head> <title>Title</title> </head> <body> <table border="0"> <tr> <td> <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img> </td> <td>    </td> <td> <img src="C:\Documents and Settings\psiegers\Desktop\pietsiegs.jpg"></img> </td> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet> Please let us know if this answers your questions. Cheers, Pieter <prs/> http://www.pietsieg.com http://www.pietsieg.com/dotnetnuke Contributor on www.ASPToday.com Co-author on "Professional ASP.NET XML with C#", July 2002 by Wrox Press
|
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
|