I'm an XSLT noob, so my apologies if there is an obvious answer to the following question. I'm working on a stylesheet. The xml to which I'd like to apply it contains links. These throw errors in the VS XML debugger and seem to keep the XML transform from happening correctly in browsers. Can someone please tell me what I'm doing wrong?
Here is the XML:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Some title</title>
<description>a link should be here</description>
</channel>
</rss>
When I replace "a link should be here" with a URL, I see the issue.
For XSLT content, anything gets the point across, such as the following from the w3schools site:
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Edited by XMLSpy® -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<tr>
<td>.</td>
<td>.</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Thanks in advance for any help.
XML is tricky.
Make sure all brackets are closed, also make sure your special characters in the URL such as & it converted into
&
I've seen xml get tricked up with URLs that have "&" in them. XML wants it to be & followed by amp; and not just &. Strict parsers will crap out when trying to parse it.
Example:
would be replaced with