|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] FW: Add comment from xml source
I am trying pick up comments from xml source and having some trouble. Thanks for any help with this! Desired output <table> <tr> <th>Item</th> <th>ID</th> </tr> <tr> <td>Book1</td> <td>w001</td> </tr> <td>Book3 <font color="red">(REPLACES book10)</font></td> <td>w003</td> </tr> </table> XML source: <document> <para0 id="w001"> <title>Book1</title> <special-paragraphs> <warning><para>This is a good book</para> </warning> <hazard text-key="001"> <para>no entry here</para> <title>Book1</title> </hazard> <para></para> </special-paragraphs> </para0> <para0 id="w003"> <title>Book3</title> <!--(REPLACES book10)--> <special-paragraphs><warning><para>This is a good book.</para></warning> <hazard text-key="003"> <para>no entry here</para> <title>Book3</title></hazard> <para></para> </special-paragraphs> </para0> </document> XSL -- so far <xsl:template match="/"> <html> <body> <table> <tr> <th>Item</th> <th>ID</th> </tr> <xsl:for-each select="document/para0"> <tr> <td> <xsl:value-of select="title" /> </td> <td> <xsl:value-of select="@id" /> </td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template>
|
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








