Class: LibXML::XML::Schema::Type

### Home Classes Methods

### In Files

- lib/libxml/schema/type.rb

### Parent

Object

### Methods

- #annonymus_subtypes
- #annonymus_subtypes_recursively
- #annotation
- #kind_name

### Class/Module Index

Quicksearch

- LibXML
- LibXML::XML
- LibXML::XML::Attr
- LibXML::XML::AttrDecl
- LibXML::XML::Attributes
- LibXML::XML::Document
- LibXML::XML::Error
- LibXML::XML::HTMLParser
- LibXML::XML::Namespace
- LibXML::XML::Namespaces
- LibXML::XML::Node
- LibXML::XML::Parser
- LibXML::XML::Reader
- LibXML::XML::SaxParser
- LibXML::XML::SaxParser::Callbacks
- LibXML::XML::SaxParser::VerboseCallbacks
- LibXML::XML::Schema
- LibXML::XML::Schema::Attribute
- LibXML::XML::Schema::Element
- LibXML::XML::Schema::Namespaces
- LibXML::XML::Schema::Type
- LibXML::XML::Schema::Types
- LibXML::XML::XPath
- LibXML::XML::XPath::Object
- Object

No matching classes.

# LibXML::XML::Schema::Type

### Public Instance Methods

annonymus_subtypes() click to toggle source

    # File lib/libxml/schema/type.rb, line 16
    def annonymus_subtypes
      elements.select { |_, e| e.type.name.nil? }
    end

annonymus_subtypes_recursively(parent=nil) click to toggle source

    # File lib/libxml/schema/type.rb, line 20
    def annonymus_subtypes_recursively(parent=nil)
      annonymus_subtypes.map do |element_name, e|
        [{[parent, element_name].compact.join('::') => e.type},
         e.type.annonymus_subtypes_recursively(element_name)]
      end.flatten
    end

annotation() click to toggle source

    # File lib/libxml/schema/type.rb, line 8
    def annotation
      return if node.nil?
      annotations = node.children.select { |n| n.name == 'annotation' }
      annotations.map do |annotation|
        annotation.children.map(&:content).join("\n")
      end.join("\n")
    end

kind_name() click to toggle source

    # File lib/libxml/schema/type.rb, line 4
    def kind_name
      Schema::Types.constants.find { |k| Schema::Types.const_get(k) == kind }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.