Class: XSD::AnyAttribute
- Inherits:
-
BaseObject
- Object
- BaseObject
- XSD::AnyAttribute
- Defined in:
- lib/xsd/objects/any_attribute.rb
Overview
The anyAttribute element enables the author to extend the XML document with attributes not specified by the schema. Parent elements: complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent), attributeGroup www.w3schools.com/xml/el_anyattribute.asp
Constant Summary
Constants inherited from BaseObject
BaseObject::NO_ATTRIBUTES_CONTAINER, BaseObject::NO_ELEMENTS_CONTAINER, BaseObject::XML_SCHEMA
Instance Attribute Summary collapse
-
#namespace ⇒ Object
Optional.
-
#process_contents ⇒ Object
Optional.
Attributes inherited from BaseObject
Instance Method Summary collapse
-
#name ⇒ Object
Get virtual attribute name.
Methods inherited from BaseObject
#[], #collect_attributes, #collect_elements, #documentation, #documentation_for, #get_prefix, #initialize, #inspect, #map_child, #map_children, #namespaces, #node, #node_to_object, #nodes, #object_by_name, #parent, #reader, #schema, #schemas_for_namespace, #strip_prefix
Constructor Details
This class inherits a constructor from XSD::BaseObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class XSD::BaseObject
Instance Attribute Details
#namespace ⇒ Object
Optional. Specifies the namespaces containing the attributes that can be used. Can be set to one of the following:
##any - attributes from any namespace is allowed (this is default)
##other - attributes from any namespace that is not the namespace of the parent element can be present
##local - attributes must come from no namespace
##targetNamespace - attributes from the namespace of the parent element can be present
List of {URI references of namespaces, ##targetNamespace, ##local} - attributes from a space-delimited list
of the namespaces can be present
18 |
# File 'lib/xsd/objects/any_attribute.rb', line 18 property :namespace, :string, default: '##any' |
#process_contents ⇒ Object
Optional. Specifies how the XML processor should handle validation against the elements specified by this any element. Can be set to one of the following:
strict - the XML processor must obtain the schema for the required namespaces and validate the elements (this
is default)
lax - same as strict but; if the schema cannot be obtained, no errors will occur
skip - The XML processor does not attempt to validate any elements from the specified namespaces
28 |
# File 'lib/xsd/objects/any_attribute.rb', line 28 property :processContents, :string, default: 'strict' |
Instance Method Details
#name ⇒ Object
Get virtual attribute name
32 33 34 |
# File 'lib/xsd/objects/any_attribute.rb', line 32 def name '#anyAttribute' end |