Can XSLT be used to transform XML into something other than XML?
eg. I want the final content without xml:
<Content> <image url="file1.png"> <image url="file2.png"> ... <image url="filen.png"> <EndContent>
You noticed that this document is not xml (or even html), but it has <elements> .
Is it possible using XSLT to generate non-xml output?
Another example of non-xml output might be:
<HTML> <BODY> <IMG src="file1.png"><BR> <IMG src="file2.png"><BR> ... <IMG src="filen.png"><BR> </BODY> </HTML>
You will notice that this document is HTML , because it is forbidden to have an end tag in the HTML IMG and BR tags. This is consistent with xhtml , a reformulation of HTML using xml, where all elements are required from a closing tag (because in xml each tag must be closed).
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')
I can compile any source XML, but there can be one example:
Xml source:
<DocumentStore> <Document type="image">file1.png</Document> <Document type="image">file2.png</Document> <Document type="image">filen.png</Document> </DocumentStore>
Or perhaps:
<Profiles> <User avatar="file1.png" /> <User avatar="file2.png" /> <User avatar="filen.png" /> </Profiles>
html xslt
Ian boyd
source share