lutaml-xsd 0.1.0 → 1.0.0
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 +4 -4
 - data/.rubocop.yml +3 -0
 - data/Gemfile +6 -0
 - data/LICENSE.md +33 -0
 - data/README.adoc +141 -0
 - data/lib/lutaml/xsd/all.rb +24 -0
 - data/lib/lutaml/xsd/annotation.rb +20 -0
 - data/lib/lutaml/xsd/any.rb +26 -0
 - data/lib/lutaml/xsd/any_attribute.rb +22 -0
 - data/lib/lutaml/xsd/appinfo.rb +18 -0
 - data/lib/lutaml/xsd/attribute.rb +34 -0
 - data/lib/lutaml/xsd/attribute_group.rb +28 -0
 - data/lib/lutaml/xsd/choice.rb +35 -0
 - data/lib/lutaml/xsd/complex_content.rb +26 -0
 - data/lib/lutaml/xsd/complex_type.rb +44 -0
 - data/lib/lutaml/xsd/documentation.rb +20 -0
 - data/lib/lutaml/xsd/element.rb +54 -0
 - data/lib/lutaml/xsd/enumeration.rb +18 -0
 - data/lib/lutaml/xsd/extension_complex_content.rb +34 -0
 - data/lib/lutaml/xsd/extension_simple_content.rb +26 -0
 - data/lib/lutaml/xsd/field.rb +18 -0
 - data/lib/lutaml/xsd/fraction_digits.rb +22 -0
 - data/lib/lutaml/xsd/glob.rb +63 -0
 - data/lib/lutaml/xsd/group.rb +35 -0
 - data/lib/lutaml/xsd/import.rb +26 -0
 - data/lib/lutaml/xsd/include.rb +24 -0
 - data/lib/lutaml/xsd/key.rb +25 -0
 - data/lib/lutaml/xsd/keyref.rb +26 -0
 - data/lib/lutaml/xsd/length.rb +20 -0
 - data/lib/lutaml/xsd/list.rb +21 -0
 - data/lib/lutaml/xsd/max_exclusive.rb +18 -0
 - data/lib/lutaml/xsd/max_inclusive.rb +16 -0
 - data/lib/lutaml/xsd/max_length.rb +18 -0
 - data/lib/lutaml/xsd/min_exclusive.rb +18 -0
 - data/lib/lutaml/xsd/min_inclusive.rb +16 -0
 - data/lib/lutaml/xsd/min_length.rb +18 -0
 - data/lib/lutaml/xsd/notation.rb +24 -0
 - data/lib/lutaml/xsd/pattern.rb +18 -0
 - data/lib/lutaml/xsd/redefine.rb +28 -0
 - data/lib/lutaml/xsd/restriction_complex_content.rb +34 -0
 - data/lib/lutaml/xsd/restriction_simple_content.rb +52 -0
 - data/lib/lutaml/xsd/restriction_simple_type.rb +46 -0
 - data/lib/lutaml/xsd/schema.rb +176 -0
 - data/lib/lutaml/xsd/selector.rb +20 -0
 - data/lib/lutaml/xsd/sequence.rb +34 -0
 - data/lib/lutaml/xsd/simple_content.rb +24 -0
 - data/lib/lutaml/xsd/simple_type.rb +28 -0
 - data/lib/lutaml/xsd/total_digits.rb +22 -0
 - data/lib/lutaml/xsd/union.rb +22 -0
 - data/lib/lutaml/xsd/unique.rb +24 -0
 - data/lib/lutaml/xsd/version.rb +1 -1
 - data/lib/lutaml/xsd/white_space.rb +20 -0
 - data/lib/lutaml/xsd/xsd.rb +16 -0
 - data/lib/lutaml/xsd.rb +9 -7
 - data/lutaml-xsd.gemspec +3 -0
 - metadata +84 -9
 - data/LICENSE.txt +0 -21
 - data/README.md +0 -43
 
| 
         @@ -0,0 +1,176 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                # rubocop:disable Metrics/ClassLength
         
     | 
| 
      
 6 
     | 
    
         
            +
                class Schema < Model::Serializable
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :lang, :string
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :xmlns, :string
         
     | 
| 
      
 10 
     | 
    
         
            +
                  attribute :version, :string
         
     | 
| 
      
 11 
     | 
    
         
            +
                  attribute :final_default, :string
         
     | 
| 
      
 12 
     | 
    
         
            +
                  attribute :block_default, :string
         
     | 
| 
      
 13 
     | 
    
         
            +
                  attribute :target_namespace, :string
         
     | 
| 
      
 14 
     | 
    
         
            +
                  attribute :element_form_default, :string
         
     | 
| 
      
 15 
     | 
    
         
            +
                  attribute :attribute_form_default, :string
         
     | 
| 
      
 16 
     | 
    
         
            +
                  attribute :imports, Import, collection: true
         
     | 
| 
      
 17 
     | 
    
         
            +
                  attribute :includes, Include, collection: true
         
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
                  attribute :group, Group, collection: true
         
     | 
| 
      
 20 
     | 
    
         
            +
                  attribute :import, Import, collection: true
         
     | 
| 
      
 21 
     | 
    
         
            +
                  attribute :element, Element, collection: true
         
     | 
| 
      
 22 
     | 
    
         
            +
                  attribute :include, Include, collection: true
         
     | 
| 
      
 23 
     | 
    
         
            +
                  attribute :notation, Notation, collection: true
         
     | 
| 
      
 24 
     | 
    
         
            +
                  attribute :redefine, Redefine, collection: true
         
     | 
| 
      
 25 
     | 
    
         
            +
                  attribute :attribute, Attribute, collection: true
         
     | 
| 
      
 26 
     | 
    
         
            +
                  attribute :annotation, Annotation, collection: true
         
     | 
| 
      
 27 
     | 
    
         
            +
                  attribute :simple_type, SimpleType, collection: true
         
     | 
| 
      
 28 
     | 
    
         
            +
                  attribute :complex_type, ComplexType, collection: true
         
     | 
| 
      
 29 
     | 
    
         
            +
                  attribute :attribute_group, AttributeGroup, collection: true
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 32 
     | 
    
         
            +
                    root "schema", mixed: true
         
     | 
| 
      
 33 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                    map_element :group, to: :group
         
     | 
| 
      
 36 
     | 
    
         
            +
                    map_element :element, to: :element
         
     | 
| 
      
 37 
     | 
    
         
            +
                    map_element :redefine, to: :redefine
         
     | 
| 
      
 38 
     | 
    
         
            +
                    map_element :notation, to: :notation
         
     | 
| 
      
 39 
     | 
    
         
            +
                    map_element :attribute, to: :attribute
         
     | 
| 
      
 40 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 41 
     | 
    
         
            +
                    map_element :simpleType, to: :simple_type
         
     | 
| 
      
 42 
     | 
    
         
            +
                    map_element :complexType, to: :complex_type
         
     | 
| 
      
 43 
     | 
    
         
            +
                    map_element :attributeGroup, to: :attribute_group
         
     | 
| 
      
 44 
     | 
    
         
            +
                    map_element :import, to: :import, with: { from: :import_from_schema, to: :import_to_schema }
         
     | 
| 
      
 45 
     | 
    
         
            +
                    map_element :include, to: :include, with: { from: :include_from_schema, to: :include_to_schema }
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                    map_attribute :attributeFormDefault, to: :attribute_form_default
         
     | 
| 
      
 48 
     | 
    
         
            +
                    map_attribute :elementFormDefault, to: :element_form_default
         
     | 
| 
      
 49 
     | 
    
         
            +
                    map_attribute :targetNamespace, to: :target_namespace
         
     | 
| 
      
 50 
     | 
    
         
            +
                    map_attribute :finalDefault, to: :final_default
         
     | 
| 
      
 51 
     | 
    
         
            +
                    map_attribute :blockDefault, to: :block_default
         
     | 
| 
      
 52 
     | 
    
         
            +
                    map_attribute :version, to: :version
         
     | 
| 
      
 53 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 54 
     | 
    
         
            +
                    map_attribute :lang, to: :lang
         
     | 
| 
      
 55 
     | 
    
         
            +
                  end
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                  def import_from_schema(model, value)
         
     | 
| 
      
 58 
     | 
    
         
            +
                    value.each do |schema|
         
     | 
| 
      
 59 
     | 
    
         
            +
                      setup_import_and_include("import", model, schema, namespace: schema["namespace"])
         
     | 
| 
      
 60 
     | 
    
         
            +
                    end
         
     | 
| 
      
 61 
     | 
    
         
            +
                  end
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                  def import_to_schema(model, parent, _doc)
         
     | 
| 
      
 64 
     | 
    
         
            +
                    model.imports.each_with_index do |imported_schema, index|
         
     | 
| 
      
 65 
     | 
    
         
            +
                      parent.add_child(imported_schema.to_xml)
         
     | 
| 
      
 66 
     | 
    
         
            +
                      model.imports.delete_at(index)
         
     | 
| 
      
 67 
     | 
    
         
            +
                    end
         
     | 
| 
      
 68 
     | 
    
         
            +
                  end
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
                  def include_from_schema(model, value)
         
     | 
| 
      
 71 
     | 
    
         
            +
                    value.each do |schema|
         
     | 
| 
      
 72 
     | 
    
         
            +
                      setup_import_and_include("include", model, schema)
         
     | 
| 
      
 73 
     | 
    
         
            +
                    end
         
     | 
| 
      
 74 
     | 
    
         
            +
                  end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                  def include_to_schema(model, parent, _doc)
         
     | 
| 
      
 77 
     | 
    
         
            +
                    model.includes.each_with_index do |schema_hash, index|
         
     | 
| 
      
 78 
     | 
    
         
            +
                      parent.add_child(schema_hash.to_xml)
         
     | 
| 
      
 79 
     | 
    
         
            +
                      model.includes.delete_at(index)
         
     | 
| 
      
 80 
     | 
    
         
            +
                    end
         
     | 
| 
      
 81 
     | 
    
         
            +
                  end
         
     | 
| 
      
 82 
     | 
    
         
            +
             
     | 
| 
      
 83 
     | 
    
         
            +
                  private
         
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
                  def setup_import_and_include(klass, model, schema, args = {})
         
     | 
| 
      
 86 
     | 
    
         
            +
                    instance = init_instance_of(klass, schema, args)
         
     | 
| 
      
 87 
     | 
    
         
            +
                    annotation_object(instance, schema)
         
     | 
| 
      
 88 
     | 
    
         
            +
                    model.send("#{klass}s") << instance
         
     | 
| 
      
 89 
     | 
    
         
            +
                    schema_path = instance.schema_path
         
     | 
| 
      
 90 
     | 
    
         
            +
                    return if self.class.in_progress?(schema_path) || schema_path.nil?
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
                    self.class.add_in_progress(schema_path)
         
     | 
| 
      
 93 
     | 
    
         
            +
                    model.send(klass) << insert_in_processed_schemas(instance)
         
     | 
| 
      
 94 
     | 
    
         
            +
                    self.class.remove_in_progress(schema_path)
         
     | 
| 
      
 95 
     | 
    
         
            +
                  end
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
                  def dig_schema_location(schema_hash)
         
     | 
| 
      
 98 
     | 
    
         
            +
                    schema_hash&.dig("__schema_location", :schema_location)
         
     | 
| 
      
 99 
     | 
    
         
            +
                  end
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
                  def schema_location?(schema_hash)
         
     | 
| 
      
 102 
     | 
    
         
            +
                    schema_hash&.dig("__schema_location")&.key?(:schema_location)
         
     | 
| 
      
 103 
     | 
    
         
            +
                  end
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
                  def init_instance_of(klass, schema_hash, args = {})
         
     | 
| 
      
 106 
     | 
    
         
            +
                    args[:id] = schema_hash["id"]
         
     | 
| 
      
 107 
     | 
    
         
            +
                    args[:schema_path] = dig_schema_location(schema_hash)
         
     | 
| 
      
 108 
     | 
    
         
            +
                    Lutaml::Xsd.const_get(klass.capitalize).new(**args)
         
     | 
| 
      
 109 
     | 
    
         
            +
                  end
         
     | 
| 
      
 110 
     | 
    
         
            +
             
     | 
| 
      
 111 
     | 
    
         
            +
                  def insert_in_processed_schemas(instance)
         
     | 
| 
      
 112 
     | 
    
         
            +
                    parsed_schema = schema_by_location_or_instance(instance)
         
     | 
| 
      
 113 
     | 
    
         
            +
                    return unless parsed_schema
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
                    self.class.schema_processed(instance.schema_path, parsed_schema)
         
     | 
| 
      
 116 
     | 
    
         
            +
                    parsed_schema
         
     | 
| 
      
 117 
     | 
    
         
            +
                  end
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
                  def schema_by_location_or_instance(instance)
         
     | 
| 
      
 120 
     | 
    
         
            +
                    schema_path = instance.schema_path
         
     | 
| 
      
 121 
     | 
    
         
            +
                    return unless schema_path
         
     | 
| 
      
 122 
     | 
    
         
            +
             
     | 
| 
      
 123 
     | 
    
         
            +
                    self.class.processed_schemas[schema_path] ||
         
     | 
| 
      
 124 
     | 
    
         
            +
                      Lutaml::Xsd.parse(
         
     | 
| 
      
 125 
     | 
    
         
            +
                        instance.fetch_schema,
         
     | 
| 
      
 126 
     | 
    
         
            +
                        location: Glob.location,
         
     | 
| 
      
 127 
     | 
    
         
            +
                        nested_schema: true
         
     | 
| 
      
 128 
     | 
    
         
            +
                      )
         
     | 
| 
      
 129 
     | 
    
         
            +
                  end
         
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
                  def annotation_object(instance, schema)
         
     | 
| 
      
 132 
     | 
    
         
            +
                    annotation_key = schema.keys.find { |key| key.include?("annotation") }
         
     | 
| 
      
 133 
     | 
    
         
            +
                    return unless annotation_key
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
                    instance.annotation = Annotation.apply_mappings(schema[annotation_key], :xml)
         
     | 
| 
      
 136 
     | 
    
         
            +
                  end
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
                  class << self
         
     | 
| 
      
 139 
     | 
    
         
            +
                    def reset_processed_schemas
         
     | 
| 
      
 140 
     | 
    
         
            +
                      @processed_schemas = {}
         
     | 
| 
      
 141 
     | 
    
         
            +
                    end
         
     | 
| 
      
 142 
     | 
    
         
            +
             
     | 
| 
      
 143 
     | 
    
         
            +
                    def processed_schemas
         
     | 
| 
      
 144 
     | 
    
         
            +
                      @processed_schemas ||= {}
         
     | 
| 
      
 145 
     | 
    
         
            +
                    end
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
                    def schema_processed?(location)
         
     | 
| 
      
 148 
     | 
    
         
            +
                      processed_schemas[location]
         
     | 
| 
      
 149 
     | 
    
         
            +
                    end
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
                    def schema_processed(location, schema)
         
     | 
| 
      
 152 
     | 
    
         
            +
                      return if location.nil?
         
     | 
| 
      
 153 
     | 
    
         
            +
             
     | 
| 
      
 154 
     | 
    
         
            +
                      processed_schemas[location] = schema
         
     | 
| 
      
 155 
     | 
    
         
            +
                    end
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
                    def in_progress
         
     | 
| 
      
 158 
     | 
    
         
            +
                      @in_progress ||= []
         
     | 
| 
      
 159 
     | 
    
         
            +
                    end
         
     | 
| 
      
 160 
     | 
    
         
            +
             
     | 
| 
      
 161 
     | 
    
         
            +
                    def in_progress?(location)
         
     | 
| 
      
 162 
     | 
    
         
            +
                      in_progress.include?(location)
         
     | 
| 
      
 163 
     | 
    
         
            +
                    end
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
                    def add_in_progress(location)
         
     | 
| 
      
 166 
     | 
    
         
            +
                      in_progress << location
         
     | 
| 
      
 167 
     | 
    
         
            +
                    end
         
     | 
| 
      
 168 
     | 
    
         
            +
             
     | 
| 
      
 169 
     | 
    
         
            +
                    def remove_in_progress(location)
         
     | 
| 
      
 170 
     | 
    
         
            +
                      in_progress.delete(location)
         
     | 
| 
      
 171 
     | 
    
         
            +
                    end
         
     | 
| 
      
 172 
     | 
    
         
            +
                  end
         
     | 
| 
      
 173 
     | 
    
         
            +
                end
         
     | 
| 
      
 174 
     | 
    
         
            +
                # rubocop:enable Metrics/ClassLength
         
     | 
| 
      
 175 
     | 
    
         
            +
              end
         
     | 
| 
      
 176 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class Selector < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :xpath, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 11 
     | 
    
         
            +
                    root "selector", mixed: true
         
     | 
| 
      
 12 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 15 
     | 
    
         
            +
                    map_attribute :xpath, to: :xpath
         
     | 
| 
      
 16 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 17 
     | 
    
         
            +
                  end
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,34 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class Choice < Model::Serializable; end
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                class Sequence < Model::Serializable
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :min_occurs, :string
         
     | 
| 
      
 10 
     | 
    
         
            +
                  attribute :max_occurs, :string
         
     | 
| 
      
 11 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 12 
     | 
    
         
            +
                  attribute :sequence, Sequence, collection: true
         
     | 
| 
      
 13 
     | 
    
         
            +
                  attribute :element, Element, collection: true
         
     | 
| 
      
 14 
     | 
    
         
            +
                  attribute :choice, Choice, collection: true
         
     | 
| 
      
 15 
     | 
    
         
            +
                  attribute :group, Group, collection: true
         
     | 
| 
      
 16 
     | 
    
         
            +
                  attribute :any, Any, collection: true
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 19 
     | 
    
         
            +
                    root "sequence", mixed: true
         
     | 
| 
      
 20 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 23 
     | 
    
         
            +
                    map_attribute :minOccurs, to: :min_occurs
         
     | 
| 
      
 24 
     | 
    
         
            +
                    map_attribute :maxOccurs, to: :max_occurs
         
     | 
| 
      
 25 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 26 
     | 
    
         
            +
                    map_element :sequence, to: :sequence
         
     | 
| 
      
 27 
     | 
    
         
            +
                    map_element :element, to: :element
         
     | 
| 
      
 28 
     | 
    
         
            +
                    map_element :choice, to: :choice
         
     | 
| 
      
 29 
     | 
    
         
            +
                    map_element :group, to: :group
         
     | 
| 
      
 30 
     | 
    
         
            +
                    map_element :any, to: :any
         
     | 
| 
      
 31 
     | 
    
         
            +
                  end
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class SimpleContent < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :base, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :extension, ExtensionSimpleContent
         
     | 
| 
      
 10 
     | 
    
         
            +
                  attribute :restriction, RestrictionSimpleContent
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 13 
     | 
    
         
            +
                    root "simpleContent", mixed: true
         
     | 
| 
      
 14 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 17 
     | 
    
         
            +
                    map_attribute :base, to: :base
         
     | 
| 
      
 18 
     | 
    
         
            +
                    map_element :restriction, to: :restriction
         
     | 
| 
      
 19 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 20 
     | 
    
         
            +
                    map_element :extension, to: :extension
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,28 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class SimpleType < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :name, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :final, :string
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :list, List
         
     | 
| 
      
 10 
     | 
    
         
            +
                  attribute :union, Union
         
     | 
| 
      
 11 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 12 
     | 
    
         
            +
                  attribute :restriction, RestrictionSimpleType
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 15 
     | 
    
         
            +
                    root "simpleType", mixed: true
         
     | 
| 
      
 16 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 19 
     | 
    
         
            +
                    map_attribute :name, to: :name
         
     | 
| 
      
 20 
     | 
    
         
            +
                    map_attribute :final, to: :final
         
     | 
| 
      
 21 
     | 
    
         
            +
                    map_element :list, to: :list
         
     | 
| 
      
 22 
     | 
    
         
            +
                    map_element :union, to: :union
         
     | 
| 
      
 23 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 24 
     | 
    
         
            +
                    map_element :restriction, to: :restriction
         
     | 
| 
      
 25 
     | 
    
         
            +
                  end
         
     | 
| 
      
 26 
     | 
    
         
            +
                end
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class TotalDigits < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :value, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :fixed, :string
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 12 
     | 
    
         
            +
                    root "totalDigits", mixed: true
         
     | 
| 
      
 13 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 16 
     | 
    
         
            +
                    map_attribute :value, to: :value
         
     | 
| 
      
 17 
     | 
    
         
            +
                    map_attribute :fixed, to: :fixed
         
     | 
| 
      
 18 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
      
 22 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,22 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class Union < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :member_types, :string, default: -> { "" }
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :simple_type, SimpleType, collection: true
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 12 
     | 
    
         
            +
                    root "union", mixed: true
         
     | 
| 
      
 13 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 16 
     | 
    
         
            +
                    map_attribute :memberTypes, to: :member_types
         
     | 
| 
      
 17 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 18 
     | 
    
         
            +
                    map_element :simpleType, to: :simple_type
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
              end
         
     | 
| 
      
 22 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class Unique < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :name, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :selector, Selector
         
     | 
| 
      
 9 
     | 
    
         
            +
                  attribute :annotation, Annotation
         
     | 
| 
      
 10 
     | 
    
         
            +
                  attribute :field, Field, collection: true
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 13 
     | 
    
         
            +
                    root "unique", mixed: true
         
     | 
| 
      
 14 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 17 
     | 
    
         
            +
                    map_attribute :name, to: :name
         
     | 
| 
      
 18 
     | 
    
         
            +
                    map_element :annotation, to: :annotation
         
     | 
| 
      
 19 
     | 
    
         
            +
                    map_element :selector, to: :selector
         
     | 
| 
      
 20 
     | 
    
         
            +
                    map_element :field, to: :field
         
     | 
| 
      
 21 
     | 
    
         
            +
                  end
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/lutaml/xsd/version.rb
    CHANGED
    
    
| 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class WhiteSpace < Model::Serializable
         
     | 
| 
      
 6 
     | 
    
         
            +
                  attribute :id, :string
         
     | 
| 
      
 7 
     | 
    
         
            +
                  attribute :fixed, :string
         
     | 
| 
      
 8 
     | 
    
         
            +
                  attribute :value, :string
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
                  xml do
         
     | 
| 
      
 11 
     | 
    
         
            +
                    root "whiteSpace", mixed: true
         
     | 
| 
      
 12 
     | 
    
         
            +
                    namespace "http://www.w3.org/2001/XMLSchema", "xsd"
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
                    map_attribute :id, to: :id
         
     | 
| 
      
 15 
     | 
    
         
            +
                    map_attribute :fixed, to: :fixed
         
     | 
| 
      
 16 
     | 
    
         
            +
                    map_attribute :value, to: :value
         
     | 
| 
      
 17 
     | 
    
         
            +
                  end
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,16 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Lutaml
         
     | 
| 
      
 4 
     | 
    
         
            +
              module Xsd
         
     | 
| 
      
 5 
     | 
    
         
            +
                class Error < StandardError; end
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
                module_function
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
                def parse(xsd, location: nil, nested_schema: false)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  Schema.reset_processed_schemas unless nested_schema
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                  Glob.path_or_url(location)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  Schema.from_xml(xsd)
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/lutaml/xsd.rb
    CHANGED
    
    | 
         @@ -1,10 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            require "zeitwerk"
         
     | 
| 
      
 4 
     | 
    
         
            +
            require "lutaml/model"
         
     | 
| 
      
 5 
     | 
    
         
            +
            require_relative "xsd/xsd"
         
     | 
| 
       4 
6 
     | 
    
         | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
             
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
      
 7 
     | 
    
         
            +
            Lutaml::Model::Config.xml_adapter_type = :nokogiri
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: true)
         
     | 
| 
      
 10 
     | 
    
         
            +
            loader.push_dir("#{__dir__}/xsd", namespace: Lutaml::Xsd)
         
     | 
| 
      
 11 
     | 
    
         
            +
            loader.ignore("#{__dir__}/lib/lutaml/xsd.rb")
         
     | 
| 
      
 12 
     | 
    
         
            +
            loader.setup
         
     | 
    
        data/lutaml-xsd.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,15 +1,43 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: lutaml-xsd
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version:  
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Ribose Inc.
         
     | 
| 
       8 
     | 
    
         
            -
            autorequire:
         
     | 
| 
      
 8 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: exe
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2024- 
     | 
| 
       12 
     | 
    
         
            -
            dependencies: 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2024-12-31 00:00:00.000000000 Z
         
     | 
| 
      
 12 
     | 
    
         
            +
            dependencies:
         
     | 
| 
      
 13 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 14 
     | 
    
         
            +
              name: lutaml-model
         
     | 
| 
      
 15 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 16 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 17 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
      
 20 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 21 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 22 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 23 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 24 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 25 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '0.3'
         
     | 
| 
      
 27 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 28 
     | 
    
         
            +
              name: zeitwerk
         
     | 
| 
      
 29 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 30 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 31 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 32 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
      
 34 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 35 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 36 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 37 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 38 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 39 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 40 
     | 
    
         
            +
                    version: '0'
         
     | 
| 
       13 
41 
     | 
    
         
             
            description: Parser and builder for XML Schema Definition (XSD) files.
         
     | 
| 
       14 
42 
     | 
    
         
             
            email:
         
     | 
| 
       15 
43 
     | 
    
         
             
            - open.source@ribose.com
         
     | 
| 
         @@ -25,13 +53,60 @@ files: 
     | 
|
| 
       25 
53 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       26 
54 
     | 
    
         
             
            - CODE_OF_CONDUCT.md
         
     | 
| 
       27 
55 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       28 
     | 
    
         
            -
            - LICENSE. 
     | 
| 
       29 
     | 
    
         
            -
            - README. 
     | 
| 
      
 56 
     | 
    
         
            +
            - LICENSE.md
         
     | 
| 
      
 57 
     | 
    
         
            +
            - README.adoc
         
     | 
| 
       30 
58 
     | 
    
         
             
            - Rakefile
         
     | 
| 
       31 
59 
     | 
    
         
             
            - bin/console
         
     | 
| 
       32 
60 
     | 
    
         
             
            - bin/setup
         
     | 
| 
       33 
61 
     | 
    
         
             
            - lib/lutaml/xsd.rb
         
     | 
| 
      
 62 
     | 
    
         
            +
            - lib/lutaml/xsd/all.rb
         
     | 
| 
      
 63 
     | 
    
         
            +
            - lib/lutaml/xsd/annotation.rb
         
     | 
| 
      
 64 
     | 
    
         
            +
            - lib/lutaml/xsd/any.rb
         
     | 
| 
      
 65 
     | 
    
         
            +
            - lib/lutaml/xsd/any_attribute.rb
         
     | 
| 
      
 66 
     | 
    
         
            +
            - lib/lutaml/xsd/appinfo.rb
         
     | 
| 
      
 67 
     | 
    
         
            +
            - lib/lutaml/xsd/attribute.rb
         
     | 
| 
      
 68 
     | 
    
         
            +
            - lib/lutaml/xsd/attribute_group.rb
         
     | 
| 
      
 69 
     | 
    
         
            +
            - lib/lutaml/xsd/choice.rb
         
     | 
| 
      
 70 
     | 
    
         
            +
            - lib/lutaml/xsd/complex_content.rb
         
     | 
| 
      
 71 
     | 
    
         
            +
            - lib/lutaml/xsd/complex_type.rb
         
     | 
| 
      
 72 
     | 
    
         
            +
            - lib/lutaml/xsd/documentation.rb
         
     | 
| 
      
 73 
     | 
    
         
            +
            - lib/lutaml/xsd/element.rb
         
     | 
| 
      
 74 
     | 
    
         
            +
            - lib/lutaml/xsd/enumeration.rb
         
     | 
| 
      
 75 
     | 
    
         
            +
            - lib/lutaml/xsd/extension_complex_content.rb
         
     | 
| 
      
 76 
     | 
    
         
            +
            - lib/lutaml/xsd/extension_simple_content.rb
         
     | 
| 
      
 77 
     | 
    
         
            +
            - lib/lutaml/xsd/field.rb
         
     | 
| 
      
 78 
     | 
    
         
            +
            - lib/lutaml/xsd/fraction_digits.rb
         
     | 
| 
      
 79 
     | 
    
         
            +
            - lib/lutaml/xsd/glob.rb
         
     | 
| 
      
 80 
     | 
    
         
            +
            - lib/lutaml/xsd/group.rb
         
     | 
| 
      
 81 
     | 
    
         
            +
            - lib/lutaml/xsd/import.rb
         
     | 
| 
      
 82 
     | 
    
         
            +
            - lib/lutaml/xsd/include.rb
         
     | 
| 
      
 83 
     | 
    
         
            +
            - lib/lutaml/xsd/key.rb
         
     | 
| 
      
 84 
     | 
    
         
            +
            - lib/lutaml/xsd/keyref.rb
         
     | 
| 
      
 85 
     | 
    
         
            +
            - lib/lutaml/xsd/length.rb
         
     | 
| 
      
 86 
     | 
    
         
            +
            - lib/lutaml/xsd/list.rb
         
     | 
| 
      
 87 
     | 
    
         
            +
            - lib/lutaml/xsd/max_exclusive.rb
         
     | 
| 
      
 88 
     | 
    
         
            +
            - lib/lutaml/xsd/max_inclusive.rb
         
     | 
| 
      
 89 
     | 
    
         
            +
            - lib/lutaml/xsd/max_length.rb
         
     | 
| 
      
 90 
     | 
    
         
            +
            - lib/lutaml/xsd/min_exclusive.rb
         
     | 
| 
      
 91 
     | 
    
         
            +
            - lib/lutaml/xsd/min_inclusive.rb
         
     | 
| 
      
 92 
     | 
    
         
            +
            - lib/lutaml/xsd/min_length.rb
         
     | 
| 
      
 93 
     | 
    
         
            +
            - lib/lutaml/xsd/notation.rb
         
     | 
| 
      
 94 
     | 
    
         
            +
            - lib/lutaml/xsd/pattern.rb
         
     | 
| 
      
 95 
     | 
    
         
            +
            - lib/lutaml/xsd/redefine.rb
         
     | 
| 
      
 96 
     | 
    
         
            +
            - lib/lutaml/xsd/restriction_complex_content.rb
         
     | 
| 
      
 97 
     | 
    
         
            +
            - lib/lutaml/xsd/restriction_simple_content.rb
         
     | 
| 
      
 98 
     | 
    
         
            +
            - lib/lutaml/xsd/restriction_simple_type.rb
         
     | 
| 
      
 99 
     | 
    
         
            +
            - lib/lutaml/xsd/schema.rb
         
     | 
| 
      
 100 
     | 
    
         
            +
            - lib/lutaml/xsd/selector.rb
         
     | 
| 
      
 101 
     | 
    
         
            +
            - lib/lutaml/xsd/sequence.rb
         
     | 
| 
      
 102 
     | 
    
         
            +
            - lib/lutaml/xsd/simple_content.rb
         
     | 
| 
      
 103 
     | 
    
         
            +
            - lib/lutaml/xsd/simple_type.rb
         
     | 
| 
      
 104 
     | 
    
         
            +
            - lib/lutaml/xsd/total_digits.rb
         
     | 
| 
      
 105 
     | 
    
         
            +
            - lib/lutaml/xsd/union.rb
         
     | 
| 
      
 106 
     | 
    
         
            +
            - lib/lutaml/xsd/unique.rb
         
     | 
| 
       34 
107 
     | 
    
         
             
            - lib/lutaml/xsd/version.rb
         
     | 
| 
      
 108 
     | 
    
         
            +
            - lib/lutaml/xsd/white_space.rb
         
     | 
| 
      
 109 
     | 
    
         
            +
            - lib/lutaml/xsd/xsd.rb
         
     | 
| 
       35 
110 
     | 
    
         
             
            - lutaml-xsd.gemspec
         
     | 
| 
       36 
111 
     | 
    
         
             
            - sig/lutaml/xsd.rbs
         
     | 
| 
       37 
112 
     | 
    
         
             
            homepage: https://github.com/lutaml/expressir
         
     | 
| 
         @@ -42,7 +117,7 @@ metadata: 
     | 
|
| 
       42 
117 
     | 
    
         
             
              source_code_uri: https://github.com/lutaml/expressir
         
     | 
| 
       43 
118 
     | 
    
         
             
              changelog_uri: https://github.com/lutaml/lutaml-xsd/releases
         
     | 
| 
       44 
119 
     | 
    
         
             
              rubygems_mfa_required: 'true'
         
     | 
| 
       45 
     | 
    
         
            -
            post_install_message:
         
     | 
| 
      
 120 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
       46 
121 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       47 
122 
     | 
    
         
             
            require_paths:
         
     | 
| 
       48 
123 
     | 
    
         
             
            - lib
         
     | 
| 
         @@ -57,8 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       57 
132 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       58 
133 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       59 
134 
     | 
    
         
             
            requirements: []
         
     | 
| 
       60 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
       61 
     | 
    
         
            -
            signing_key:
         
     | 
| 
      
 135 
     | 
    
         
            +
            rubygems_version: 3.3.27
         
     | 
| 
      
 136 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
       62 
137 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       63 
138 
     | 
    
         
             
            summary: Library for XML Schema Definition (XSD) files
         
     | 
| 
       64 
139 
     | 
    
         
             
            test_files: []
         
     | 
    
        data/LICENSE.txt
    DELETED
    
    | 
         @@ -1,21 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            The MIT License (MIT)
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            Copyright (c) 2024 suleman-uzair
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            Permission is hereby granted, free of charge, to any person obtaining a copy
         
     | 
| 
       6 
     | 
    
         
            -
            of this software and associated documentation files (the "Software"), to deal
         
     | 
| 
       7 
     | 
    
         
            -
            in the Software without restriction, including without limitation the rights
         
     | 
| 
       8 
     | 
    
         
            -
            to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         
     | 
| 
       9 
     | 
    
         
            -
            copies of the Software, and to permit persons to whom the Software is
         
     | 
| 
       10 
     | 
    
         
            -
            furnished to do so, subject to the following conditions:
         
     | 
| 
       11 
     | 
    
         
            -
             
     | 
| 
       12 
     | 
    
         
            -
            The above copyright notice and this permission notice shall be included in
         
     | 
| 
       13 
     | 
    
         
            -
            all copies or substantial portions of the Software.
         
     | 
| 
       14 
     | 
    
         
            -
             
     | 
| 
       15 
     | 
    
         
            -
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         
     | 
| 
       16 
     | 
    
         
            -
            IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         
     | 
| 
       17 
     | 
    
         
            -
            FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         
     | 
| 
       18 
     | 
    
         
            -
            AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         
     | 
| 
       19 
     | 
    
         
            -
            LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         
     | 
| 
       20 
     | 
    
         
            -
            OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
         
     | 
| 
       21 
     | 
    
         
            -
            THE SOFTWARE.
         
     | 
    
        data/README.md
    DELETED
    
    | 
         @@ -1,43 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            # Lutaml::Xsd
         
     | 
| 
       2 
     | 
    
         
            -
             
     | 
| 
       3 
     | 
    
         
            -
            TODO: Delete this and the text below, and describe your gem
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
            Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/lutaml/xsd`. To experiment with that code, run `bin/console` for an interactive prompt.
         
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            ## Installation
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
         
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
            Install the gem and add to the application's Gemfile by executing:
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
            ```bash
         
     | 
| 
       14 
     | 
    
         
            -
            bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
         
     | 
| 
       15 
     | 
    
         
            -
            ```
         
     | 
| 
       16 
     | 
    
         
            -
             
     | 
| 
       17 
     | 
    
         
            -
            If bundler is not being used to manage dependencies, install the gem by executing:
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            ```bash
         
     | 
| 
       20 
     | 
    
         
            -
            gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
         
     | 
| 
       21 
     | 
    
         
            -
            ```
         
     | 
| 
       22 
     | 
    
         
            -
             
     | 
| 
       23 
     | 
    
         
            -
            ## Usage
         
     | 
| 
       24 
     | 
    
         
            -
             
     | 
| 
       25 
     | 
    
         
            -
            TODO: Write usage instructions here
         
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
            ## Development
         
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
            After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
         
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
            To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
         
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
            ## Contributing
         
     | 
| 
       34 
     | 
    
         
            -
             
     | 
| 
       35 
     | 
    
         
            -
            Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lutaml-xsd. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/lutaml-xsd/blob/master/CODE_OF_CONDUCT.md).
         
     | 
| 
       36 
     | 
    
         
            -
             
     | 
| 
       37 
     | 
    
         
            -
            ## License
         
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
            The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
         
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
       41 
     | 
    
         
            -
            ## Code of Conduct
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
            Everyone interacting in the Lutaml::Xsd project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lutaml-xsd/blob/master/CODE_OF_CONDUCT.md).
         
     |