Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: newbie xsl:processing-instruction question newbie xsl:processing-instruction questionTo: NULL Date: 9/7/2007 4:08:00 PM I'm in the (very) early stages of learning xml/xsl and I've been experimenting happily with transforming xml to xhtml. I then decided to try a transform of xml to xml: ----------------- pi.xml ----------------- <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet version="1.0" type="text/xsl" href="pi.xslt"?> <article> <content>Hello World</content> </article> ------------------------------------------ ----------------- pi.xslt ---------------- <?xml version='1.0' encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no" version="1.0" /> <xsl:template match="article"> <xsl:processing-instruction name="xml-stylesheet"> <xsl:text>href='page.xslt' type='text/xsl'</xsl:text> </xsl:processing-instruction> <result> </result> </xsl:template> </xsl:stylesheet> ------------------------------------------ What I'd hoped for would be ------------------------------------------ <?xml version='1.0' encoding="utf-8" ?> <?xml-stylesheet version="1.0" type="text/xsl" href="page.xslt"?> <result /> ------------------------------------------ but I only get ------------------------------------------ <result /> ------------------------------------------ Now I don't know if this is significant but I'm using firefox 2.x on WinXP to open pi.xml and looking at the results using WebDeveloper 1.1.4 which gives me an option to view generated source. I've searched the newsgroups for two days now with no result. Could anyone give me a clue where I might be going wrong? Can anyone suggest a better (free) tool to help 'debug' my feeble attempts? Thanks Martin | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
