Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Firefox 5: The XPath function name() returns names of attributes of XHTML Elements in capital letters ??

more options

You will see the problem when you open the following file as application/xml with Firefox 5 and with Firefox 3.x:


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="#" type="application/xml"?>
<xsl:stylesheet
  xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
  xmlns:ht  = "http://www.w3.org/1999/xhtml"
  xmlns     = "http://www.w3.org/1999/xhtml"
  xmlns:po  = "hoppel"
  exclude-result-prefixes = "ht"
  version   = "1.0"
>

<xsl:output method = "xml"/>
<xsl:template match = "/">
  <html>
    <head>
      <title>Test: Attributnamen</title>
    </head>
    <body>
      <h1
	  class = "whisky"  Class = "Whisky" CLASS = "WHISKY"
	  id = "hoppel" Id = "Hoppel" ID = "HOPPEL"
	  nasenbaer = "nasenbär" Nasenbaer = "Nasenbär"
      >
	Test: Attributnamen
      </h1>
      <xsl:for-each select = "//ht:h1 | //po:h1">
	<div>
	  <h2><xsl:value-of select = "concat ('Element ', name(.))"/></h2>
	  <xsl:for-each select = "@*">
	    <p><xsl:value-of select = "concat ('Attribut ', name(.), ': ', .)"/></p>
	  </xsl:for-each>
	  <p><xsl:value-of select = "concat ('Wert ID: ', @ID)"/></p>
	  <p><xsl:value-of select = "concat ('Wert id: ', @id)"/></p>
	  <xsl:for-each select = "@*[name(.)= 'class']">
	    <p><xsl:value-of select = "concat ('Attribut class: ', name(.), ', ', .)"/></p>
	  </xsl:for-each>
	  <xsl:for-each select = "@*[name(.)= 'CLASS']">
	    <p><xsl:value-of select = "concat ('Attribut CLASS: ', name(.), ', ', .)"/></p>
	  </xsl:for-each>
	</div>
      </xsl:for-each>
    </body>
  </html>
</xsl:template>

<po:h1
    class = "whisky"  Class = "Whisky" CLASS = "WHISKY"
    id = "hoppel" Id = "Hoppel" ID = "HOPPEL"
    nasenbaer = "nasenbär" Nasenbaer = "Nasenbär"
/>

</xsl:stylesheet>
You will see the problem when you open the following file as application/xml with Firefox 5 and with Firefox 3.x: <pre><nowiki><?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="#" type="application/xml"?> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:ht = "http://www.w3.org/1999/xhtml" xmlns = "http://www.w3.org/1999/xhtml" xmlns:po = "hoppel" exclude-result-prefixes = "ht" version = "1.0" > <xsl:output method = "xml"/> <xsl:template match = "/"> <html> <head> <title>Test: Attributnamen</title> </head> <body> <h1 class = "whisky" Class = "Whisky" CLASS = "WHISKY" id = "hoppel" Id = "Hoppel" ID = "HOPPEL" nasenbaer = "nasenbär" Nasenbaer = "Nasenbär" > Test: Attributnamen </h1> <xsl:for-each select = "//ht:h1 | //po:h1"> <div> <h2><xsl:value-of select = "concat ('Element ', name(.))"/></h2> <xsl:for-each select = "@*"> <p><xsl:value-of select = "concat ('Attribut ', name(.), ': ', .)"/></p> </xsl:for-each> <p><xsl:value-of select = "concat ('Wert ID: ', @ID)"/></p> <p><xsl:value-of select = "concat ('Wert id: ', @id)"/></p> <xsl:for-each select = "@*[name(.)= 'class']"> <p><xsl:value-of select = "concat ('Attribut class: ', name(.), ', ', .)"/></p> </xsl:for-each> <xsl:for-each select = "@*[name(.)= 'CLASS']"> <p><xsl:value-of select = "concat ('Attribut CLASS: ', name(.), ', ', .)"/></p> </xsl:for-each> </div> </xsl:for-each> </body> </html> </xsl:template> <po:h1 class = "whisky" Class = "Whisky" CLASS = "WHISKY" id = "hoppel" Id = "Hoppel" ID = "HOPPEL" nasenbaer = "nasenbär" Nasenbaer = "Nasenbär" /> </xsl:stylesheet></nowiki></pre>

Geändert am von cor-el

Alle Antworten (2)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25

more options

I have posted this problem at the mozillaZine Web Development/Standards Evangelism forum. I think it is a FF5 Bug.