Skip to content

Dev#230

Merged
cfis merged 23 commits intomasterfrom
dev
Apr 8, 2026
Merged

Dev#230
cfis merged 23 commits intomasterfrom
dev

Conversation

@cfis
Copy link
Copy Markdown
Member

@cfis cfis commented Apr 8, 2026

No description provided.

cfis added 23 commits April 7, 2026 01:43
Remove the xns->next = NULL hack from rxml_xpath_object_wrap. In XPath
results, libxml2 stores the parent element pointer in xns->next (see
xmlXPathNodeSetAddNs). Zeroing it broke xmlC14NIsNodeInNodeset which
relies on that pointer to match namespace nodes in the input node set.

Instead, guard Namespace#next to detect the XPath convention by checking
whether next points to a namespace (type == XML_LOCAL_NAMESPACE).

When canonicalize receives an XPath::Object for :nodes, pass the raw
xmlNodeSet directly to xmlC14NDocDumpMemory instead of roundtripping
through Ruby objects, which dropped namespace nodes.

Enable W3C C14N spec examples 3.5 (entity references) and 3.7 (document
subsets) which were previously commented out or marked TODO.
The negative-value loop was missing the assignment, so it asserted
against the stale value (9) left by the previous loop. Also remove
a Ruby 1.8 workaround comment.
The DTD initializer required external and system to be strings,
making it impossible to create an internal DTD without public/system
identifiers. Now nil is accepted for both parameters.

Fixes #215
Remove lib/xml.rb and lib/xml/libxml.rb which were deprecated entry
points that polluted the global namespace. Use require 'libxml-ruby'
instead.

Revert require_relative back to require for loading the C extension
so RubyGems can find the .so via $LOAD_PATH when installed as a gem.

Update docs and changelog.

Fixes #226
- Update benchmark scripts to require 'libxml-ruby'
- Remove defined?(::Encoding) guard (always true on Ruby 3.2+)
- Remove stale rdoc excludes for deleted files in Rakefile and docs CI
- Remove ruby_xml_cbg.c references from Xcode project
- Ship Xcode project in gem alongside VC project
The VC project glob had the wrong extension (.vcprojx vs .vcxproj) and
wrong directory depth, so the .vcxproj was never packaged. Also exclude
the generated extconf.h so local build config doesn't leak into the gem.
@cfis cfis merged commit ef4b8eb into master Apr 8, 2026
26 checks passed
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 this pull request may close these issues.

1 participant