123456789_123456789_123456789_123456789_123456789_

Class: LibXML::XML::Schema::Attribute

Relationships & Source Files
Inherits: Object
Defined in: ext/libxml/ruby_xml_schema_attribute.c,
lib/libxml/schema/attribute.rb

Constant Summary

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#namespace (readonly)

[ GitHub ]

#occurs (readonly)

[ GitHub ]

#required?Boolean (readonly)

Returns whether this attribute is required.

[ GitHub ]

  
# File 'lib/libxml/schema/attribute.rb', line 21

def required?
  occurs == REQUIRED
end

#type (readonly)

[ GitHub ]

#value (readonly)

[ GitHub ]

Instance Method Details

#defaultString?

Returns the default value for this attribute, or nil if none.

[ GitHub ]

  
# File 'lib/libxml/schema/attribute.rb', line 13

def default
  node['default']
end

#node

[ GitHub ]

  
# File 'ext/libxml/ruby_xml_schema_attribute.c', line 88

static VALUE rxml_schema_attribute_node(VALUE self)
{
  xmlSchemaAttributeUsePtr attr;

  TypedData_Get_Struct(self, xmlSchemaAttributeUse, &rxml_schema_attribute_type, attr);

  return rxml_node_wrap(attr->node);
}