M
Martin Welch
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">
<xslutput method="xml" encoding="utf-8" omit-xml-declaration="no"
version="1.0" />
<xsl:template match="article">
<xslrocessing-instruction name="xml-stylesheet">
<xsl:text>href='page.xslt' type='text/xsl'</xsl:text>
</xslrocessing-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
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">
<xslutput method="xml" encoding="utf-8" omit-xml-declaration="no"
version="1.0" />
<xsl:template match="article">
<xslrocessing-instruction name="xml-stylesheet">
<xsl:text>href='page.xslt' type='text/xsl'</xsl:text>
</xslrocessing-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