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

XML Namespace improvements #11072

Merged

Conversation

Blacksmoke16
Copy link
Member

Resolves #11037.

  • Improves test coverage XML::Node namespace methods
  • Adds method to get namespaces explicitly declared on a node
  • Leverage the pre-existing #each_namespace within #namespace_scopes.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few suggestions to improve code quality. Apart from that, this looks good.

src/xml/node.cr Outdated Show resolved Hide resolved
spec/std/xml/xml_spec.cr Outdated Show resolved Hide resolved
spec/std/xml/xml_spec.cr Outdated Show resolved Hide resolved
Comment on lines 338 to 339
"xmlns" => "http://www.w3.org/2005/Atom",
"xmlns:openSearch": "http://a9.com/-/spec/opensearchrss/1.0/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this hyprid literal even compile? 🕵️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh interesting. Apparently it was like that before too 🤔.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Blacksmoke16 🙏

@straight-shoota straight-shoota added this to the 1.2.0 milestone Aug 9, 2021
@straight-shoota straight-shoota merged commit 8b82c43 into crystal-lang:master Aug 11, 2021
@Blacksmoke16 Blacksmoke16 deleted the namespace-definitions branch October 8, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Access namespaces defined explicitly on a given XML::Node
3 participants