Цей вебсайт матиме обмежену функціональність, доки ми проводимо його обслуговування для поліпшення роботи. Якщо прочитана стаття не розв'язала вашу проблему і ви хочете поставити питання, наша спільнота підтримки з радістю допоможе вам на @FirefoxSupport у Twitter та /r/firefox на Reddit.

Шукати в статтях підтримки

Остерігайтеся нападів зловмисників. Mozilla ніколи не просить вас зателефонувати, надіслати номер телефону у повідомленні або поділитися з кимось особистими даними. Будь ласка, повідомте про підозрілі дії за допомогою меню “Повідомити про зловживання”

Докладніше

Ця тема перенесена в архів. Якщо вам потрібна допомога, запитайте.

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

  • 2 відповіді
  • 3 мають цю проблему
  • 4 перегляди
  • Остання відповідь від Herbert Schiemann

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>

Змінено cor-el

Усі відповіді (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.