Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby-Nokogiri does not recognise attributes inside namespaces #1081

Closed
denisdefreyne opened this issue Apr 14, 2014 · 1 comment
Closed

Comments

@denisdefreyne
Copy link

Steps to reproduce

input = <<-XML
<foo xmlns="http://example.org">
  <bar><a href="/foo">baz</a></bar>
</foo>
XML

require 'nokogiri'
doc = ::Nokogiri::XML.fragment(input)
p doc.xpath("descendant-or-self::ex:a/@href", { 'ex' => 'http://example.org' })

Expected output

This is the output on MRI:

% ruby test.rb
[#<Nokogiri::XML::Attr:0x3ff349052644 name="href" value="/foo">]
%

Actual output

This is the output on JRuby:

% ruby test.rb
[]
%
@yokolet
Copy link
Member

yokolet commented Apr 15, 2014

Hi,
This bug has been fixed on master, Next version won't have this bug.
If the problem is still there, feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants