|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xslt a mixed html and xml file
Hi Given this XML (which is a mixture of standard HTML tags and custom tags)...: <?xml version="1.0" encoding="utf-8"?> <table> <tr> <td>bla bla bla</td> <td> <link> <innerHTML>One</innerHTML> <href>http://somewhere.com/</href> </link> </td> </tr> </table> ... I want to apply a style sheet that outputs the HTML as it is but also applies templates to the custom bits. Obviously, without the custom bits the style sheet would be: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:template match="/"> <xsl:copy-of select="*" /> <!-- "*" or "."? --> </xsl:template> ...but I need to add in this WITHOUT changing the XML: <xsl:template match="link"> <a href="<xsl:value-of select="href" />"> <xsl:value-of select="innerHTML" /> </a> </xsl:template> Hoping there's a simple and elegant solution, Stephen
|
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








