8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
When parsing and then serializing an XML document with a DTD internal subset containing an ATTLIST, the "<!ATTLIST" part is missing. See this example:
require 'rexml' xml_string = %{ <!DOCTYPE elem [ <!ELEMENT elem EMPTY> <!ATTLIST elem attr CDATA #REQUIRED> ]> <elem attr="value"/> } xml_document = REXML::Document.new(xml_string) puts xml_document.to_s # Outputs: # <!DOCTYPE elem [ # <!ELEMENT elem EMPTY> # elem attr CDATA #REQUIRED> # ]><elem attr='value'/>
Tried with REXML 3.4.0 on Ruby 3.3.6
The text was updated successfully, but these errors were encountered:
Thanks for your report, There seems to be a problem with rexml 3.2.7 and later. I will investigate.
$ gem install rexml -v 3.2.6 $ ruby -r rexml -e 'puts REXML::Document.new("<!DOCTYPE elem [<!ATTLIST elem attr CDATA #REQUIRED>]>")' <!DOCTYPE elem [ <!ATTLIST elem attr CDATA #REQUIRED> ]>
$ gem install rexml -v 3.2.7 $ ruby -r rexml -e 'puts REXML::Document.new("<!DOCTYPE elem [<!ATTLIST elem attr CDATA #REQUIRED>]>")' <!DOCTYPE elem [ elem attr CDATA #REQUIRED> ]>
Sorry, something went wrong.
Ah, good find! I made a PR for this that you're free to merge if you want
Merge branch 'master' into bugfix/ruby#233-serialization-of-attlist-i…
3608fb1
…s-incorrect
107e273
Successfully merging a pull request may close this issue.
When parsing and then serializing an XML document with a DTD internal subset containing an ATTLIST, the "<!ATTLIST" part is missing. See this example:
Tried with REXML 3.4.0 on Ruby 3.3.6
The text was updated successfully, but these errors were encountered: