xsd 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5866e8be4b81ee97f2df8d4b1df3f585d94a3edcb7408ef45d6f8fee2fb89f1e
4
- data.tar.gz: 793e41c9424ca2cce3d0b9f5b26b38d9e39696c31c29910ba3f9223dd6850724
3
+ metadata.gz: 07f0d2e114fa193dacc2ad0d9d74bbc173cbd3ebebcbae3d5a86152cc05abdc9
4
+ data.tar.gz: f806f42ee894bd5a14704842d4e2f6da61559d006edce27e3dcb6d29568ab54b
5
5
  SHA512:
6
- metadata.gz: 89bee39c770bb75941940911c875159b455443a97fdb10d6bb0064a3acfb557d66f106fba45701940aff51f07f2f61a5d7f44453ed7b80a81426042da76dec8e
7
- data.tar.gz: 8b3f4004b78f7a5be63903514a60971a21b5107e4488882d2d2a36e260d6d6eaa6b200ab37491fe4060d50f8f00c18b0ced84aac3323819af41d02535fb7512a
6
+ metadata.gz: 5ecb651c68e56eac792410385234e8ef48a366d2534978885e2f89023080b6d5de54d6e3d5ad53fe30d6d6eee074a46a1095dec87549bb11a78dea9ef5787773
7
+ data.tar.gz: 9d43d08a7281787b1d32f572339718620d1e88eff4f208b4d80fdb753086c4d996c7fb0d7b9277f5f00dcae9ff3bd13660d1207891e9c61265888575e48f7aad
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [2.4.3] - 2024-04-04
4
+
5
+ - Fix detecting types and refs when namespaces are overidden per element
6
+ - Fix documentation encoding issue with no XML declaration
7
+
3
8
  ## [2.4.1] - 2023-11-13
4
9
 
5
10
  - Fix attribute value existence check
@@ -76,12 +76,16 @@ module XSD
76
76
  # @param [String, nil] ns_or_prefix
77
77
  # @return Array<Schema>
78
78
  def schemas_for_namespace(ns_or_prefix)
79
- if schema.targets_namespace?(ns_or_prefix)
79
+ # resolve namespace for current node if prefix was provided
80
+ prefix = node.namespaces["xmlns:#{ns_or_prefix}"]
81
+ ns = prefix || ns_or_prefix
82
+
83
+ if schema.targets_namespace?(ns)
80
84
  [schema, *schema.includes.map(&:imported_schema)]
81
- elsif (import = schema.import_by_namespace(ns_or_prefix))
85
+ elsif (import = schema.import_by_namespace(ns))
82
86
  [import.imported_schema]
83
87
  else
84
- raise Error, "Schema not found for namespace '#{ns_or_prefix}' in '#{schema.id || schema.target_namespace}'"
88
+ raise Error, "Schema not found for namespace '#{ns}' in '#{schema.id || schema.target_namespace}'"
85
89
  end
86
90
  end
87
91
 
data/lib/xsd/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XSD
4
- VERSION = '2.4.2'
4
+ VERSION = '2.4.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.arkhipov