XML Schema Documentation

Table of Contents

top

Schema Document Properties

Target Namespace http://xmlns.opennms.org/xsd/config/http-datacollection
Element and Attribute Namespaces
  • Global element and attribute declarations belong to this schema's target namespace.
  • By default, local element declarations have no namespace.
  • By default, local attribute declarations have no namespace.
Documentation XML Schema for the http-datacollection-config.xml configuration file. Collections: - As in SNMP data collection, multiple collections can be defined - RRD definition is defined here, by as with the other data collection configurations (SNMP, JMX) it should be moved to the package specification. - Multiple URIs can be defined and is synonymous with groups defined in SNMP data collection. URLs: - Initial use case for this collector's configuration is to support multiple schemes (i.e. http, (ftp, file, etc.) but initial use will be for http only and is configured by default. - URLs have many attributes (authority, scheme, user-agent, virtual-host, etc.) - URLs support query strings as well as post fields.

Declared Namespaces

Prefix Namespace
Default namespace http://www.w3.org/2001/XMLSchema
xml http://www.w3.org/XML/1998/namespace
xsi http://www.w3.org/2001/XMLSchema-instance
ns2 http://www.w3.org/1999/xhtml
ns http://www.w3.org/2001/XMLSchema
hfp http://www.w3.org/2001/XMLSchema-hasFacetAndProperty
http-dc http://xmlns.opennms.org/xsd/config/http-datacollection
Schema Component Representation
<schema targetNamespace="http://xmlns.opennms.org/xsd/config/http-datacollection">
...
</schema>
top

Global Declarations

Element: attrib

Name attrib
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:attrib
alias="string [1]"
match-group=" int (value >= 1) [1]"
type=" http-dc:allowed-types [1]"/>
Schema Component Representation
<element name="attrib">
<complexType>
<attribute name="alias" type=" string " use="required"/>
<attribute name="match-group" use="required">
<simpleType>
<restriction base=" int ">
<minInclusive value="1"/>
</restriction>
</simpleType>
</attribute>
<attribute name="type" type=" http-dc:allowed-types " use="required"/>
</complexType>
</element>
top

Element: attributes

Name attributes
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:attributes>
<http-dc:attrib> ... </http-dc:attrib> [1..*]
</http-dc:attributes>
Schema Component Representation
<element name="attributes">
<complexType>
<sequence>
<element ref=" http-dc:attrib " minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
top

Element: http-collection

Name http-collection
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:http-collection
name="string [0..1]">
<http-dc:rrd> ... </http-dc:rrd> [1]
<http-dc:uris> ... </http-dc:uris> [1]
</http-dc:http-collection>
Schema Component Representation
<element name="http-collection">
<complexType>
<sequence>
<element ref=" http-dc:rrd " minOccurs="1" maxOccurs="1"/>
<element ref=" http-dc:uris " minOccurs="1" maxOccurs="1"/>
</sequence>
<attribute name="name" type=" string " use="optional" default="default"/>
</complexType>
</element>
top

Element: http-datacollection-config

Name http-datacollection-config
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Top-level element for the datacollection-config.xml configuration file.
XML Instance Representation
<http-dc:http-datacollection-config
rrdRepository="string [1] ?">
<http-dc:http-collection> ... </http-dc:http-collection> [0..*]
</http-dc:http-datacollection-config>
Schema Component Representation
<element name="http-datacollection-config">
<complexType>
<sequence>
<element ref=" http-dc:http-collection " minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="rrdRepository" type=" string " use="required"/>
</complexType>
</element>
top

Element: parameter

Name parameter
Type Locally-defined complex type
Nillable no
Abstract no
Documentation Parameters to be used for configuration this strategy.
XML Instance Representation
<http-dc:parameter
key="string [1]"
value="string [1]"/>
Schema Component Representation
<element name="parameter">
<complexType>
<attribute name="key" type=" string " use="required"/>
<attribute name="value" type=" string " use="required"/>
</complexType>
</element>
top

Element: parameters

Name parameters
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:parameters>
<http-dc:parameter> ... </http-dc:parameter> [1..*]
</http-dc:parameters>
Schema Component Representation
<element name="parameters">
<complexType>
<sequence>
<element ref=" http-dc:parameter " minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
top

Element: post

Name post
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:post
parm="string [1]"
value="string [1]"/>
Schema Component Representation
<element name="post">
<complexType>
<attribute name="parm" type=" string " use="required"/>
<attribute name="value" type=" string " use="required"/>
</complexType>
</element>
top

Element: rrd

Name rrd
Type Locally-defined complex type
Nillable no
Abstract no
Documentation RRD parms
XML Instance Representation
<http-dc:rrd
step=" int (value >= 1) [1] ?">
<rra> string (pattern = ^RRA:(AVERAGE|MIN|MAX|LAST):.*$) </rra> [1..*] ?
</http-dc:rrd>
Schema Component Representation
<element name="rrd">
<complexType>
<sequence>
<element name="rra" maxOccurs="unbounded" minOccurs="1">
<simpleType>
<restriction base=" string ">
<pattern value="^RRA:(AVERAGE|MIN|MAX|LAST):.*$"/>
</restriction>
</simpleType>
</element>
</sequence>
<attribute name="step" use="required">
<simpleType>
<restriction base=" int ">
<minInclusive value="1"/>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
top

Element: uri

Name uri
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:uri
name="string [1]">
<http-dc:url> ... </http-dc:url> [1]
<http-dc:attributes> ... </http-dc:attributes> [0..1]
</http-dc:uri>
Schema Component Representation
<element name="uri">
<complexType>
<sequence>
<element ref=" http-dc:url " minOccurs="1" maxOccurs="1"/>
<element ref=" http-dc:attributes " minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="name" type=" string " use="required"/>
</complexType>
</element>
top

Element: uris

Name uris
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:uris>
<http-dc:uri> ... </http-dc:uri> [1..*]
</http-dc:uris>
Schema Component Representation
<element name="uris">
<complexType>
<sequence>
<element ref=" http-dc:uri " minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
top

Element: url

Name url
Type Locally-defined complex type
Nillable no
Abstract no
XML Instance Representation
<http-dc:url
method=" http-dc:allowed-methods [0..1]"
http-version=" http-dc:allowed-versions [0..1]"
user-agent="string [0..1]"
virtual-host="string [0..1]"
scheme="string [0..1]"
user-info="string [0..1]"
host="string [0..1]"
port=" int (value >= 1) [0..1]"
path="string [1]"
query="string [0..1]"
fragment="string [0..1]"
matches="string [0..1]"
response-range="string [0..1]"
canonical-equivalence="boolean [0..1]"
case-insensitive="boolean [0..1]"
comments="boolean [0..1]"
dotall="boolean [0..1]"
literal="boolean [0..1]"
multiline="boolean [0..1]"
unicode-case="boolean [0..1]"
unix-lines="boolean [0..1]">
<http-dc:parameters> ... </http-dc:parameters> [0..1]
</http-dc:url>
Schema Component Representation
<element name="url">
<complexType>
<sequence>
<element ref=" http-dc:parameters " minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="method" type=" http-dc:allowed-methods " use="optional" default="GET"/>
<attribute name="http-version" type=" http-dc:allowed-versions " use="optional" default="1.1"/>
<attribute name="user-agent" type=" string " use="optional"/>
<attribute name="virtual-host" type=" string " use="optional"/>
<attribute name="scheme" type=" string " use="optional" default="http"/>
<attribute name="user-info" type=" string " use="optional"/>
<attribute name="host" type=" string " use="optional" default="${ipaddr}"/>
<attribute name="port" use="optional" default="80">
<simpleType>
<restriction base=" int ">
<minInclusive value="1"/>
</restriction>
</simpleType>
</attribute>
<attribute name="path" type=" string " use="required"/>
<attribute name="query" type=" string " use="optional"/>
<attribute name="fragment" type=" string " use="optional"/>
<attribute name="matches" type=" string " use="optional" default="(.*)"/>
<attribute name="response-range" type=" string " use="optional" default="100-399"/>
<-- regex fields http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html#field_summary -->
<attribute name="canonical-equivalence" type=" boolean " use="optional" default="false"/>
<attribute name="case-insensitive" type=" boolean " use="optional" default="false"/>
<attribute name="comments" type=" boolean " use="optional" default="false"/>
<attribute name="dotall" type=" boolean " use="optional" default="false"/>
<attribute name="literal" type=" boolean " use="optional" default="false"/>
<attribute name="multiline" type=" boolean " use="optional" default="false"/>
<attribute name="unicode-case" type=" boolean " use="optional" default="false"/>
<attribute name="unix-lines" type=" boolean " use="optional" default="false"/>
</complexType>
</element>
top

Global Definitions

Simple Type: allowed-methods

Super-types: string < allowed-methods (by restriction)
Sub-types: None
Name allowed-methods
Content
  • Base XSD Type: string
  • pattern = GET|POST
Schema Component Representation
<simpleType name="allowed-methods">
<restriction base=" string ">
<pattern value="GET|POST"/>
</restriction>
</simpleType>
top

Simple Type: allowed-types

Super-types: string < allowed-types (by restriction)
Sub-types: None
Name allowed-types
Content
  • Base XSD Type: string
  • pattern = ^([Cc](ounter|OUNTER)(32|64)?|[Gg](auge|AUGE)(32|64)?|[Tt](ime|IME)[Tt](icks|ICKS)|[Ii](nteger|NTEGER)(32|64)?|[Oo](ctet|CTET)[Ss](tring|TRING))|[Ss](tring|TRING)$
Documentation Collected data types: counter, gauge, timeticks, integer, octetstring, string. The SNMP type is mapped to one of two RRD supported data types COUNTER or GAUGE, or the string.properties file. The mapping is as follows: SNMP counter -> RRD COUNTER; SNMP gauge, timeticks, integer, octetstring -> RRD GAUGE; SNMP string -> String properties file
Schema Component Representation
<simpleType name="allowed-types">
<restriction base=" string ">
<pattern value="^([Cc](ounter|OUNTER)(32|64)?|[Gg](auge|AUGE)(32|64)?|[Tt](ime|IME)[Tt](icks|ICKS)|[Ii](nteger|NTEGER)(32|64)?|[Oo](ctet|CTET)[Ss](tring|TRING))|[Ss](tring|TRING)$"/>
</restriction>
</simpleType>
top

Simple Type: allowed-versions

Super-types: string < allowed-versions (by restriction)
Sub-types: None
Name allowed-versions
Content
  • Base XSD Type: string
  • pattern = 1\.0|1\.1
Schema Component Representation
<simpleType name="allowed-versions">
<restriction base=" string ">
<pattern value="1\.0|1\.1"/>
</restriction>
</simpleType>
top

Legend

Complex Type:

Schema Component Type

AusAddress

Schema Component Name
Super-types: Address < AusAddress (by extension)
Sub-types:
  • QLDAddress (by restriction)
If this schema component is a type definition, its type hierarchy is shown in a gray-bordered box.
Name AusAddress
Abstract no
The table above displays the properties of this schema component.
XML Instance Representation
<... country="Australia" >
<unitNo> string </unitNo> [0..1]
<houseNo> string </houseNo> [1]
<street> string </street> [1]
Start Choice [1]
<city> string </city> [1]
<town> string </town> [1]
End Choice
<state> AusStates </state> [1]
<postcode> string <<pattern = [1-9][0-9]{3}>> </postcode> [1] ?
</...>

The XML Instance Representation table above shows the schema component's content as an XML instance.

Schema Component Representation
<complexType name="AusAddress">
<complexContent>
<extension base=" Address ">
<sequence>
<element name="state" type=" AusStates "/>
<element name="postcode">
<simpleType>
<restriction base=" string ">
<pattern value="[1-9][0-9]{3}"/>
</restriction>
</simpleType>
</element>
</sequence>
<attribute name="country" type=" string " fixed="Australia"/>
</extension>
</complexContent>
</complexType>
The Schema Component Representation table above displays the underlying XML representation of the schema component. (Annotations are not shown.)
top

Glossary

Abstract (Applies to complex type definitions and element declarations). An abstract element or complex type cannot used to validate an element instance. If there is a reference to an abstract element, only element declarations that can substitute the abstract element can be used to validate the instance. For references to abstract type definitions, only derived types can be used.

All Model Group Child elements can be provided in any order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-all.

Choice Model Group Only one from the list of child elements and model groups can be provided in instances. See: http://www.w3.org/TR/xmlschema-1/#element-choice.

Collapse Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32). Then, collapse contiguous sequences of space characters into single space character, and remove leading and trailing space characters.

Disallowed Substitutions (Applies to element declarations). If substitution is specified, then substitution group members cannot be used in place of the given element declaration to validate element instances. If derivation methods, e.g. extension, restriction, are specified, then the given element declaration will not validate element instances that have types derived from the element declaration's type using the specified derivation methods. Normally, element instances can override their declaration's type by specifying an xsi:type attribute.

Key Constraint Like Uniqueness Constraint, but additionally requires that the specified value(s) must be provided. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Key Reference Constraint Ensures that the specified value(s) must match value(s) from a Key Constraint or Uniqueness Constraint. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

Model Group Groups together element content, specifying the order in which the element content can occur and the number of times the group of element content may be repeated. See: http://www.w3.org/TR/xmlschema-1/#Model_Groups.

Nillable (Applies to element declarations). If an element declaration is nillable, instances can use the xsi:nil attribute. The xsi:nil attribute is the boolean attribute, nil, from the http://www.w3.org/2001/XMLSchema-instance namespace. If an element instance has an xsi:nil attribute set to true, it can be left empty, even though its element declaration may have required content.

Notation A notation is used to identify the format of a piece of data. Values of elements and attributes that are of type, NOTATION, must come from the names of declared notations. See: http://www.w3.org/TR/xmlschema-1/#cNotation_Declarations.

Preserve Whitespace Policy Preserve whitespaces exactly as they appear in instances.

Prohibited Derivations (Applies to type definitions). Derivation methods that cannot be used to create sub-types from a given type definition.

Prohibited Substitutions (Applies to complex type definitions). Prevents sub-types that have been derived using the specified derivation methods from validating element instances in place of the given type definition.

Replace Whitespace Policy Replace tab, line feed, and carriage return characters with space character (Unicode character 32).

Sequence Model Group Child elements and model groups must be provided in the specified order in instances. See: http://www.w3.org/TR/xmlschema-1/#element-sequence.

Substitution Group Elements that are members of a substitution group can be used wherever the head element of the substitution group is referenced.

Substitution Group Exclusions (Applies to element declarations). Prohibits element declarations from nominating themselves as being able to substitute a given element declaration, if they have types that are derived from the original element's type using the specified derivation methods.

Target Namespace The target namespace identifies the namespace that components in this schema belongs to. If no target namespace is provided, then the schema components do not belong to any namespace.

Uniqueness Constraint Ensures uniqueness of an element/attribute value, or a combination of values, within a specified scope. See: http://www.w3.org/TR/xmlschema-1/#cIdentity-constraint_Definitions.

top