|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] newbie Q: how to format xml: <p>normal <b>bold</b> nor
Hi, I've been looking through the archives and I couldn't see anything that matches this question. Excuse me if this is a repeat. Heres my xml: <article> <body> <module> <mbody> <p>some normal text <b>the bold text</b> back to normal </p> <p>some more normal text <b>the bold text</b> back to normal <b>and bold again</b></p> </mbody> </module> </body> </article> heres the xsl: ... <xsl:template match = "/" > <xsl:for-each select="article/body/module"> <!-- mbody p--> <xsl:for-each select="mbody/p"> <xsl:apply-templates select = "//p" /> <xsl:apply-templates select = "//b"/> </xsl:for-each> </xsl:for-each> </xsl:template> <xsl:template match = "p" > <xsl:value-of select = "." /> </xsl:template> <xsl:template match = "b" > <b> <xsl:value-of select = "." /></b> </xsl:template> ... and the xhtml I want should be: ... <p>some normal text <b>the bold text</b> back to normal </p> <p>some more normal text <b>the bold text</b> back to normal <b>and bold again</b></p> instead it displays the p tag then goes and does the b tag at the end. Any guidance on this matter would be most appreciated. ed ed eustace ed.eustace@xxxxxxxxxxxxxxxxx openDemocracy.net 23 - 25 Gt Sutton Street London EC1V 0DN tel: +44 (0) 20 7608 2000 fax: +44 (0) 20 7608 2666
|
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
|

Cart








