D.1 Basic XML schema
24.6473GPPAdvice Of Charge (AOC) using IP Multimedia (IM) Core Network (CN) subsystemRelease 17TS
This annex defines the XML Schema to be used for providing the charging information described in annex C in the SIP methods to the served user. As defined in 3GPP TS 32.280 [10], the information elements “special-arrangement”, "special-code" and "billing-id" are not applicable.
The application/vnd.etsi.aoc+xml MIME type used to provide the charging information requested by the served user shall be coded as following described:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://uri.etsi.org/ngn/params/xml/simservs/aoc" xmlns="http://uri.etsi.org/ngn/params/xml/simservs/aoc" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:annotation>
<xs:documentation xml:lang="en">
XML Schema Definition to the charging information related to the Advice of Charge service.
</xs:documentation>
</xs:annotation>
<xs:element name="aoc" type="aocType"/>
<xs:complexType name="aocType">
<xs:sequence>
<xs:element name="aoc-s" type="aoc-sType" minOccurs="0"/>
<xs:element name="aoc-d" type="aoc-dType" minOccurs="0"/>
<xs:element name="aoc-e" type="aoc-eType" minOccurs="0"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<!– xs:sequence is changed to xs:choice –>
<xs:complexType name="aoc-sType">
<xs:choice>
<xs:element name="special-arrangement" type="xs:token"/>
<xs:element name="charged-items" type="charged-itemsType"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="aoc-dType">
<xs:sequence>
<xs:element name="charging-info" type="charging-infoType" />
<xs:element name="recorded-charges" type="recorded-chargesType" />
<xs:element name="billing-id" type="billind-idType" minOccurs="0" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="aoc-eType">
<xs:sequence>
<xs:element name="recorded-charges" type="recorded-chargesType" />
<xs:element name="billing-id" type="billind-idType" minOccurs="0" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="charged-itemsType">
<xs:sequence>
<xs:element name="basic" type="basicType" minOccurs="0"/>
<xs:element name="communication-attempt" type="communication-attemptType" minOccurs="0"/>
<xs:element name="communication-setup" type="communication-setupType" minOccurs="0"/>
<xs:element name="services" type="servicesType" minOccurs="0" />
<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
<xs:complexType name="basicType">
<xs:sequence>
<xs:element name="price-time" type="price-timeType" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="flat-rate" type="currency-id-amountType" minOccurs="0" />
<xs:element name="free-charge" type="emptyType" minOccurs="0" />
<xs:element name="special-code" type="xs:token" minOccurs="0" />
<xs:element name="not-available" type="emptyType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="communication-attemptType">
<xs:sequence>
<xs:element name="flat-rate" type="currency-id-amountType" minOccurs="0" />
<xs:element name="free-charge" type="emptyType" minOccurs="0" />
<xs:element name="special-code" type="xs:token" minOccurs="0" />
<xs:element name="not-available" type="emptyType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="communication-setupType">
<xs:sequence>
<xs:element name="flat-rate" type="currency-id-amountType" minOccurs="0" />
<xs:element name="free-charge" type="emptyType" minOccurs="0" />
<xs:element name="special-code" type="xs:token" minOccurs="0" />
<xs:element name="not-available" type="emptyType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="servicesType">
<xs:sequence>
<xs:element name="price-time" type="price-timeType" minOccurs="0" />
<xs:element name="flat-rate" type="currency-id-amountType" minOccurs="0" />
<xs:element name="free-charge" type="emptyType" minOccurs="0" />
<xs:element name="special-code" type="xs:token" minOccurs="0" />
<xs:element name="not-available" type="emptyType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<!– length-time-unit: type="timeType" (another possibilty is to keep length-time-unit with type="xs:duration")
granularity: type="timeType" (another possibility is type="xs:duration")
(xs:duration: the minimum resolution is second)
–>
<xs:complexType name="price-timeType">
<xs:sequence>
<xs:element name="currency-id" type="xs:token" minOccurs="0"/>
<!– The currency-id shall be coded according to ISO 4217 [3] or set to the value "UNIT" for the sending of charging units. –>
<xs:element name="currency-amount" type="xs:decimal" minOccurs="0" />
<xs:element name="length-time-unit" type="timeType" minOccurs="0" />
<xs:element name="charging-type" type="charging-typeType" minOccurs="0" />
<xs:element name="granularity" type="timeType" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="currency-id-amountType">
<xs:sequence>
<xs:element name="currency-id" type="xs:token" minOccurs="0"/>
<!– The currency-id shall be coded according to ISO 4217 [3] or set to the value "UNIT" for the sending of charging units. –>
<xs:element name="currency-amount" type="xs:decimal" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<!– timeType is represented with time-unit (unsigned int) * scale (enum) –>
<xs:complexType name="timeType">
<xs:sequence>
<xs:element name="time-unit" type="xs:unsignedInt"/>
<xs:element name="scale" type="scaleType"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="scaleType">
<xs:restriction base="xs:token">
<xs:enumeration value="one-hundreth-second"/>
<xs:enumeration value="one-tenth-second"/>
<xs:enumeration value="one-second"/>
<xs:enumeration value="ten-seconds"/>
<xs:enumeration value="one-minute"/>
<xs:enumeration value="one-hour"/>
<xs:enumeration value="twenty-four-hours"/>
</xs:restriction>
</xs:simpleType>
<!– end of timeType definition –>
<xs:complexType name="emptyType">
<xs:complexContent>
<xs:restriction base="xs:anyType"/>
</xs:complexContent>
</xs:complexType>
<!– simplified –>
<xs:simpleType name="charging-infoType">
<xs:restriction base="xs:token">
<xs:enumeration value="total" />
<xs:enumeration value="subtotal" />
</xs:restriction>
</xs:simpleType>
<!– xs:sequence is changed to xs:choice –>
<xs:complexType name="recorded-chargesType">
<xs:choice>
<xs:element name="recorded-currency-units" type="currency-id-amountType"/>
<xs:element name="free-charge" type="emptyType"/>
<xs:element name="not-available" type="emptyType"/>
</xs:choice>
</xs:complexType>
<xs:simpleType name="billind-idType">
<xs:restriction base="xs:string">
<xs:enumeration value="normal-charging"/>
<xs:enumeration value="reverse-charging"/>
<xs:enumeration value="credit-card"/>
<xs:enumeration value="cfu"/>
<xs:enumeration value="cfb"/>
<xs:enumeration value="cfnr"/>
<xs:enumeration value="cd"/>
<xs:enumeration value="ct"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="charging-typeType">
<xs:restriction base="xs:string">
<xs:enumeration value="step-functon" />
<xs:enumeration value="continuous" />
</xs:restriction>
</xs:simpleType>
</xs:schema>