Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

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.