Ticket #8504 (closed bug: invalid)
$().find() does not find tags when inserted via XSLT
| Reported by: | fatih | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.next |
| Component: | unfiled | Version: | 1.5.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
XSLT: ... <div id="xmlData">
<newdoc>
<xsl:copy-of select="."/>
</newdoc>
</div> ...
Result in the browser (for example firebug output): ... <div id="xmlData">
<newdoc>
<change name="change1" task="say hello">Comment 1</change>
</newdoc>
</div> ...
JavaScript: $xml = $('#xmlData'); $xml.find('change') ... this does NOT work! $xml.find('[name]') ... strangely DOES work! $xml.find('newdoc') ... does work too!
Using Firefox 3.6.15
Change History
comment:2 Changed 2 years ago by anonymous
Hint: If XSL Embeds XML into a document, firebug will always display it with the tag and attribute names in lower case. However, they are actually being held in mixed case as entered. So, even if firebug is showing element as <change>, if the original input was <Change>, then $().find('change') would not find it, $().find('Change') would find it!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Seems to be working for me! jQuery 1.5.1, Firefox 3.6.15