I have a xml file:
---------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="in.xsl"?>
<eventi>
<evento><id>29153</id><titolo>Invito a corte</titolo></evento>
</eventi>
---------------
the in.xsl contains:
-----------------
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output version="1.0" method="xml" encoding="iso-8859-1" indent="yes"
standalone="yes" />
<xsl:template match="/">
<milanomese>
<test>test</test>
<test>test</test>
<xsl:copy-of select="eventi/evento"/>
</milanomese>
</xsl:template>
</xsl:stylesheet>
-----------------
very simple, no?
if I open the file with a browser the xml file is trasformed ok, but the
browser doesn't include the xml declaration (<?xml version="1.0"
encoding="iso-8859-1" ?>) in the output.
I can't understand why!
as you can see I used the <xsl:output .... I think correctly.....
any idea?
hi,
Ivan
--------------------
http://www.retecivica.milano.it/
> if I open the file with a browser the xml file is trasformed ok, but the
> browser doesn't include the xml declaration (<?xml version="1.0"
> encoding="iso-8859-1" ?>) in the output.
How do you know? At least in Mozilla's DOM the XML declaration does not
show up as a node.
--
Martin Honnen
http://JavaScript.FAQTs.com/
for two reasons:
- first of all the document isn't rendered by mozilla as a xml document,
that is I see only the content of the nodes, as if it is a html document
with unknown tags...
- second if I "save page as..." I see the "correctly" transformed xml file
but without the xml declaration
bye,
Ivan
--------------------
http://www.retecivica.milano.it/
What is it that you expect to see? Since you are just using generic XML
without any stylesheets, you will only see:
testtest29153Invito a corte
Is that not what you are seeing?
> - second if I "save page as..." I see the "correctly" transformed xml file
> but without the xml declaration
Yeah, this sounds like a bug, but that will not affect rendering at all.
Would be great if you could file a bug on the XSLT component though so
that we can get it fixed.
/ Jonas
>> - second if I "save page as..." I see the "correctly" transformed xml
>> file
>> but without the xml declaration
>
>
> Yeah, this sounds like a bug, but that will not affect rendering at all.
> Would be great if you could file a bug on the XSLT component though so
> that we can get it fixed.
I have filed bug <https://bugzilla.mozilla.org/show_bug.cgi?id=344362>
on that issue.