Hi I’m having a problem rendering an xml file with xslt.
I cannot seem to find the correct syntax to pick up the name and link
attributes separately. Could anyone please provide any guidance. TIA Dave Xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl"
href=""test.xsl"?> <books> <book> <title
ISBN="name" >aaaaaaaaaaaaaaaaaaaaaaa</title> <title
ISBN="link" >bbbbbbbbbbbbbbbbbbbbbbbbbb</title> </book> </books> Xsl <?xml version="1.0"?> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"
encoding="UTF-8"/> <xsl:template match="/"> <html> <head><title>Books</title> </head> <body> <table width="100%" border="1"> <THEAD> <TR> <TD
width="40%"><B>Name</B></TD> <TD
width="10%"><B>Link</B></TD> </TR> </THEAD> <TBODY> <xsl:for-each
select="books/book"> <xsl:sort
select="title/@ISBN" /> <TR> <TD
width="40%"><xsl:value-of select="@name"
/></TD> <TD
width="10%"><xsl:value-of select="@link"
/></TD> </TR> </xsl:for-each> </TBODY> </table> </body> </html> </xsl:template> </xsl:stylesheet> Internal Virus Database is out-of-date. |