XHTML+XSL --> XSL
I have created a fairly simple stylesheet that converts XHTML code into an XSL that, when used with any XML document, gives back the original XHTML code.
You may say: This is useless.
And you are absolutely right.
Let's go for an example:
<!-- source1.html --> <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <head> <title>Some title with weird entities like éî</title> </head> <body> </body> </html>
Well, it does not work, as the xsl:* tags are not recognized as being part of XHTML.
I can act on the HTML file header. The only part that must remain constant is from the <html> tag to the </html> tag.
If I take the <!DOCTYPE ...> out of the document, if I do not have weird entities somewhere in the document, it works nicely. But if I have entities not XML standard, it does not work.
Maybe this is not the rightplace to ask. If so, please tell me so.
Thank you very much.
Antonio Fiol Bonnín
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
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