Class: XSD::Any
- Inherits:
-
BaseObject
- Object
- BaseObject
- XSD::Any
- Includes:
- MinMaxOccurs
- Defined in:
- lib/xsd/objects/any.rb
Overview
The any element enables the author to extend the XML document with elements not specified by the schema. Parent elements: choice, sequence www.w3schools.com/xml/el_any.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 included from MinMaxOccurs
Attributes inherited from BaseObject
Instance Method Summary collapse
-
#name ⇒ Object
Get virtual element name.
Methods included from MinMaxOccurs
#computed_max_occurs, #computed_min_occurs, included, #multiple?, #multiple_allowed?
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 elements that can be used. Can be set to one of the following:
##any - elements from any namespace is allowed (this is default)
##other - elements from any namespace that is not the namespace of the parent element can be present
##local - elements must come from no namespace
##targetNamespace - elements from the namespace of the parent element can be present
List of {URI references of namespaces, ##targetNamespace, ##local} - elements from a space-delimited list of
the namespaces can be present
19 |
# File 'lib/xsd/objects/any.rb', line 19 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
29 |
# File 'lib/xsd/objects/any.rb', line 29 property :processContents, :string, default: 'strict' |
Instance Method Details
#name ⇒ Object
Get virtual element name
33 34 35 |
# File 'lib/xsd/objects/any.rb', line 33 def name '#any' end |