Sha256: a1dcac4cc49e67496cb4ac8f0f38d896642b8997a4f51f83fded15e7f0974de7

Contents?: true

Size: 970 Bytes

Versions: 179

Compression:

Stored size: 970 Bytes

Contents

## EXPRESS STEPMod Model Ruby Classes
## Version 0.1
##
## The Ruby classes in the model are based on the STEPMod DTD.
##

## process descriptions in external XML file
def load_descriptions( descxml, therepos )

  desc_list = descxml.elements.to_a("//ext_descriptions/ext_description")
  desclinkend_list = []
  XPath.each( descxml, '//ext_descriptions/ext_description/@linkend' ) { |n| desclinkend_list.push n.to_s }
  count_desc = desc_list.size
  puts "-- Processing descriptions . Count is #{count_desc.to_s}"

  for schema in therepos.schemas

    for decl in schema.contents
      if decl.kind_of? EXPSM::Entity
        pos = desclinkend_list.index(schema.name + '.' + decl.name)
        if pos != nil
          if desc_list[pos].has_elements?
            defn = 'ELEMENTS_FOUND'
          else
            defn = desc_list[pos].text
          end
          defn = defn.gsub('"','*')
          decl.definition = defn.strip
        end
      end
    end
  end
end

Version data entries

179 entries across 179 versions & 1 rubygems

Version Path
expressir-1.2.4 original/expsm.rb
expressir-1.2.4-x86_64-linux original/expsm.rb
expressir-1.2.4-x86_64-darwin original/expsm.rb
expressir-1.2.4-x86-mingw32 original/expsm.rb
expressir-1.2.4-x86-linux original/expsm.rb
expressir-1.2.4-x64-mingw32 original/expsm.rb
expressir-1.2.4-arm64-darwin original/expsm.rb
expressir-1.2.4-aarch64-linux original/expsm.rb
expressir-1.2.3 original/expsm.rb
expressir-1.2.3-x86_64-linux original/expsm.rb
expressir-1.2.3-x86_64-darwin original/expsm.rb
expressir-1.2.3-x86-mingw32 original/expsm.rb
expressir-1.2.3-x86-linux original/expsm.rb
expressir-1.2.3-x64-mingw32 original/expsm.rb
expressir-1.2.3-arm64-darwin original/expsm.rb
expressir-1.2.3-aarch64-linux original/expsm.rb
expressir-1.2.1 original/expsm.rb
expressir-1.2.1-x86_64-linux original/expsm.rb
expressir-1.2.1-x86_64-darwin original/expsm.rb
expressir-1.2.1-x86-mingw32 original/expsm.rb