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

[bug]xml declaration "standalone" is missing with JRuby #2937

Open
ccvs1993 opened this issue Jul 27, 2023 · 1 comment
Open

[bug]xml declaration "standalone" is missing with JRuby #2937

ccvs1993 opened this issue Jul 27, 2023 · 1 comment

Comments

@ccvs1993
Copy link

Please describe the bug

xml declaration "standalone" is missing with JRuby.

Help us reproduce what you're seeing

Here is sample code:

require 'nokogiri'

xml = Nokogiri::XML('<?xml version = "1.0" encoding = "UTF-8" standalone ="no"?>')
puts xml

Expected behavior

The output should be

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

And I can also see this output with CRuby.

However, I got output with JRuby:

<?xml version="1.0" encoding="UTF-8"?>

Environment

jruby 9.4.3.0 (3.1.4) 2023-06-07 3086960792 OpenJDK 64-Bit Server VM 25.352-b08 on 1.8.0_352-8u352-ga-1~18.04-b08 +jit [x86_64-linux]
Nokogiri version: nokogiri-1.15.3-java

@ccvs1993 ccvs1993 added the state/needs-triage Inbox for non-installation-related bug reports or help requests label Jul 27, 2023
@flavorjones flavorjones added platform/jruby and removed state/needs-triage Inbox for non-installation-related bug reports or help requests labels Aug 3, 2023
@flavorjones
Copy link
Member

@ccvs1993 Thank you for reporting this! After a brief investigation, I've confirmed that the standalone attribute is simply missing from the JRuby implementation's declaration serialization. It shouldn't be hard to fix, and I'll schedule some time to look into it.

@flavorjones flavorjones added this to the v1.16.0 milestone Aug 3, 2023
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

2 participants