G
Geoff
Hello,
I am using Firefox 1.5.0.7 and when I display the following xml file, I get:
Alan
Turing
computer scientist
mathematician
cryptographer
Richard
P
Feynman
physicist
Playing the bongoes
The matching in the .xsl file does not seem to work. The matching should
change the first names to 'bob'. I tried it in IE6 (changed application/xsl
to text/xsl) and it worked fine. Any ideas why match does not work in
Firefox? The two files are:
~~~~~~~~~
people.xml
~~~~~~~~~
<?xml version="1.0"?>
<?xml-stylesheet type="application/xsl" href="people.xsl"?>
<people>
<person born="1912" died="1954">
<name>
<first_name>Alan</first_name>
<last_name>Turing</last_name>
</name>
<profession>computer scientist</profession>
<profession>mathematician</profession>
<profession>cryptographer</profession>
</person>
<person born="1918" died="1988">
<name>
<first_name>Richard</first_name>
<middle_initial>P</middle_initial>
<last_name>Feynman</last_name>
</name>
<profession>physicist</profession>
<hobby>Playing the bongoes</hobby>
</person>
</people>
~~~~~~~~
people.xsl
~~~~~~~~
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="first_name">Bob</xsl:template>
</xsl:stylesheet>
I am using Firefox 1.5.0.7 and when I display the following xml file, I get:
Alan
Turing
computer scientist
mathematician
cryptographer
Richard
P
Feynman
physicist
Playing the bongoes
The matching in the .xsl file does not seem to work. The matching should
change the first names to 'bob'. I tried it in IE6 (changed application/xsl
to text/xsl) and it worked fine. Any ideas why match does not work in
Firefox? The two files are:
~~~~~~~~~
people.xml
~~~~~~~~~
<?xml version="1.0"?>
<?xml-stylesheet type="application/xsl" href="people.xsl"?>
<people>
<person born="1912" died="1954">
<name>
<first_name>Alan</first_name>
<last_name>Turing</last_name>
</name>
<profession>computer scientist</profession>
<profession>mathematician</profession>
<profession>cryptographer</profession>
</person>
<person born="1918" died="1988">
<name>
<first_name>Richard</first_name>
<middle_initial>P</middle_initial>
<last_name>Feynman</last_name>
</name>
<profession>physicist</profession>
<hobby>Playing the bongoes</hobby>
</person>
</people>
~~~~~~~~
people.xsl
~~~~~~~~
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="first_name">Bob</xsl:template>
</xsl:stylesheet>