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

duplicated xmlns tag in v1.5.7 #865

Closed
th1988 opened this issue Mar 19, 2013 · 6 comments
Closed

duplicated xmlns tag in v1.5.7 #865

th1988 opened this issue Mar 19, 2013 · 6 comments

Comments

@th1988
Copy link

th1988 commented Mar 19, 2013

new nokogiri version 1.5.7 produces following error:

xml.ONIXmessage(:release=>"2.1",:xmlns=>"http://www.editeur.org/onix/2.1/short","xmlns:xsi".to_sym=>"http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation".to_sym=>"http://www.editeur.org/onix/2.1/short http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd") do
xml.foo "bar"
...
...
end

returns

<ONIXmessage xmlns="http://www.editeur.org/onix/2.1/short" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" release="2.1" xmlns="http://www.editeur.org/onix/2.1/short" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.editeur.org/onix/2.1/short http://www.editeur.org/onix/2.1/short/ONIX_BookProduct_Release2.1_short.xsd">

nokogiri version info:

# Nokogiri (1.5.7)
    ---
    warnings: []
    nokogiri: 1.5.7
    ruby:
      version: 2.0.0
      platform: x86_64-linux
      description: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
      engine: ruby
    libxml:
      binding: extension
      compiled: 2.7.8
      loaded: 2.7.8
@jcoyne
Copy link

jcoyne commented Mar 19, 2013

I'm also seeing this. This output is invalid according to some Java parsers, so it's breaking our integration with other systems.

@mbklein
Copy link
Contributor

mbklein commented Mar 19, 2013

Argh. That's ugly. I think I know where it's coming from; will investigate.

@jcoyne
Copy link

jcoyne commented Mar 19, 2013

This is only a bug in the c version. Works fine in jruby.

@mbklein
Copy link
Contributor

mbklein commented Mar 19, 2013

And it looks like it's only in Builder, not in parsed XML or XML built via createElement etc. I hope to have a fix within a very short timeframe.

@flavorjones
Copy link
Member

Reviewing now ...

@flavorjones
Copy link
Member

Pull request merged. Will release 1.5.8 with the fix today.

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

Successfully merging a pull request may close this issue.

4 participants