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

Java version does not return namespace defs as attrs for ::HTML #542

Closed
gkellogg opened this issue Sep 30, 2011 · 2 comments
Closed

Java version does not return namespace defs as attrs for ::HTML #542

gkellogg opened this issue Sep 30, 2011 · 2 comments

Comments

@gkellogg
Copy link

When parsing an HTML document with namespace definitions, the definitions should show up as attributes. This doesn't happen with the jRuby/java version:

describe Nokogiri::HTML do
  describe "xmlns" do
    it "shows namespace definitions" do
      doc = Nokogiri::HTML.parse(%q(<html xmlns:dc="http://purl.org/dc/elements/1.1/"></html>))
      doc.root.namespace_definitions.should be_empty
      doc.root.attributes.should_not be_empty
    end
  end
end

Using Mac OSX Lion, jRuby 1.6.4 and nokogiri 1.5.0 java

@yokolet
Copy link
Member

yokolet commented Oct 15, 2011

Thanks for reporting the bug.

I found pure Java version just takes namesspace away from HTML document and does nothing about that later. But, the fix seems not so simple. I'm thinking how to fix this issue.

Please keep watching the issue.

@yokolet
Copy link
Member

yokolet commented Oct 28, 2011

The issue has been fixed in rev. f752ed6

If you have a chance, pleases try master branch.

@yokolet yokolet closed this as completed Oct 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants