Skip to content

Commit

Permalink
Fixes issue where multiples namespace prefixes like ns1 and ns10 are …
Browse files Browse the repository at this point in the history
…replaced wrongly (#48)
  • Loading branch information
kjeldahl authored Dec 16, 2024
1 parent e61ce80 commit c638541
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/shale/schema/xml_compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def build_id(node)
# @api private
def replace_ns_prefixes(type, namespaces)
namespaces.each do |prefix, name|
type = type.sub(/^#{prefix}/, name)
type = type.sub(/^#{prefix}:/, "#{name}:")
end

if namespaces.key?('xmlns') && !type.include?(':')
Expand Down

0 comments on commit c638541

Please sign in to comment.