class Lutaml::Model::SchemaLocation
def [](index)
def [](index) @schema_location[index] end
def initialize(schema_location:, prefix: "xsi",
def initialize(schema_location:, prefix: "xsi", ace: DEFAULT_NAMESPACE) @original_schema_location = schema_location @schema_location = parsed_schema_locations(schema_location) @prefix = prefix @namespace = namespace end
def parsed_schema_locations(schema_location)
def parsed_schema_locations(schema_location) locations = if schema_location.is_a?(Hash) schema_location else schema_location.split.each_slice(2) end locations.map do |n, l| Location.new(namespace: n, location: l) end end
def size
def size @schema_location.size end
def to_xml_attributes
def to_xml_attributes { "xmlns:#{prefix}" => namespace, "#{prefix}:schemaLocation" => schema_location.map(&:to_xml_attribute).join(" "), } end