XSLT: Transforming into non-xml content?
- by Ian Boyd
Is it possible to use XSLT to transform XML into something other than XML?
e.g. i want the final non-xml content:
<HTML>
<BODY>
<IMG src="file1.png"><BR>
<IMG src="file2.png"><BR>
...
<IMG src="filen.png"><BR>
</BODY>
</HTML>
You'll notice this document is HTML, because in HTML IMG and BR tags are forbidden from having a closing tag. This constrasts with xhtml, the reformulation of HTML using xml, where all elements are required from having a closing tag (because in xml every tag must be closed).
Is it possible, using XSLT, to generate non-xml output?
Another example of non-xml output might be:
INSERT INTO Documents (Filename) VALUES ('file1.png')
INSERT INTO Documents (Filename) VALUES ('file2.png')
...
INSERT INTO Documents (Filename) VALUES ('file3.png')
The reason i ask is that as soon as my XSLT contains an <IMG>, the stylesheet contains an error; no closing </IMG>.