<?xml version="1.0" encoding="UTF-8"?>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/modules/Common.mod#6 $
-->

<!--
    A few character entities the XML recommendation says should be defined
    "for interoperability" with existing SGML parsers.  By default, these
    are not included to avoid warnings (about entity redefinition) from
    many XML parsers.
-->
<!ENTITY % SGML-help "IGNORE">
<![%SGML-help;[
<!ENTITY lt     "&#38;#60;">
<!ENTITY gt     "&#62;">
<!ENTITY amp    "&#38;#38;">
<!ENTITY apos   "&#39;">
<!ENTITY quot   "&#34;">
]]>

<!--
    Common types used throughout the cXML definition.

    The types try to follow the XML DATA definition submitted to the W3C. See
    the following for more information,

        http://msdn.microsoft.com/xml/reference/schema/datatypes.asp
        http://www.w3c.org/TR/1998/NOTE-XML-data-0105/

-->

<!-- Atomic-level Types -->
<!ENTITY % bin.base64 "CDATA">
<!ENTITY % bin.hex "CDATA">
<!ENTITY % boolean "(0 | 1)">    <!-- 0 is false, 1 is true -->
<!ENTITY % char "CDATA">
<!ENTITY % date "CDATA">
<!ENTITY % datetime.tz "CDATA">  <!-- Time zone is required -->
<!ENTITY % fixed.14.4 "CDATA">
<!ENTITY % i8 "CDATA">
<!ENTITY % int "%i8;">
<!ENTITY % r8 "CDATA">
<!ENTITY % number "CDATA">       <!-- No limit on number of digits, unlike
                                      %r8; -->
<!ENTITY % string "CDATA">
<!ENTITY % time.tz "CDATA">      <!-- Time zone is required -->
<!ENTITY % duration "CDATA">      <!--ISO8601 duration http://www.w3.org/TR/xmlschema-2/#duration  -->
<!ENTITY % ui8 "CDATA">
<!ENTITY % uint "%ui8;">         <!-- Unique to this specification -->
<!ENTITY % uri "CDATA">
<!ENTITY % uuid "CDATA">

<!-- Higher-level Types -->
<!--
    NOTE: The following is a temporary *hack* to allow empty values for
    some attributes with these types.  The nmtoken entity should resolve to
    NMTOKEN.
-->
<!ENTITY % nmtoken "CDATA">      <!-- Any combination of XML name chars. -->
<!ENTITY % isoLangCode "%nmtoken;">         <!-- ISO 639 Language Code -->
<!ENTITY % isoCountryCode "%nmtoken;">      <!-- ISO 3166 Country Code -->
<!ENTITY % isoStateCode "%nmtoken;">      <!-- ISO 3166-2:2013 Country Subdivision (State) Code -->
<!ENTITY % isoCurrencyCode "%nmtoken;">     <!-- ISO 4217 Currency Code -->
<!ENTITY % xmlLangCode "%nmtoken;"> <!-- Language code as defined by XML
                                         recommendation: Language and
					 country. -->
<!ENTITY % URL "%uri;">
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Base.mod#2 $
-->

<!--
    This file defines the basic elements used to build higher level
    constructs in cXML.
-->

<!-- Basic Name/Data Elements -->
<!--
    Name is used to provide an identifier for other elements.

    xml:lang
        The language in which the name is written.
-->
<!ELEMENT Name (#PCDATA)> <!-- string -->
<!ATTLIST Name
    xml:lang  %xmlLangCode;  #REQUIRED
>

<!--
    An Extrinsic is an element which can be used to extend the data
    associated with known elements.

    Since this Element is of type ANY, it could contain any arbitrary XML
    document within itself, or a binary ![CDATA[]] document.

    name
        Name used to identify this extrinsic.
-->
<!ELEMENT Extrinsic ANY>
<!ATTLIST Extrinsic
    name  %string;  #REQUIRED
>

<!--
    Description is a string which describes something.
    Though text may be interspersed with ShortName elements in this content
    model, placing the ShortName at the beginning or end of the element is
    much preferred.  At most one ShortName element is allowed per
    Description.  The intended content model would be more like
    (( ShortName, #PCDATA ) | ( #PCDATA | ShortName? )) if DTD syntax
    supported it.

    xml:lang
        The language in which the description is written.
    type
        The qualifier of the description.
-->
<!ELEMENT Description ( #PCDATA | ShortName )* > <!-- mixed: string and
                                                      ShortName -->
<!ATTLIST Description
    xml:lang  %xmlLangCode;  #REQUIRED
    type  %string;   #IMPLIED
>

<!--
    A short string which describes something in fewer characters than the
    entire Description.  This should be used when limited space is available.
    For example, a table of elements might show the ShortName's of each.  A
    linked "details" view would show the entire Description (including the
    ShortName).  Without a ShortName, the user interface must default to a
    truncation of the Description.
    This element does not require an xml:lang attribute since it appears only
    within a Description element.  The language of the ShortName must match
    that of the surrounding Description.
-->
<!ELEMENT ShortName (#PCDATA)> <!-- string -->

<!-- Telephone Number Elements -->
<!--
    International ITU dial code for the country code in question.  This
    code would be entered after any escape code necessary to begin
    International dialing.  That is, the escape code does not appear in the
    content of this element.

    isoCountryCode
        The ISO 3166 2-letter country code for the dial code in question.
-->
<!ELEMENT CountryCode (#PCDATA)> <!-- uint -->
<!ATTLIST CountryCode
    isoCountryCode  %isoCountryCode;  #REQUIRED
>

<!--
    The areacode or city code within a CountryCode.
-->
<!ELEMENT AreaOrCityCode (#PCDATA)> <!-- uint -->

<!--
    The local number part of a telephone number.
-->
<!ELEMENT Number (#PCDATA)> <!-- string -->

<!--
    An extension within relative to the Number element. This element has no
    meaning without an associated Number element.
-->
<!ELEMENT Extension (#PCDATA)> <!-- uint -->

<!--
    TelephoneNumber represents international telephone numbers.
-->
<!ELEMENT TelephoneNumber (CountryCode, AreaOrCityCode, Number, Extension?)>

<!--
     Phone is a "named" TelephoneNumber.

     name
          specifies an identifier which indicates the type of phone number.
          US examples would include "work","home", etc.
-->
<!ELEMENT Phone (TelephoneNumber)>
<!ATTLIST Phone
    name  %string;  #IMPLIED
>

<!--
    Fax number.
-->
<!ELEMENT Fax (TelephoneNumber | URL | Email)>
<!ATTLIST Fax
    name  %string;  #IMPLIED
>

<!-- Addressing Elements -->
<!--
    URL. A string which represents a URL
-->
<!ELEMENT URL (#PCDATA)> <!-- URL -->
<!ATTLIST URL
    name  %string;  #IMPLIED
>

<!--
    An email address. Address must conform to RFC 821 (SMTP Standard).

    preferredLang
        optional language that the email owner prefers to receive
        emails in. Refer to the definition of xmlLangCode entity.

-->
<!ELEMENT Email (#PCDATA)> <!-- string -->
<!ATTLIST Email
    name          %string;       #IMPLIED
    preferredLang %xmlLangCode;  #IMPLIED
>

<!--
    Contact represents an entity at a location. The nature of this
    element is that it represents a communication "end point" for a
    location.


   IdReference
       ID reference is Within the application context (for example,
a certain pair of buyer and supplier),
       the (identifier, domain) pair
 should be unique.
    role
        Position this person or group plays in the procurement process.
        Likely values include endUser, administrator, purchasingAgent,
        technicalSupport, customerService, sales,
        supplierCorporate, supplierMasterAccount, supplierAccount,
        buyerCorporate, buyerMasterAccount, buyerAccount, buyer,
        subsequentBuyer. Other values may be allowed in some cases.

        from and to roles are reserved for future use.

    addressID
        An id for the address. Needed to support address codes for
        relationships that require id references. Example: plantID

     addressIDDomain
	It is the qualifier for the addressId to specify the agency or organization. Examples are DUNS, ILN and buyerLocationID.

-->
<!ELEMENT Contact (Name, PostalAddress*, Email*, Phone*, Fax*, URL*, IdReference*, Extrinsic*)>
<!ATTLIST Contact
    role             NMTOKEN           #IMPLIED
    addressID        %string;          #IMPLIED
    addressIDDomain   %string;   #IMPLIED
>

<!--
    The DeliverTo part of an Address. This would be internal to the actual
    address know to the outside world. Similar to what an extension is to a
    TelephoneNumber.
-->
<!ELEMENT DeliverTo (#PCDATA)> <!-- string -->

<!--
    Street is a single line of an Address' location.
-->
<!ELEMENT Street (#PCDATA)> <!-- string -->

<!--
    City is the name of the city in an Address' location.

    cityCode
        Optional code assigned by local/government agencies identifying a city region
-->
<!ELEMENT City (#PCDATA)> <!-- string -->
<!ATTLIST City
    cityCode  %string;  #IMPLIED
>

<!--
    State is an optional state identifier in an Address' location.

    isoStateCode
        The ISO 3166-2:2013 country subdivision (state) code for this country.
        Universally applicable code for the representation of the names of
        principal administrative divisions of countries and territories included
        in ISO 3166-1. It is intended to be used in conjunction with ISO 3166-1.
-->
<!ELEMENT State (#PCDATA)> <!-- string -->
<!ATTLIST State
    isoStateCode  %isoStateCode;  #IMPLIED
>

<!--
    PostalCode (I have no idea how to describe it)
-->
<!ELEMENT PostalCode (#PCDATA)> <!-- string -->

<!--
    Country is the name of the country in an Address' location.  The
    content of this element is a string which may (for example) be printed
    directly to a shipping label.  The content is the human-readable
    equivalent of the isoCountryCode used by applications.

    isoCountryCode
        The ISO 3166 2-letter country code for this country.
-->
<!ELEMENT Country (#PCDATA)> <!-- string -->
<!ATTLIST Country
    isoCountryCode  %isoCountryCode;  #REQUIRED
>

<!--
    Municipality specifies the name of the municipality in an Address’ location.

    municipalityCode
        Optional code assigned by local/government agencies identifying a municipality region
-->
<!ELEMENT Municipality (#PCDATA)> <!-- string -->
<!ATTLIST Municipality
    municipalityCode  %string;  #IMPLIED
>


<!--
    PostalAddress is a real-world location for a business or person.
-->
<!ELEMENT PostalAddress (DeliverTo*, Street+, City, Municipality?, State?,
                         PostalCode?, Country, Extrinsic*)>
<!ATTLIST PostalAddress
    name  %string;  #IMPLIED
>

<!--
    Address is the association of a Contact and an Location.

    isoCountryCode
        The ISO 3166 2-letter country code for the country containing this
        location.

    addressID
        An id for the address.  Needed to support address codes for
        relationships that require id references.  An example would be a
        shipping code.

     addressIDDomain
	It is the qualifier for the addressId to specify the agency or organization. Examples are DUNS and ILN.
-->
<!ELEMENT Address (Name, PostalAddress?, Email?, Phone?, Fax?, URL?)>
<!ATTLIST Address
    isoCountryCode  %isoCountryCode;  #IMPLIED
    addressID       %string;          #IMPLIED
    addressIDDomain   %string;   #IMPLIED
>

<!--
    Defines the parties involved in a document (e.g. service entry sheet),
    including fieldContractor, fieldEngineer and requester.

    Contact
        Contact information for the document (e.g. service entry sheet) partners.
        Allowed contact roles include fieldContractor, fieldEngineer and requester.

    IdReference
        Partner reference ID, including party ID, supplier tax ID, etc.
-->
<!ELEMENT PartnerContact (Contact, IdReference*)>

<!--
    Defines the information of the issuer who is associated to the customs info document.

    Address
        Defines the real world location of the issuer
-->
<!ELEMENT Issuer ( Address )>

<!-- Financial Elements -->
<!--
    Money is the representation of the object used to pay for items.

    currency
        specifies the currency in which amount is stated, must conform to ISO
        4217 currency codes.

    alternateAmount
        the amount of money in the alternateCurrency. Optional and used to
        support dual-currency requirements such as the Euro.

    alternateCurrency
        specifies the currency in which the alternateAmount is stated, must
        conform to ISO 4217 currency codes.
-->
<!ELEMENT Money (#PCDATA)> <!-- number -->
<!ATTLIST Money
    currency           %isoCurrencyCode;  #REQUIRED
    alternateAmount    %number;           #IMPLIED
    alternateCurrency  %isoCurrencyCode;  #IMPLIED
>

<!--
    Optional textual child for communicating arbitrary comments or
    description along with the parent.
    Though text may be interspersed with Attachment elements in this content
    model, grouping the Attachment list at the begging or end of the element
    is much preferred.  The intended content model would be more like
    (( Attachment+, #PCDATA ) | ( #PCDATA | Attachment* )) if the DTD syntax
    supported it.

    xml:lang
        The language in which the Comments are written.  This attribute
    will be required in a future version of cXML.  (Leaving it out is
    deprecated.)

    type
        An optional type of the comments. Type can be used to make the comments
        structured with respect to what they describe.
-->
<!ELEMENT Comments ( #PCDATA | Attachment )* > <!-- mixed: string and
                                                    opt. Attachment list -->
<!ATTLIST Comments
    xml:lang  %xmlLangCode;  #IMPLIED
    type      %string;       #IMPLIED
>

<!--
    Optional child of Comments element referencing a part in a multipart MIME
    transmission.

    The contained URL must use the scheme "cid:".  This is the identifier for
    the referenced attachment within the larger transmission.  Must match the
    Content-ID header of one (and only one) part of the MIME transmission
    containing this cXML document.  May also be used to retrieve the
    attachment file separately.

    visibility
        Optional attribute that gives a hint as to how an attachment should
        be interpreted.  If the value is "internal”, it will give a hint to
        the consumer of the attachment, that the attachment is meant for
        internal purposes only.

-->
<!ELEMENT Attachment (URL)>
<!ATTLIST Attachment
    visibility (internal)  #IMPLIED
>

<!---
    Reference to a remote attachment.

    AttachmentReference is used inside Extrinsic elements that have a
    predefined name of "Attachments".

    In the context of AttachmentReference, the domain attribute of
    InternalID is currently optional. However, as a way to prevent
    circular request paths, the sending application may use a
    predefined value of "local" to indicate that the attachment
    requested is local to the other application.

    This optional URL element should link to a referenced source on the buyer’s
    system. The URL scheme must conform to RFC 1738 (Uniform Resource Locators).
    Both https and http transmission protocols are supported, however due to
    security reasons we highly recommend to use https with the latest TLS set
    only.
    
    length
        length of the attachment in bytes.
        
    version
        specifies the version of the external source. Examples: 1.0, beta, V-2.           
-->
<!ELEMENT AttachmentReference (Name, Description, InternalID, URL?)>
<!ATTLIST AttachmentReference
    length  %uint;  #IMPLIED
    version     %string; #IMPLIED 
>

<!--
    Price per unit of item.  Optional Modifications
    (changes due to discounts or fixed amount) may be provided.
    The Money element indicates the final amount after applying the
    Modifications.
-->
<!ELEMENT UnitPrice (Money, Modifications?)>

<!--
    Reference to an earlier document (for example, OrderRequest).  In a
    StatusUpdateRequest, this element identifies the purchase order to be
    updated.

    payloadID
        A unique identifier for the document.  Copied directly from the
        cXML element of the original document.
-->
<!ELEMENT DocumentReference EMPTY>
<!ATTLIST DocumentReference
    payloadID       %string;      #REQUIRED
>

<!ELEMENT InternalID (#PCDATA)> <!-- string -->
<!ATTLIST InternalID
    domain   %string;  #IMPLIED
>

<!-- ====
    Common to most variants of the PunchOut transaction set.  Defined here
    to be easily shared between multiple DTD files without requiring
    inclusion of Transaction.mod in all of them.

    All of the PunchOut transaction sets include an originating Request
    (ProviderSetupRequest for example), relatively simple Response
    (PunchOutSetupResponse for example) and final Message
    (ProviderDoneMessage or PunchOutOrderMessage).  The Request and
    Response comprise a back-end transaction between two cooperating
    applications that wish to extend an interactive session from one to the
    other.  The Request provides the destination application with
    authentication, identification and other setup information.  The
    Response provides the originating application with a unique starting
    location for the interactive (HTML) session at the destination system.

    After receiving a Response of this type, the originating application
    redirects the user's browser to the provided location.  (For some
    non-HTML applications, opening a new browser window at that location
    may be more appropriate.)  The destination system eventually provides
    an HTML form to the user's browser.  This form submits the final
    Message to close the remote session, return that user to the
    originating application and carry any required information back to the
    originating application.
==== -->

<!--
    OriginatorCookie - Identification of a specific PunchOut session.  Used
    in both originating Request and later Message that returns user to
    originating application.

    Note: The BuyerCookie element used in a 'regular' PunchOut transaction
    (defined in Transaction.mod) is of type ANY.  That does not seem
    useful.  The string required below better matches the needs for this
    element.  Future transactions similar to the PunchOut transaction will
    use this element.
-->
<!ELEMENT OriginatorCookie (#PCDATA)>

<!--
    BrowserFormPost - Location to which the user's browser must submit the
    final Message.  This location (carried in the originating Request) does
    not need to be specific to a PunchOut session since the
    OriginatorCookie is returned in the Message.
-->
<!ELEMENT BrowserFormPost (URL)>

<!--
    SelectedService - Identification of a service offered by this provider
    and requested in this transaction.  Used only in the originating
    Request.
-->
<!ELEMENT SelectedService (#PCDATA)>

<!--
    StartPage - Location to which the user's browser must be redirected to
    begin the interactive portion of the session at the remote site.  The
    destination system returns this information in the Response document.
    This location must be specific to a particular session.  It is
    effectively a one time key, providing authenticated entry into the
    destination system.
-->
<!ELEMENT StartPage (URL)>

<!--
    ReturnData - Any information the originator must know about the
    completed operation at the provider site.  The ReturnValue is for
    applications; the Name is for human consumption (direct presentation in
    the User Interface of the application).  Where appropriate for the
    possible services, this element may appear in the final Message for a
    PunchOut session.

    name
        An identifier for the data returned.  Provides a meaning for the
        contents of a ReturnData element.
-->
<!ELEMENT ReturnData (ReturnValue, Name)>
<!ATTLIST ReturnData
    name  %string;  #IMPLIED
>

<!ELEMENT ReturnValue (#PCDATA)>

<!--
    Defines a time range. The start and end can be unbounded
    startDate
        The starting date of the time range
    endDate
        The ending date of the range
-->
<!ELEMENT TimeRange EMPTY>
<!ATTLIST TimeRange
    startDate      %datetime.tz;         #IMPLIED
    endDate        %datetime.tz;         #IMPLIED
>

<!--
    Defines a period in time.

    startDate
        The starting date of the period

    endDate
        The ending date of the period
-->
<!ELEMENT Period EMPTY>
<!ATTLIST Period
    startDate      %datetime.tz;         #REQUIRED
    endDate        %datetime.tz;         #REQUIRED
>

<!--
    Must be a UN/CEFACT (Recommendation 20) unit of measure code.
-->
<!ELEMENT UnitOfMeasure (#PCDATA)> <!-- nmtoken -->


<!--
    Define the quantity as quoted in the UnitPrice

    UnitOfMeasure
	The unit of measure for the quote
    Description
	The textual description of the quote
    quantity
	the quantity basis for the quote
    conversionFactor
	the conversion ratio from the unit of measure of the order to the unit of measure of the PriceBasisQuantity
-->
<!ELEMENT PriceBasisQuantity (UnitOfMeasure, Description?)>
<!ATTLIST PriceBasisQuantity
    quantity         %r8;    #REQUIRED
    conversionFactor %r8;    #REQUIRED
>



<!--
    Defines a reference to a term which is defined
    in another document.

    termName
        The name of the ID attribute containing the term.

    term
        The value of that attribute (i.e., the term itself).

-->
<!ELEMENT TermReference EMPTY>
<!ATTLIST TermReference
	termName %string; #REQUIRED
	term %string; #REQUIRED
>

<!--
    Defines an optionally named monetary rate at which goods or services are
    charged or paid.

    Money
        The amount of Money per UnitOfMeasure to be charged or paid.

    UnitOfMeasure
        Unit of measure.

    PriceBasisQuantity
	the quantity the price is quoted on

    TermReference
        Identifies the definition of this UnitRate
        (found, for example,  in contracts, master agreements, and other documents
        which may or may not be cXML documents).
-->
<!ELEMENT UnitRate (
    Money,
    UnitOfMeasure,
    PriceBasisQuantity?,
    TermReference?
)>

<!--
    The rate information used to define the rate of a purchase.  For
    example, this could be the total room rate for 4 nights of stay
    at a hotel.

    Total
        The total amount for the rate.  The total amount must equal
        to quantity x UnitRate.

    UnitRate
        The single unit rate.

    Description
        Textual description for the rate.  For example, hotel nightly rate.

    Quantity
        The quantity.  For example, a 4 nights stay at a hotel will
        have quantity set to 4 with UnitofMesure in UnitRate set to Day.
-->
<!ELEMENT Rate (Total, UnitRate, Description?)>
<!ATTLIST Rate
    quantity    %r8;    #REQUIRED
>

<!--
    The total for something.
-->
<!ELEMENT Total (Money, Modifications?)>

<!--
    Tolerances for price, quantity, delivery date.
-->
<!ELEMENT Tolerances (QuantityTolerance?, PriceTolerance?, TimeTolerance?)>

<!ELEMENT QuantityTolerance (Percentage | Value)>

<!ELEMENT PriceTolerance (Percentage | Money)>

<!--
    Defines a certain amount of days which is used to check if a concrete
    delivery date is within the tolerance regarding the requested
    delivery date.

    limit
        Amount of time in 'type' relative to the requested delivery date is it allowed to deliver?
    type
        Specifies how the limit should be interpreted.
-->
<!ELEMENT TimeTolerance EMPTY>
<!ATTLIST TimeTolerance
    limit %int; #REQUIRED
    type  (minutes | hours | days | weeks) "days"
>

<!-- Upper tolerances defines an upper limit -->
<!ELEMENT Upper (Tolerances)>
<!-- Lower tolerances defines a lower limit -->
<!ELEMENT Lower (Tolerances)>

<!ELEMENT TaxAmount (Money)>

<!ELEMENT TaxableAmount (Money)>

<!--
    One language-specific string for the location of tax,
    e.g. London, Canada, California, etc.

    xml:lang
        The language or locale in which the location of tax is written.
-->
<!ELEMENT TaxLocation (#PCDATA)>              <!-- string -->
<!ATTLIST TaxLocation
   xml:lang              %xmlLangCode;         #REQUIRED
>

<!--

    TriangularTransactionLawReference indicates the relevant law as
    titled for the local jurisdiction in the scenario of a triangular
    transaction.  ex: Triangulation, article 28c,E paragraph 3 of the
    6th EU VAT Directive

    xml:lang
        the language in which the law reference is written.
-->
<!ELEMENT TriangularTransactionLawReference (#PCDATA)>
<!ATTLIST TriangularTransactionLawReference
    xml:lang   %xmlLangCode;    #REQUIRED
>

<!--

    If you claim an exemption from taxes, 
	some tax authorities, such as Portugal SAF-T, 
	require you to specify an exemption code and exemption reason.
	
	exemptCode
        specifies the code against which the tax is exempted.
-->

<!ELEMENT TaxExemption (ExemptReason?)>
<!ATTLIST TaxExemption
    exemptCode    %string;      #REQUIRED 
>

<!--

	ExemptReason
		specifies the exemption reason for zero tax.
		
		This would have no relation with the existing "exemptDetail" attribute.
		Existing attribute "exemptDetail" will not be ignored and this will also will be kept along with the new element "ExemptReason".

	xml:lang
        the language in which the exemption reason is written.
				
-->

<!ELEMENT  ExemptReason  (#PCDATA) >
<!ATTLIST  ExemptReason
    xml:lang   %xmlLangCode;    #REQUIRED 
>


<!--
    Defines details of one type of tax.

    TaxableAmount
       The taxable amount.

    TaxAmount
       The tax amount.

    TaxLocation
       The tax location.

    Description
       The textual description of the current type of tax.

    TriangularTransactionLawReference
       The law reference for transactions where isTriangularTransaction is True

    purpose
       The purpose of the tax, e.g., tax (tax), custom duty, shippingTax,
       specialHandlingTax, etc.

    category
       The tax category, Sales tax (sales), Use tax (usage), VAT (vat),
       GST (gst) are defined categories. Other values are permitted.

    percentageRate
       The tax rate in number of percentage.

    isVatRecoverable
       True if the VAT is recoverable.  Default is false.

    taxPointDate
       refers to the date on which VAT becomes due.

    paymentDate
       indicate the date when payment must be made.

    isTriangularTransaction
       True if the transaction is triangular.  Default is false.

    exemptDetail
       If the TaxAmount is zero, VAT or other regulations may require
       a reason why.  zeroRated means the tax rate is zero.  exempt
       means the item or items are exempt from taxation.
	   
	taxRateType
	   Specify the tax rate type code(a string) that corresponds to a specific tax type. 
 	   For example, in Germany the tax rate of 19% for value-added tax (VAT) corresponds to the “Standard” tax rate type. 
 	   In different EU member states, different VAT rates are allowed. 
 	   The tax rate type makes it easy for the back-end system to handle different rates that result from changes in tax law.

    basePercentageRate
       The base tax rate in number of percentage.
       For some Tax categories (eg, ICMS for Brazil) TaxAmount will be calculated
       considering the basePercentageRate along with percentageRate.
       TaxAmount = TaxableAmount * percentageRate * basePercentageRate
       Used only in the Quote Messages.

    isIncludedInPrice
       True if the TaxAmount is included in price. Default is false.
       Used only in the Quote Messages.

-->
<!ELEMENT TaxDetail (TaxableAmount?, TaxAmount, TaxLocation?, Description?,
                     TriangularTransactionLawReference?, TaxRegime?, TaxExemption?,
					 Extrinsic*)>
<!ATTLIST TaxDetail
    taxedElement            IDREF          #IMPLIED
	purpose                 %string;       #IMPLIED
    category                %string;       #REQUIRED
    percentageRate          %r8;           #IMPLIED
    isVatRecoverable        (yes)          #IMPLIED
    taxPointDate            %datetime.tz;  #IMPLIED
    paymentDate             %datetime.tz;  #IMPLIED
    isTriangularTransaction (yes)          #IMPLIED
    exemptDetail            (zeroRated | exempt)  #IMPLIED
	isWithholdingTax        (yes)          #IMPLIED
	taxRateType				%string;	   #IMPLIED
    basePercentageRate      %r8;           #IMPLIED
    isIncludedInPrice       (yes)          #IMPLIED
>

<!--   TaxRegime is related to the type of supplier activities and the
	commodities in the invoice. Companies pay taxes based on the tax regime
	they are enrolled.   Sample tax regimes: Assimilated Regime wages, Regime
	of Small Taxpayers (REPECO), Regimen of business and professional activities,
	etc. Multiple tax regimes can be associated with a single invoice.
-->

<!ELEMENT TaxRegime (#PCDATA)>


<!--
    Definition of a cXML Tax item. This represents what a Tax element should
    be in the classic notion of a line on a PO or Invoice. It can also
    represent a per-lineitem tax element depending on where it appears
    (inside of a item ELEMENT or inside of a something like a supplierOrder
    ELEMENT).

    Represents a tax item in the shopping basket. There could be one of these
    for the entire order, or one per lineitem.

    The total amount of taxes for the line item or order should be reflected
    in the Money element. The breakdown of taxes, for example, tax on shipping
    or tax on goods should be represented in separate TaxDetail elements.
-->
<!ELEMENT Tax (Money, Description, TaxDetail*, Distribution*, Extrinsic*)>

<!--
    Defines a Modifications element which provides the original unit
    price or shipping price and then describes a set of 1 or more
    modifications to that price.  There can one per Shipping element.
    The optional method attribute defines how multiple Modification elements
    are combined.
-->
<!ELEMENT Modifications (Modification+)>

<!--
    Defines the original price or shipping price and optionally provides a type.
    Example type values might be MSRP, ListPrice, Actual, AverageSellingPrice,
    CalculationGross, BaseCharge, AverageWholesalePrice, ExportPrice, AlternatePrice,
    ContractPrice, etc.
-->
<!ELEMENT OriginalPrice (Money)>
<!ATTLIST OriginalPrice
    type            %string;  #IMPLIED
>

<!--
    Defines a Modification element and optionally provide a level: AdditionalDeduction: used only when allownces are involved
     AdditionalCost: used when additional charges are involved
     OriginalPrice represents the price on which the discount or charges apply.
     Tax represents the Tax on the Modification

	 Optional attribute level represent level of modification(using in cascading modifications).
	 Example:
	 Charge 1 (Level 1): Original Price 10$ Charge: 1$
	 Charge 2 (Level 1): Original Price 10$ Charge: 1$
	 Charge 3 (Level 2): Original Price 8$ Charge: 1$
	 Charge 4 (Level 3): Original Price 7$ Charge: 1$ ...
-->
<!ELEMENT Modification (OriginalPrice?, (AdditionalDeduction | AdditionalCost), Tax?, ModificationDetail?)>

<!ATTLIST Modification
level            %uint;  #IMPLIED
>

<!--
The type attribute can specify the type of deduction.
Eg. discount -->
<!ELEMENT AdditionalDeduction (DeductionAmount | DeductionPercent | DeductedPrice)>
<!ATTLIST AdditionalDeduction
    type            %string;  #IMPLIED
>

<!ELEMENT ModificationDetail (Description?, Extrinsic*)>
<!ATTLIST ModificationDetail
    name             %string;  #REQUIRED
	code             %string;  #IMPLIED
    startDate        %datetime.tz;  #IMPLIED
    endDate          %datetime.tz;  #IMPLIED
 >

 <!ELEMENT Value EMPTY>
 <!ATTLIST Value
	value            %number;       #REQUIRED
 >

 <!ELEMENT Percentage EMPTY>
 <!ATTLIST Percentage
 	percent          %r8;           #REQUIRED
 >

 <!--
	The Money element is the final cost amount for this Additional Cost or Charge
 	DO NOT USE THIS ELEMENT FOR SHIPPING, SPECIAL HANDLING, FREIGHT, etc
 -->
 <!ELEMENT AdditionalCost (Money|Percentage)>

<!--
    Defines discount applied.

    DiscountAmount
        	The discount expressed as a flat amount with currency.

    DiscountPercent
        	The discount rate expressed as a percentage.
-->
<!ELEMENT Discount (DiscountPercent | DiscountAmount)>


<!-- Defines the Basis for the Discount. -->

<!ELEMENT DiscountBasis (Money)>

<!-- Defines the details of adjustments given over category and region -->

<!ELEMENT TaxAdjustmentDetail (Money)>

<!ATTLIST TaxAdjustmentDetail
    category    %string;        #REQUIRED
    region      %string;        #IMPLIED
>

<!--
    Defines TaxAdjustment given on the Total Tax, currently to be used with PPR document
    to specify the total adjustments given on the Tax for the payable.

    Money
        Describes the Total Tax Adjustment given on the payable.

    TaxAdjustmentDetail
        Describes the list of all the Adjustments given on the payable on
        the basis of tax category and region.
-->
<!ELEMENT TaxAdjustment (Money, TaxAdjustmentDetail*)>

<!--
    Defines the discount rate

    percent
        The discount rate expressed as a percentage.  A negative discount percent
        represents a penalty.
-->
<!ELEMENT DiscountPercent EMPTY>
<!ATTLIST DiscountPercent
	percent          %r8;           #REQUIRED
>

<!--
    Defines the deduction rate

    percent
        The deduction rate expressed as a percentage.
-->
<!ELEMENT DeductionPercent EMPTY>
<!ATTLIST DeductionPercent
	percent          %r8;           #REQUIRED
>

<!--
    The ProductMovementItemIDInfo element provides a clear reference to the line item
    in a Consignment Movement.

    movementLineNumber
        The line number of current line item, copied from movement document.

    movementID
       The id of a consignment movement entry known to the buyer system.

    movementDate
        The date and time the product was moved from consignment inventory to the buyer inventory.
-->
<!ELEMENT ProductMovementItemIDInfo (IdReference*)>
<!ATTLIST ProductMovementItemIDInfo
    movementLineNumber        %uint;              #REQUIRED
    movementID                %string;            #REQUIRED
    movementDate              %datetime.tz;       #REQUIRED
>


<!-- The InvoiceItemIDInfo element provides a clear reference to the line item  in a InvoiceDetailRequest document.

    invoiceLineNumber
        The line number of a line item, copied from InvoiceDetailRequest.

    invoiceID
        The id of an invoice known to the supplier system.

    invoiceDate
        The invoice date.
-->
<!ELEMENT InvoiceItemIDInfo (IdReference*)>
<!ATTLIST InvoiceItemIDInfo
    invoiceLineNumber        %uint;              #REQUIRED
    invoiceID                %string;            #REQUIRED
    invoiceDate              %datetime.tz;       #IMPLIED
>

<!--
  ReturnQuantity
    Quantity that was returned.
-->
<!ELEMENT ReturnQuantity (UnitOfMeasure)>

<!ATTLIST ReturnQuantity
    quantity        %r8; #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/modules/Version.mod#4 $
-->

<!--
     Another top-level entity used in Transport.mod.  Defined here to allow
     easy updates to the release version of cXML without opening
     Transport.mod.  This should also provide an easy file to search for
     the current release version string.
-->

<!-- cxml.version
    Current default string for the cXML@version attribute.  Corresponds to
    the final directory of the SYSTEM identifier used in all up-to-date
    cXML documents.
    For easy parsing of this file, do not remove whitespace surrounding the
    actual version string.
-->
<!ENTITY cxml.version "1.2.035" >
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

	$Id: //ariba/cxml/schema/Modules/Industry.mod#1$
-->

<!-- ====
    Allow this module to be built separately from any other DTD file.
==== -->

<!--
    Characteristic contains detailed information about an item that can be used across different industries.
    Can also be used to send material characteristics to support configurable material process. 

	Domain - Type of Characteristic
		Examples: size, sizeCode, color, colorCode , quality, qualityCode, grade, gradeCode 
	Value  - Value for the domain.
	code - For information such as currency code and unit of measure
-->
<!ELEMENT Characteristic EMPTY>
<!ATTLIST Characteristic
	domain	%string;   #REQUIRED
	value  	%string;   #REQUIRED
	code 	%string;   #IMPLIED >
	
<!-- Usage of EANID is deprecated! Use IdReference and proper domain within ItemID instead.

    Number assigned to a manufacturer's product according to the International Article Numbering Association or UPC(Universal Product Code) for an article.-->
<!ELEMENT EANID (#PCDATA)> <!-- string -->

<!-- European Waste Catalogue is a unique ID for articles listed in the EU Waste Catalogue (EWC). It requires special handling -->
<!ELEMENT EuropeanWasteCatalogID (#PCDATA)>

<!-- Number assigned by a supplier to a special promotion activity. Promotions affect the forward planning/ordering process (and the related pricing) -->
<!ELEMENT PromotionDealID (#PCDATA)> <!-- string -->

<!-- The item number is a promotional variant number. Used when only one or some variants of an article are promoted-->
<!ELEMENT PromotionVariantID (#PCDATA)> <!-- string -->


<!-- Total retail value of all products -->
<!ELEMENT TotalRetailAmount (Money)>

<!-- Information price, excluding allowances or charges, and taxes. The price stated is for information purposes only -->
<!ELEMENT InformationalAmount (Money)>

<!-- Gross monetary amount paid or to be paid at intervals -->
<!ELEMENT GrossProgressPaymentAmount (Money)>

<!-- Deposit amount charged for returnable items (boxes, containers, pallets…)-->
<!ELEMENT TotalReturnableItemsDepositAmount (Money)>

<!-- Total amount of goods and services excluding deposits for returnable goods -->
<!ELEMENT GoodsAndServiceAmount (Money)>

<!-- Specific exact amount -->
<!ELEMENT ExactAmount (Money)>

<!-- Groups all the additional amounts -->
<!ELEMENT AdditionalAmounts (TotalRetailAmount?, InformationalAmount?, GrossProgressPaymentAmount?, 
					TotalReturnableItemsDepositAmount?, GoodsAndServiceAmount?,  ExactAmount? )>

<!--Price value per unit (gross price) -->
<!ELEMENT UnitGrossPrice (Money, PriceBasisQuantity?)>

<!--Information price, excluding allowances or charges, and taxes. The price stated is for information purposes only -->
<!ELEMENT InformationalPrice (Money, PriceBasisQuantity?)>

<!-- Information price, excluding  only taxes. The price stated is for information purposes only -->
<!ELEMENT InformationalPriceExclTax (Money, PriceBasisQuantity?)>

<!-- the Net value of a single unit that has to be corrected (new price). -->
<!ELEMENT UnitNetPriceCorrection (Money, PriceBasisQuantity?)>


<!-- Defines all the item related additional prices -->
<!ELEMENT AdditionalPrices (UnitGrossPrice?, InformationalPrice?,  InformationalPriceExclTax?, UnitNetPriceCorrection?)>


<!-- Defines product/item related indicators 
	domain
		Specifies the type of the Indicator. Suggested values are:       
		InvoiceUnitIndicator - Indicator specifies the unit as basis for invoicing ("price per unit")
		ConsumerUnitIndicator - Indicator will be set if the specified unit is used from the consumer/consumption process (for instance "gallons" or "liters")
		ReturnableContainerIndicator - Indicator will be set if the packaging/container shall be returned to the sender and will be re-used.
		TradeUnitIndicator - Indicator will be set if the specified unit is used to describe the trading unit (for instance "barrel" for oil)
		DutyIndicator - specifies that the current line item has a special fee
		CommisionIndicator - Marks the actual position/line item has a provision
	value
		Value of the Indicator
-->
<!ELEMENT ItemIndicator EMPTY>
<!ATTLIST ItemIndicator
    domain  %string;   #REQUIRED
    value  %string;    #REQUIRED
>


<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Supplier.mod#1 $
-->

<!--
    Supplier of goods and services. Includes a list of SupplierIDs which
    identify the Supplier.

    corporateURL
        URL to web site about the supplier

    storeFrontURL
        URL to web site where a user can shop or browse
-->
<!ELEMENT Supplier (Name, Comments?, SupplierID+, SupplierLocation*)>
<!ATTLIST Supplier
    corporateURL   %URL;  #IMPLIED
    storeFrontURL  %URL;  #IMPLIED
>

<!--
    One of the locations for a supplier. Supplier location is
    generally a physical location.
-->
<!ELEMENT SupplierLocation (Address, OrderMethods)>

<!--
    OrderMethods is the list of methods by which one can order
    from a supplier. The contact element is the technical contact
    who should be able to assist with order processing issues.
    The list is to be ordered by supplier preference, the first
    element having the highest degree of preference.
-->
<!ELEMENT OrderMethods (OrderMethod+, Contact?)>

<!--
    OrderMethod is a method for ordering. It is comprised of a
    target address for the order and the protocol expected by
    the address.
-->
<!ELEMENT OrderMethod (OrderTarget, OrderProtocol?)>

<!--
    OrderTarget represents an address to which orders can be
    sent.
-->
<!ELEMENT OrderTarget (Phone | Email | Fax | URL | OtherOrderTarget)>

<!--
    OrderProtocol is the communication method to be used when
    communicating an order to a supplier. An example would be "cXML".
-->
<!ELEMENT OrderProtocol (#PCDATA)> <!-- string -->

<!--
    OtherOrderTarget represents an address which is not enumerated by
    default in the OrderTarget Element. This may contain address targets
    beyond the ability of this document to describe.

    name
        Optional name for target.
-->
<!ELEMENT OtherOrderTarget ANY>
<!ATTLIST OtherOrderTarget
    name  %string;  #IMPLIED
>

<!--
    Definition of a supplier id.  A supplier id is a (domain, value)
    pair so that suppliers have the flexibility to define their id's
    according to an arbitrary convention (e.g., (DUNS, 12345),
    (TaxID, 88888888)).

    domain
        the domain of the id
-->

<!ELEMENT SupplierID (#PCDATA)> <!-- string -->
<!ATTLIST SupplierID
    domain  %string;  #REQUIRED
>
<!--
   Defines a List of Suppliers that might be associated with a quote Item. Used in
   ItemOut. 
-->
<!ELEMENT SupplierList (Supplier+)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/modules/Item.mod#19 $
-->

<!--
    Type of a line item. 
-->
<!ENTITY % lineItemType '(composite | item)'>

<!--
    Type of a coposite line item. 
-->
<!ENTITY % compositeItemType '(groupLevel | itemLevel)'>

<!--
    Type of a service line item.
-->
<!ENTITY % serviceItemType '(material | service)'>

<!--
    Choice of type of a service line item.
	serviceLineType
		This entity represents the type of the service line. The following are the different types of service lines. 
	
	standard
		This is the standard line type, and is the system default.
	blanket
		You do not specify a quantity for blanket lines. The system defines the default quantity one to service lines with this line type.
		It is settled as a lump sum.
	contingency
		This line type describes a service that is not absolutely necessary to perform the order. This service is only used when required.
	openquantity
		If the sold-to party requires that the bidder offers the quantity for a specific partial service,
		the service line can be indicated by Line with open quantity.
		You can only use this line type in the following documents:
			Purchase requisitions and RFQs in Purchasing (MM Services)
			Inquiries with BOS in Sales
	information
		This line type does not describe a service. It is purely documentary in nature.
		You select this line type if you want to use the service line to store additional text.
	
	
-->
<!ENTITY % serviceLineType '(standard|blanket|contingency|openquantity|information)'>

<!--
    ID with which the item's manufacturer identifies the item.
-->
<!ELEMENT ManufacturerPartID (#PCDATA)> <!-- string -->

<!--
    Name of the item's manufacturer.

    xml:lang
        The language in which the ManufacturerName is written.  This
    attribute will be required in a future version of cXML.  (Leaving it
    out is deprecated.)
-->
<!ELEMENT ManufacturerName (#PCDATA)> <!-- string -->
<!ATTLIST ManufacturerName
    xml:lang %xmlLangCode; #IMPLIED
>

<!--
    Classification is used to group items into similar categories.

    domain
        "name" of classification, ie., SPSC
		Domain can be "MaterialGroup" and "MaterialGroup" refers to a grouping of materials and services according to their characteristics in SAP.
				
	code
        identification for a classification

-->
<!ELEMENT Classification (#PCDATA)> <!-- string -->
<!ATTLIST Classification
    domain  %string;  #REQUIRED
	code 	%string;  #IMPLIED
>

<!--
     LeadTime specifies, in days, the amount of time required to
     receive the item.
-->
<!ELEMENT LeadTime (#PCDATA)>   <!-- uint -->

<!--
    SupplierBatch is the batch ID provided by the supplier at the line item quantity level
    to identify  the batch in which the item or the product was produced. The batch id is helpful in tracebility.

    Batch numbers (also call "lot number", "variant") are used in several industries to uniquely identify  items produced together.
-->
<!ELEMENT SupplierBatchID (#PCDATA)>


<!--
    How the supplier identifies an item they sell.

    If SupplierPartID does not provide a unique key to identify the item,
    then the supplier should generate a key which identifies the part
    uniquely when combined with the SupplierID and SupplierPartID. The
    key is called SupplierPartAuxiliaryID.


    An example is where a Supplier would use the same PartID for an
    item but have a different price for units of "EA" versus "BOX".
    In this case, the ItemIDs should be:
    <ItemID>
        <SupplierPartID>pn12345</SupplierPartID>
        <SupplierPartAuxiliaryID>EA</SupplierPartAuxiliaryID>
    </ItemID>
    <ItemID>
        <SupplierPartID>pn12345</SupplierPartID>
        <SupplierPartAuxiliaryID>
           <foo>well formed XML here</foo>
        </SupplierPartAuxiliaryID>
    </ItemID>
    In this case, the "foo" element must be defined in an internal subset
    sent with the cXML document.  Otherwise, parsers will not be able to
    validate that document.

    In a preferred approach, the sending application may escape the contained
    XML using CDATA sections.  This would appear as:
       ...
       <SupplierPartAuxiliaryID>
           <![CDATA[<foo>well formed XML here</foo>]]>
       </SupplierPartAuxiliaryID>
       ...

    Finally, the angle brackets could be escaped using XML character
    entities.  This might be a bit harder for humans to read.  For example:
       ...
       <SupplierPartAuxiliaryID>
           &lt;foo&gt;well formed XML here&lt;/foo&gt;
       </SupplierPartAuxiliaryID>
       ...

    revisionID     
       Also known as Material Revision Level. "Revision" is the most widely-used
       term for referring to that attribute which distinguishes one closely-
       related design iteration from another. A revision represents a change to
       an object, or a modification to a part such that the part remains
       interchangeable with its previous iteration.
       As part of engineering change management the supplier uses the revision
       level to uniquely identify the version of a product, of an article or of
       a part.
     
-->
<!ELEMENT SupplierPartID (#PCDATA)> <!-- string -->
<!ATTLIST SupplierPartID
	revisionID	%string;	#IMPLIED
>
<!ELEMENT SupplierPartAuxiliaryID ANY>

<!--
   BuyerPartID represents an item in buyer system. This identifier is specified by the buyer
-->
<!ELEMENT BuyerPartID (#PCDATA)>


<!--
    A unique identification of an item. SupplierID is not required since
    ItemIDs never travel alone.

    ItemIDs used to define a Supplier/Commodity level Blanket Order Item should
    use Empty SupplierPartID tag. These type of items do not have specific part numbers
    at the time of placing the Blanket Order. There will be subsequent release orders
    or invoices that will define the SupplierID.

    IdReference
    Defines an ID reference.  Within the application context (for example,
    certain pair of buyer and supplier), the (identifier, domain) pair should be unique.
-->
<!ELEMENT ItemID (SupplierPartID, SupplierPartAuxiliaryID?, BuyerPartID?, IdReference*)>

<!--
    ItemDetail contains detailed information about an item. All the data that
    a user would want to see about an item instead of the bare essentials
    that are represented in the ItemID.
  
    LeadTime
        time in days to receive the item
.
    
Dimension
    
	Item dimensions.
    
  
ItemDetailIndustry
    
	Industry  specfic item detail information.

OverallLimit
	
	OverallLimit will hold the maximum value that the total of all unplanned services 
	(or the value of the material) covered by this item may not exceed. This limit, 
	which represents a budget for unplanned services, must not be exceeded. 
	This limit can be used in service lines and the items of blanket purchase orders.
	At service item level (top level service item), this field captures limit for the 
	total of all unplanned services (or the value of the material). 
	At service outline level, it captures the sub-limits (the budget for that item). 


ExpectedLimit
	
	ExpectedLimit is value that the unplanned services (or the material) covered by 
	this item are not expected to exceed. It is a figure buyer assumes to be the 
	final amount payable. It is entered only for top level service item.
	Whereas the overall limit field (at top level) captures the maximum allowed 
	value (max amount that can be spent), the expected limit is used to capture the 
	planned/expected value and is mainly used for analysis purposes and determining 
	total value of item.
 
    
PlannedAcceptanceDays
Number of days the buyer schedules for the inspection of goods after receiving them.

-->
<!ELEMENT ItemDetail (UnitPrice, Description+, OverallLimit?, ExpectedLimit?, UnitOfMeasure, PriceBasisQuantity?, Classification+, ManufacturerPartID?,ManufacturerName?, URL?, LeadTime?, Dimension*, ItemDetailIndustry?, AttachmentReference*, PlannedAcceptanceDays?, Extrinsic*)>
<!--
	Item details specific for items that describe blanket purchase order items. 
	This element should only be used for items in a purchase order of 
	type "blanket"	or "regular".
-->
<!ELEMENT BlanketItemDetail (Description+, MaxAmount?, MinAmount?, 
                             MaxQuantity?, MinQuantity?,
			     UnitPrice?, UnitOfMeasure?, PriceBasisQuantity?,
			     Classification*, Extrinsic*)>

<!--
    ItemDetailIndustry contains detailed information about an item for a specific industry.
    	
	isConfigurableMaterial
	A value of yes indicates that this item is releant for configurable purchase and has material characteristics associated with it. 
-->
<!ELEMENT ItemDetailIndustry (ItemDetailRetail? )>
<!ATTLIST ItemDetailIndustry
    isConfigurableMaterial	 (yes)  #IMPLIED
>

<!--
    ItemDetailIndustry contains detailed information about an item for a retail industry. 
    
    EANID
        Deprecated, use '<IdReference domain="EAN-13">' within 'ItemID' instead.
-->
<!ELEMENT ItemDetailRetail (EANID?, EuropeanWasteCatalogID?, Characteristic* )>

<!--
    An identifier for a subcontracting component within the procurement process.
-->
<!ELEMENT ComponentID (#PCDATA)>

<!--
    An element contains product information of subcontracting component (such as buyer product id, supplier product id, standard product id, internal product idetc.).

    SupplierPartID
        It represents a product in supplier system. This identifier is specified by the supplier.

    SupplierPartAuxiliaryID
        If SupplierPartID does not provide a unique key to identify the item, then the supplier should generate a key which identifies the product uniquely when combined with the SupplierID and SupplierPartID. The key is called SupplierPartAuxiliaryID.

    BuyerPartID
        It represents a product in buyer system. This identifier is specified by the buyer.

    IdReference
        ID reference is within the application context (for example, standard id for a product), the (identifier, domain) pair should be unique.
-->
<!ELEMENT Product (SupplierPartID?, SupplierPartAuxiliaryID?, BuyerPartID?, IdReference*)>

<!--
    A sequential number that is assigned when changes are made to component.
-->
<!ELEMENT ProductRevisionID (#PCDATA)>

<!--
    An element carrying batch information for material or goods  produced in a single manufacturing run.

    BuyerBatchID
        An identifier from buyer to identify the material/goods produced in a single manufacturing run

    SupplierBatchID
        An identifier from supplier to identify the material/goods produced in a single manufacturing run

    PropertyValuation
        It consists of the property to be valuated and the associated values

    productionDate
        Date on which when a batch of material or goods is produced

    expirationDate
        Date on which when a batch of material/goods becomes expired

    inspectionDate 
        Date on which when a batch of material/goods will be inspected

    originCountryCode
        Country of origin for a batch of material or goods
-->
<!ELEMENT Batch (BuyerBatchID?, SupplierBatchID?, PropertyValuation*)>
<!ATTLIST Batch
productionDate      %datetime.tz;    	#IMPLIED
expirationDate   	%datetime.tz;      	#IMPLIED
inspectionDate      %datetime.tz;       #IMPLIED
originCountryCode 	%isoCountryCode; 	#IMPLIED
>

<!--
    An identifier from buyer to identify the material/goods produced in a single manufacturing run.
-->
<!ELEMENT BuyerBatchID (#PCDATA)>

<!--
    PropertyValuation consists of the property to be valuated and the associated values

    PropertyReference:
        The property being valuated

    ValueGroup:
        Contains a group of values pertaining to a property
-->
<!ELEMENT PropertyValuation (PropertyReference?, ValueGroup*)>

<!--
    PropertyReference is a reference to the property being valuated

    IdReference
        ID reference is within the application context (for example, id for a property), the (identifier, domain) pair should be unique.
-->
<!ELEMENT PropertyReference (IdReference*)>

<!--
    ValueGroup contains a group of values pertaining to a property.

    IdReference
        ID reference is within the application context (for example, id of value group), the (identifier, domain) pair should be unique.

    ParentID
        For Structured property, ParentID is an identifier of its parent

    PropertyValue
        Values for valuating property
-->
<!ELEMENT ValueGroup (IdReference?,  ParentID?, PropertyValue*)>

<!--
For Structured property, ParentID is an identifier of its parent
-->
<!ELEMENT ParentID (#PCDATA)>

<!--
    PropertyValue consists of values for valuating a property.
        Example: 	QuantitySpecification: valuating properties whose data types are in units, for example, 5 pieces, 7 kg
        IntegerSpecification: valuating non-dimensional, integer properties, for example, codes, indexes, and sequential numbers
        DateTimeSpecification: valuating date time properties, for example requirement date, production date, and expiration date

    PropertyCharacteristic
        It has the detailed information about a value that can be used for valuation of property

    Name
        Name of PropertyValue
-->
<!ELEMENT PropertyValue (Characteristic*)>
<!ATTLIST PropertyValue
name          %string;       #IMPLIED>

<!--
	ControlKeys
		Are used to override default business rules as configured in Ariba Network.
-->
<!ELEMENT ControlKeys (OCInstruction?, ASNInstruction?, InvoiceInstruction?, SESInstruction?)>

<!--
	May be used to specify more precisly how to deal with OrderConfirmation creation.
	
	value works as follows:
		allowed            - allows to send OrderConfirmation for this line item, regardless of current rule settings.
		notAllowed         - does not allow to send OrderConfirmation for this line item.
		requiredBeforeASN  - requires OrderConfirmation before ASN could be created.
-->
<!ELEMENT OCInstruction (Lower?, Upper?)>
<!ATTLIST OCInstruction
value     ( allowed | notAllowed | requiredBeforeASN )     #REQUIRED>


<!ELEMENT ASNInstruction (Lower?, Upper?)>
<!ATTLIST ASNInstruction
    value       (allowed | notAllowed)  #REQUIRED>

<!--

	Its purpose is to specify if an Invoice Item could be created or not for a line item.
	
	allowed            - allows to create an Invoice Item for this line item, regardless of current rule settings.
	
	notAllowed         - does not allow to create an Invoice Item for this line item, regardless of current rule settings.

    verificationType   - goods receipt based invoice verification
        The buyer can decide at order item level whether to activate goods-receipt-based invoice verification.
        If goods-receipt-based invoice verification is active for a particular order item, each invoice item can then be matched up uniquely with the goods receipt item. It makes sense to work with goods-receipt-based invoice verification when you expect a delivery to be made and posted in several parts.
-->
<!ELEMENT InvoiceInstruction (TemporaryPrice?)>
<!ATTLIST InvoiceInstruction
    value       (isERS | isNotERS | allowed | notAllowed)  #IMPLIED
    verificationType (goodsReceipt)                        #IMPLIED>

<!--
This flag indicates if pricing information is temporary or final. If set to true at the order item level, pricing for the item is considered temporary and the supplier cannot invoice the line item.
If set to true at the order header level, pricing is considered temporary for the entire purchase order and the supplier cannot invoice against any item on the order.
-->    

<!ELEMENT TemporaryPrice EMPTY>
<!ATTLIST TemporaryPrice value (yes | no) #REQUIRED
>

<!--

	Its purpose is to specify if a SES Item could be created or not for a line item.
	
	allowed            - allows to create SES Item for this line item, regardless of current rule settings.
	
	notAllowed         - does not allow to create SES Item for this line item, regardless of current rule settings.
		
-->
<!ELEMENT SESInstruction EMPTY>
<!ATTLIST SESInstruction
    value       (allowed | notAllowed)  #REQUIRED>

<!--
    Either or both a textual description and codes about a hazard inherent
    in an item or for the overall order or shipment.  The overall hazards
    may be due either to identical hazards for all items or hazards
    inherent in shipping various products together.

    The contained Description element list (if provided) should include
    detailed handling requirements.  Elements in this list may appear in
    any order.  A description locale (Description@xml:lang attribute value)
    must not appear more than once in a Hazard element.  When more than one
    Description element is present, all must contain translations of a
    common description.

    Classification elements may appear in any order.  A classification
    domain (Classification@domain attribute value) must not appear more
    than once in a Hazard element.

    All listed Classification elements and the Description (if provided)
    must relate to a single hazard.  Additional hazards must use separate
    Hazard elements.

    The following Classification domains are expected in this context:
        UNDG - United Nations Dangerous Goods
        IMDG - International Marine Organization Dangerous Goods
        NAHG - North American Hazardous Goods
-->
<!ELEMENT Hazard ((Description+, Classification*) | Classification+)>

<!--
PlannedAcceptanceDays: Number of days the buyer schedules for the inspection of goods after receiving them.
-->
<!ELEMENT PlannedAcceptanceDays  (#PCDATA)> <!-- number --><!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!--
    This element captures travel information.  It could be one of four
    types: air, car rental, hotel or rail.

    AirDetail
        Air travel detail.

    CarRentalDetail
        Car rental detail.

    HotelDetail
        Hotel detail.

    RailDetail
        Rail detail.

    PolicyViolation
        List of policy violations (if any) associated with this
        travel line item.

    Comments
        Top level comments for this travel line item (if any).  This
        is not the policy violation comment but a top level comment
        given by the user for this travel line item while in Travel
        Booking Provider's web site.

    TermsAndConditions
        List of Terms and conditions (if any) associated with this
        travel line item.

    confirmationNumber
        A unique confirmation number that is useful to both the
        traveler and the vendor who is providing the service for this
        travel line item.  For example, hotel reservation number or
        e-ticket number from the airline.

    pnrLocator
        Passenger Name Record (PNR) Locator that is useful to the
        Travel Booking Provider.

    quoteExpirationTime
        Date and time that this quote will expire.  This value is
        normally supplied in the PunchoutOrderMessage.  If no value is
        supplied, it is assumed that there is no expiration time or
        date for this quote.
-->
<!ELEMENT  TravelDetail ((AirDetail | CarRentalDetail | HotelDetail | RailDetail),
                          PolicyViolation*,
                          Comments?,
                          TermsAndConditions?)>
<!ATTLIST TravelDetail
    confirmationNumber  %string;        #REQUIRED
    pnrLocator          %string;        #IMPLIED
    quoteExpirationTime %datetime.tz;   #IMPLIED
>

<!-- Air -->

<!--
    Air detail information for the air trip.

    TripType
        Round Trip, One Way, or Multi Leg

    AirLeg
        Different air leg that makes up this air detail.
        For example a round trip from SFO -> TPE with no stops
        will have two air legs.  One air leg from SFO -> TPE
        and another from TPE -> SFO.

    AvailablePrice
        Other available airfare prices that the user did not pick.

    Penalty
        Penalty amount (if any).  This is normally due to changes or
        cancelation of the ticket.
-->
<!ELEMENT AirDetail (TripType,
                     AirLeg+,
                     AvailablePrice*,
                     Penalty?)>

<!--
    Define a single leg in the air travel.

    Vendor
        Airline vendor name and information.

    AirLegOrigin
        Originating airport for this air leg.

    AirLegDestination
        Destination airport for this air leg.

    BookingClassCode
        Airline booking class code.  This is the de-facto
        airline standard.  For example,

        F, FN, P, R, A      - first class
        C, CN, D, J, I, Z   - business class.
        Y, YN, B, BN, M, H, V, VN, O, Q, QN, S, 
            K, KN, L, U, T, W - coach class.

    Rate
        Rate for this particular air leg.  If specify, the total
        of all the rate for the different air legs must add up
        to the total the line item level.

    Meal
        Meal information for this air leg (if any)

    travelSegment
        Textual information to identify this travel segment.
        This information is specific to the Travel Booking Provider.

    departureTime
        Departure date and time for this air leg

    arrivalTime
        Arrival date and time for this air leg

    flightNumber
        Flight number for this air leg

    seatNumber
        Seat number for this air leg

    seatType
	    Seat type
	        aisle       - Aisle
	        window      - Window
	        middle      - Middle

    upgrade
        Is this ticket an upgrade?

    stops
        The number of stop for this air leg.
        0 if it is a direct flight.  If no information is supplied
        it is defaulted to 0.

    equipment
        The plane equipment information for this air leg
-->
<!ELEMENT AirLeg (Vendor,
                  AirLegOrigin,
                  AirLegDestination,
                  BookingClassCode?,
                  Rate?,
                  Meal*)>
<!ATTLIST AirLeg
    travelSegment   %string;        #REQUIRED
    departureTime   %datetime.tz;   #REQUIRED
    arrivalTime     %datetime.tz;   #REQUIRED
    flightNumber    %string;        #REQUIRED
    seatNumber      %string;        #IMPLIED
    seatType        (window | aisle | middle) #IMPLIED
    upgrade         (yes)           #IMPLIED
    stops           %r8;            #IMPLIED
    equipment       %string;        #IMPLIED
>

<!--
    Originating airport for this Air Leg.

    Airport
        Originating airport
-->
<!ELEMENT AirLegOrigin (Airport)>

<!--
    Destination airport for this Air Leg.

    Airport
        Destination airport
-->
<!ELEMENT AirLegDestination (Airport)>

<!--
    Airport information that includes the iso airport code

    Address
        Physical adress of the airport.

    airportCode
        The 3 letter IATA airport code.
-->
<!ELEMENT Airport (Address?)>
<!ATTLIST Airport airportCode %string; #REQUIRED>

<!---
    Meal information used by air, hotel and rail.

    BookingClassCode
        Code for the meal.  For example, airlines use
		B     - Breakfast
            C     - Complimentary liquor
            D     - Dinner
            F     - Food for purchase
            G     - Food and beverage for purchase
            H     - Hot meal
            K     - Continental breakfast
            L     - Lunch
            M     - Meal
            N     - No meal service 
            O     - Cold meal
            P     - Liquor for purchase
            R     - Refreshments
            S     - Snack or brunch
            V     - Refreshments for purchase

    Description
        Textual description of the meal, including any special needs
        such as vegetarian or dairy-free.
-->
<!ELEMENT Meal (BookingClassCode?, Description?)>

<!-- Car Rental -->

<!--
    Car rental information.

    Vendor
        Car rental vendor information.

    CarRentalPickup
        Pickup location for the rental car.

    CarRentalDropoff
        Drop off location for the rental car.

    BookingClassCode
        4 letter code for car.

        1st Letter - M (Mini), E (Economy), C (Compact), S (Standard),
                     I (Intermediate), F (Full size), P (Premium), L (Luxury)
                     V (MiniVan), X (Special)
        2nd Letter - B (2 door), C (2/4 door), D (4 door), T (Convertible),
                     F (Four wheel drive), V (Van), W (Wagon), S (Sport)
                     X (Special)
        3rd Letter - A (Automatic), M (Manual)
        4th Letter - R (A/c), N (No A/C)

    CarRentalFee
        Mutliple car rental fee can be specified to capture the
        break down of different fees.  The total of these fees must
        add up to the total at the line item level.

    LimitedMileage
        Mileage limit information

    AvailablePrice
        Other available prices for car rental that the user did not pick.

    travelSegment
        Textual information to identify this travel segment.
        This information is specific to the Travel Booking Provider.

    pickupTime
        The intended pickup date and time

    dropoffTime
        The intended dropoff date and time
-->
<!ELEMENT CarRentalDetail (Vendor,
                           CarRentalPickup,
                           CarRentalDropoff,
                           BookingClassCode?,
                           CarRentalFee+,
                           LimitedMileage?,
                           AvailablePrice*)>
<!ATTLIST CarRentalDetail
    travelSegment %string;          #REQUIRED
    pickupTime    %datetime.tz; 	#REQUIRED
    dropoffTime   %datetime.tz; 	#REQUIRED
>

<!--
    Physical location where the rental car should be picked up.  This
    is either an Airport or off airport car rental location.

    Airport
        An airport location.

    Address
        Physical address of the car rental location
-->
<!ELEMENT CarRentalPickup (Airport | Address)>

<!--
    Physical location where the rental car should be dropped off.
    This is either an Airport or off-airport car rental location.

    Airport
        An airport location.

    Address
        Physical address of the car rental location
-->
<!ELEMENT CarRentalDropoff (Airport | Address)>

<!--
    This specifies the quantity and the unit of measure of the mileage
    limit.

    UnitOfMeasure
        Unit of measure either miles or kilometers.

    quantity
        The mileage limit amount.
-->
<!ELEMENT LimitedMileage (UnitOfMeasure)>
<!ATTLIST LimitedMileage
    quantity   %r8;      #REQUIRED
>

<!--
    Car rental fee information.  CarRentalFee captures the actual
    charges and fee that applies to this rental.  Conditional charges
    such as extra mileages that are over the mileage limit should not
    be specified here but rather in the TermsAndConditions text.

    Total
        Total amount for this car rental fee.  All the total for the rates
        must add up to this amount.

    Rate
        The individual broken-down fee information.

    type
        Type of rate
            baseRate            - Base rental rate
            additionalDriver    - Additional driver fee
            airportAccessFee    - Airport Access fee
            dropOffCharge       - Drop off charge
            vehicleLicensingFee - Vehicle lincensing fee
            touristTax          - Tourist tax
            prepaidGasoline     - Prepaid gasoline charge
            navigationSystem    - Navigation system
            childSeat           - Child seat charge
            luggageRack         - Luggage rack charge
            collisionDamageInsurance    - Collision damage insurance
            liabilityInsurance          - Liability insurance
            mobilePhone         - Mobile phone base charge
            other               - Other charges.
-->
<!ELEMENT CarRentalFee (Total, Rate*)>
<!ATTLIST CarRentalFee
    type (baseRate | additionalDriver | airportAccessFee | dropOffCharge |
          vehicleLicensingFee | touristTax | prepaidGasoline |
          navigationSystem | childSeat | luggageRack | collisionDamageInsurance |
          liabilityInsurance | mobilePhone | other) "baseRate"
>

<!-- Hotel -->

<!--
    Hotel detail information.

    Vendor
        Hotel vendor information.

    Address
        Physical address of the hotel.  This is might be different
        from the address specified in the Vendor field as the vendor
        address might be the head quarter address.

    RoomType
        The type of room reserved.

    BookingClassCode
        Hotel booking class code.

    Meal
        Any complementary meals that are included with the room.  For
        example, complementary continental breakfast.

    Rate
        Hotel rate information.  Multiple rates can be specified.  For
        example, the night rate, valet parking rate, and other rates.

    AvailablePrice
        Other available prices that user did not pick.  Available
        prices can be from the same vendor or different vendor.

    travelSegment
        Textual information to identify this travel segment.  This
        information is specific to the Travel Booking Provider.

    arrivalTime
        Date and time of arrival at the hotel.  This is used as an
        advisory to the hotel vendor for the arrival time.

    departureTime
        Date and time of departure from the hotel.  This is used as an
        advisory to the hotel vendor for the departure time.

    checkinTime
        The official checkin time.  For example, most hotel checkin
        time is 3:00 PM.

    checkoutTime
        The official checkout time.  For example, most hotel checkout
        time is 12:00 PM (noon).

    earlyCheckinAllowed
        Does the hotel allow early checkin?

    lateCheckoutAllowed
        Does the hotel allow late checkout?
-->
<!ELEMENT HotelDetail (Vendor,
                       Address,
                       RoomType,
                       BookingClassCode?,
                       Meal*,
                       Rate*,
                       AvailablePrice*)>
<!ATTLIST HotelDetail
    travelSegment   %string;         #REQUIRED
    arrivalTime     %datetime.tz;    #REQUIRED
    departureTime   %datetime.tz;    #REQUIRED
    checkinTime     %time.tz;        #REQUIRED
    checkoutTime    %time.tz;        #REQUIRED
    earlyCheckinAllowed (yes)        #IMPLIED
    lateCheckoutAllowed (yes)        #IMPLIED
>

<!--
    Information about a hotel room.

    Description
        Textual description of the hotel room.

    Amenities
        List of amenities for this hotel room.

    smoking
        Is the room a smoking or non-smoking room

    numberOfBed
        The number of beds in this room

    bedType
        The bed type in this room.
-->
<!ELEMENT RoomType (Description?, Amenities*)>
<!ATTLIST RoomType
    smoking        (yes | no)   #REQUIRED
    numberOfBed    %r8;         #IMPLIED
    bedType        (king | queen | full | double | single | other)    #IMPLIED
>

<!--
    Textual description of the amenities for the hotel room.

    Description
        Text description of this amenities.  For example,
        DSL connection, two telephone lines, and other information
        about a hotel room.
-->
<!ELEMENT Amenities (Description)>

<!-- Rail -->

<!--
    Rail detail information.  A rail detail can have multiple legs.

    TripType
        Trip type for this rail.

    Rail leg
        The different rail legs that make up this rail detail.

    AvailablePrice
        Other available prices that the user did not pick for for this
        rail trip.

    Penalty
        Penalty (if any) associated with this rail trip.
-->
<!ELEMENT RailDetail (TripType,
                      RailLeg+,
                      AvailablePrice*,
                      Penalty?)>

<!--
    Rail leg is used to express information regarding a single leg for
    a rail travel.

    Vendor
        Rail vendor information.

    RailLegOrigin
        Rail originating location.

    RailLegDestination
        Rail Destination location.

    BookingClassCode
        Rail booking class code.

    Rate
        Rate information (if any) for this rail leg.  If specified,
        all the rates in all rail legs must add up to the total at the
        travel line item level.

    Meal
        Meal served for this leg (if any).

    travelSegment
        Textual information to identify this travel segment.  This
        information is specific to the Travel Booking Provider.

    departureTime
        Date and time of departure at the originating location.

    arrivalTime
         Date and time of arrival at the destination location.

    trainNumber
        Train number for this rail leg.

    seatNumber
        Seat number.

    carType
        Type of the rail car.
-->
<!ELEMENT RailLeg (Vendor,
                   RailLegOrigin,
                   RailLegDestination,
                   BookingClassCode?,
                   Rate?,
                   Meal*)>
<!ATTLIST RailLeg
    travelSegment   %string;        #REQUIRED
    departureTime   %datetime.tz;   #REQUIRED
    arrivalTime     %datetime.tz;   #REQUIRED
    trainNumber     %string;        #REQUIRED
    seatNumber      %string;        #IMPLIED
    carType        (sleeper | seat) #IMPLIED
>

<!--
    The origin of a particular rail leg.  This can be an airport or a
    physical address of a rail station.

    Airport
        An airport location

    Address
        A physical address of a rail station
-->
<!ELEMENT RailLegOrigin (Airport | Address)>

<!--
    The destination of a particular rail leg.  This can be an airport
    or a physical address of a rail station.

    Airport
        An airport location

    Address
        A physical address of a rail station
-->
<!ELEMENT RailLegDestination (Airport | Address)>

<!-- Travel/Expense common definitions -->

<!--
    The type of the trip. This is used by Air and Rail to indicate
    round trip, one way or multi-leg trip.

    type
        Type of the trip
	    round       - a round trip
	    oneWay      - a one way trip
	    multiLeg    - a multi leg or open jaw trip
-->
<!ELEMENT TripType EMPTY>
<!ATTLIST TripType
    type    (round | oneWay | multiLeg) #REQUIRED
>

<!--
    Information about a vendor that is providing this service.

    Address
        The physical address of the vendor.  This address normally is
        the business or head quarter address of the vendor.

    SupplierID
        Supplier id for this vendor.  This is just a (domain, value)
        pair so that Travel Booking Providers have the flexibility to
        define their id's according to an arbitrary convention (e.g.,
        (DUNS, 12345), (TaxID, 88888888)).

        Note that multiple supplier id can be specified.  This is so
        that Travel Booking Provider can have a single implementation
        that works with different Buyer implementations that use
        different supplier id domain.

    preferred
        Is this vendor a preferred vendor?
-->
<!ELEMENT Vendor (Address, SupplierID*)>
<!ATTLIST Vendor
    preferred (yes | no) #REQUIRED
>

<!--
    Textual terms and conditions associated with an air fare, car
    rental, hotel, or rail.  For example, a car rental terms and
    conditions normally include boundary limit, additional mileage
    charges, gasoline charge and other restriction information.

    Multiple terms and conditions can be attached to a single travel
    line item.

    Description
        Textual terms and conditions.
-->
<!ELEMENT TermsAndConditions (Description+)>

<!--
    Policy violation (if any) that results from the user picking this
    particular travel.  Policy violations are associated with an
    individual line item of travel and not associated at the header
    level.  This allows for clear identification of the violation with
    the individual line item.

    Description
        Textual description of this violation.

    PolicyViolationJustification
        Justification for this violation given by user normally picked
	from a standard list of justifications at the Travel Booking
	Provider web site.

    Comments
        Additional comments to further clarify the justification given
        by user.

    level
        Violation level.
            warning     - a non serious violation.
            violation   - a serious violation of company policy.
-->
<!ELEMENT PolicyViolation (Description,
                           PolicyViolationJustification,
                           Comments?)>
<!ATTLIST PolicyViolation
	level (warning | violation) #REQUIRED
>

<!--
    Justification given by the user why they violate the company
    travel policy.  This justification value is normally picked from a
    pick list at the Travel Booking Provider web site.

    Description
        The justification of the violation picked from a standard list
        at the Travel Booking Provider web site.
-->
<!ELEMENT PolicyViolationJustification (Description)>

<!--
    Penalty (if any) for this travel segment

    Money
        The penalty amount

    Description
        Textual description of the cause of the penalty.  For example,
        change fee associated with air ticket.
-->
<!ELEMENT Penalty (Money, Description)>

<!--
    Other avaible price.  AvailablePrice is used to express what other
    prices are available that the traveler did not pick.
    AvailablePrice is can be used to capture the lowest price, the
    highest price, the lowest compliant price, and the hight compliant
    price.

    Money
        The amount of the other available price.

    Description
        Textual description of the available price.  It explain
        how this price was derived at.  For example, a non direct flight
        exists with the flight number can be put here.

    Type
        Type of available price.  Currently we capture four
        different type.
            lowest              - The lowest price possible regardless of the
                                  traveling policies
            lowestCompliant     - The lowest price that still complies with
                                  the travel policies
            highestCompliant    - The highest price that still complies with
                                  the travel policies
            highest             - The highest price possible regardless of the travel
                                  policies
            other               - Other, specify in the description
-->
<!ELEMENT AvailablePrice (Money, Description?)>
<!ATTLIST AvailablePrice
    type (lowest | lowestCompliant | highestCompliant | highest | other) #REQUIRED
>

<!--
    Booking class code used by airfare, car rental, hotel, and rail to
    indicate the class.

    Description
        Textual description of the code

    code
        code
-->
<!ELEMENT BookingClassCode (Description?)>
<!ATTLIST BookingClassCode
    domain  %string;    #REQUIRED
    code    %string;    #REQUIRED
>

<!--
    Define a physical location and its address.  This can be used to 
    describe places such as airport, bus station, ferry dock, railway
    station and so on.

    Address
        Indicates the address of the place

    code
        Indicates the code the may represent the place.  For example,
        airport can have an airport code.

    domain
        Qualifier or domain for the code.  For example, airport code
        is IATA standard, the domain value would be "IATA"; however
        bus station code may be local specific.
-->
<!ELEMENT Place (Address?)>
<!ATTLIST Place
    code           %string;     #IMPLIED
    domain         %string;     #IMPLIED
>

<!--
    Defines places such as city, airport or railway where trip or leg originated.
-->
<!ELEMENT LegOrigin (Place)>

<!--
    Defines places such as city, airport or railway code where trip or leg ended.
-->
<!ELEMENT LegDestination (Place)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Transaction.mod#3 $
-->

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    Transaction Specification documents.
-->
<!-- 
     Detailed per-unit asset information for a line item.

     Extrinsic
         Additional per-unit asset information

     serialNumber
         Manufacturer's serial number for the unit

     tagNumber
         Asset tag number for the unit

     location
         location of the unit
-->
<!ELEMENT AssetInfo (Extrinsic*)>
<!ATTLIST AssetInfo
	tagNumber %string; #IMPLIED
	serialNumber %string; #IMPLIED
	location %string; #IMPLIED
>

<!-- Basic transactional elements used throughout -->

<!--
    Defines gross amount in posted currency.
-->
<!ELEMENT TotalAmountInPostedCurrency (Money)>

<!--
    Defines gross amount in billing currency. If specified, customer
    needs to pay this amount.
-->
<!ELEMENT TotalAmountInBillingCurrency (Money)>

<!--
    The bill to for an item.

   IdReference
       ID reference is Within the application context (for example, a certain pair of buyer and supplier), the (identifier, domain) pair should be unique.
-->
<!ELEMENT BillTo (Address, IdReference*)>

<!--
    The ship to for a item.

   IdReference
       ID reference is Within the application context (for example, a certain pair of buyer and supplier), the (identifier, domain) pair should be unique.
   
   Address
       To provide a plant location description, the domain attribute of the element IdReference should be set to "buyerLocationID", the identifier to the plantID.
       The addressIDDomain should be set to "buyerLocationID" and the addressID to the plantID. Use the name for the description.

-->
<!ELEMENT ShipTo (Address, CarrierIdentifier*, TransportInformation*, IdReference*)>

<!--
    Definition of a cXML Shipping item. Represents a shipping cost in the
    shopping basket (PunchOutOrderMessage) or an order to the supplier
    (OrderRequest). There could be one of these for the entire order, or one
    per lineitem.
    The Modifications element (if present) represents any changes to
    the shipping cost.

    trackingDomain
        represents the logistics supplier, I.E., "FedEx", "UPS", etc.

    trackingId
        an optional element value that represents the logistics supplier
        tracking number

    tracking
        Deprecated - Do Not Use
-->
<!ELEMENT Shipping (Money, Description, Modifications?)>
<!ATTLIST Shipping
    trackingDomain  %string;  #IMPLIED
    trackingId      %string;  #IMPLIED
    tracking        %string;  #IMPLIED
>

<!--
    Defines the payment terms in a PaymentProposalRequest document.

    Description
    A general description on payment terms.

    Extrinsic
    Additional information related to this payment terms.

    paymentTermCode
    This is the payment term code defined by buyers in ERP.

-->
<!ELEMENT PaymentTerms (PaymentTerm*, Description?, Extrinsic*)>
<!ATTLIST PaymentTerms
    paymentTermCode        %string;         #REQUIRED
>

<!--
    Defines a payment term in an invoice or order.  This deprecates the
		InvoiceDetailPaymentTerm previously defined.  Payment term can be the 
		net term (without discount) or discount term (with discount).

    payInNumberOfDays
        The number of days after invoice effective date for the invoice to be paid.

    Discount
	 	The percentage or amount of the discount term.  This element should be omitted
	 	if the payment term is a net term.
    Extrinsic
	Additional information related to this payment term.
-->
<!ELEMENT PaymentTerm (Discount?, Extrinsic*)>
<!ATTLIST PaymentTerm
    payInNumberOfDays        %uint;         #REQUIRED
>

<!--
    The list of valid payment types.
-->
<!ENTITY % cxml.payment  "PCard">
<!ELEMENT Payment (%cxml.payment;)>

<!--
    Defines an accounting segment.  Segment is an older, deprecated way to
    transport this information.

    type
        The accounting type of this segment.

    id
        The unique key of this Segment against the type.

    description
        Textual description of the Segment. For human readability.
-->
<!ELEMENT Segment EMPTY>
<!ATTLIST Segment
    type         %string;  #REQUIRED
    id           %string;  #REQUIRED
    description  %string;  #REQUIRED
>

<!--
    Defines an accounting segment.  AccountingSegment is the newer, better
    way to transport this information.  Name corresponds to the type
    attribute of Segment; Description corresponds to description.  Both add
    required locale attributes to the strings.

    id
        The unique key of this Segment against the type.
-->
<!ELEMENT AccountingSegment ( Name, Description )>
<!ATTLIST AccountingSegment
    id           %string;  #REQUIRED
>

<!--
    An accounting object.  Use of the Segment element here is deprecated.

    name
        The name of the object containing the specified accounting segments.
-->
<!ENTITY % cxml.accounting  "( Segment+ | AccountingSegment+ )">
<!ELEMENT Accounting (%cxml.accounting;)>
<!ATTLIST Accounting
    name  %string;  #REQUIRED
>

<!--
    A charge against an Accounting element.
-->
<!ELEMENT Charge (Money)>

<!--
    The combination of a Charge against an Accounting Element. A distribution
    represents the breakdown of one overall amount into sub-amounts.
-->
<!ELEMENT Distribution (Accounting, Charge)>



<!-- Item Elements -->
<!--
    The representation of a line item as it needs to be for sending to a
    supplier. The item can refer to a MasterAgreement in itself.


    quantity
        How many items are desired. Supplier and Commodity level items in an order of type
	"blanket" will use a default value of "1". The quantity in this case will not be
	used to compute the sub total. The MaxAmount in the BlanketItemDetail will be 
	used to indicate any line level amounts.
    lineNumber
        Position (counting from 1) of this item in an order.  Used to
        maintain a reference between items in create and update OrderRequest
        documents.
    requisitionID
        The buyers system requisition id for this line item. It might be the
        same as orderID, and it might not be included at all.  Must not be
        included if requisitionID is specified in the OrderRequestHeader.
    requestedDeliveryDate
        The date this item was requested for delivery.
    agreementItemNumber 
        The corresponding Item Number of the Item in the Master Agreement if this is 
	a 'release' order item.
    parentLineNumber
	    lineNumber of the parent line item in the order.
    itemType 
	    specify whether the line item contains child line items or acts as a child item
   requiresServiceEntry
		This is a flag to indicate if a service entry request is required
		for this item
  confirmationDueDate
    specifies the date by which the supplier has to respond with a Confirmation to the Purchase Order

    ScheduleLine
	Schedule Line(s) listed for the specific line item.
    
    ItemOutIndustry
	Industry specific item information
	
    Packaging
	Specify the packaging information for a line item. 
	
	compositeItemType
	specify type of parent line item(lot/box)

    Batch
    Batch information of goods or material produced in a single manufacturing run. The information includes id, characteristic, date…ect.

    itemCategory
    It is for defining how a component or material is procured.  Item category, subcontract or consignment,� is supported.
        subcontract refers to process of procuring a material by providing component information that makes the finished product
        consignment refers to process of managing a material through a special process where the payment to supplier is withheld until the materail or service is consumed by the buyer.
		thirdParty refers to vendor from which a material is ordered.

    subcontractingType
    	The Buyers ERP system determines the subcontracting type based on the  material provision indicator determined to support the regular subcontracting , Refurbishments or Replacements.
  	The value will be either regular  for standard subcontracting scenario, refurbwochange for Refurbishment without unchanged material ,2 Refurbishment with changed material , 3 for replacement of the materials.

		
	requestedShipmentDate
		The ship date requested by the buyer for the item

    isReturn
    A value of yes indicates that this item is for return process.
    Return Items are subject to Order confirmation optionally and also do not support the supplier ASN’s and Goods receipts from Buyers.
    Return Items is not included in the total of the PO amount of the PO as they are excluded in the case of Mixed line items in single PO.

    returnAuthorizationNumber
    Return Authorization Number information for a line item.

isDeliveryCompleted
    A value of yes indicates that this item is considered closed, it means that no more deliveries are expected for this item.
    This flag is set by the buyer for informative purposes.

-->
<!ELEMENT ItemOut (ItemID, Path?, (ItemDetail|BlanketItemDetail)?, (SupplierID | SupplierList)?, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Distribution*, Contact*, TermsOfDelivery?, Comments?, Tolerances?, ControlKeys?,
				   ScheduleLine*,(MasterAgreementReference | MasterAgreementIDInfo)?,  ItemOutIndustry?, Packaging*, ReleaseInfo?,  Batch?)>
<!ATTLIST ItemOut
    quantity               %r8;           #REQUIRED
    lineNumber             %uint;         #IMPLIED
    requisitionID          %string;       #IMPLIED
    agreementItemNumber	   %string;       #IMPLIED
    requestedDeliveryDate  %date;         #IMPLIED
    isAdHoc                (yes)          #IMPLIED
    parentLineNumber       %uint;         #IMPLIED
    itemType               %lineItemType; #IMPLIED
    requiresServiceEntry    (yes)          #IMPLIED
    confirmationDueDate    %date;         #IMPLIED
    compositeItemType      %compositeItemType;	#IMPLIED
    itemCategory           (subcontract | consignment | thirdParty)       #IMPLIED
    subcontractingType (regular | refurbWithoutChange | refurbWithChange | replacement) #IMPLIED
	requestedShipmentDate  %datetime.tz;  #IMPLIED
    isReturn               (yes)          #IMPLIED
    returnAuthorizationNumber %string;    #IMPLIED
    isDeliveryCompleted    (yes)          #IMPLIED
>


<!--
    The representation of the release information of a line item

    releaseType
        a string value to identify the type of release.  The value will be either jit or forecast
    releaseNumber
        a string value to identify the release.
    cumulativeReceivedQuantity
        a number value to identify the cumulative quantity of all goods receipts against the scheduling agreement over a period up to a certain date
    materialGoAheadEndDate
        Date denoting the end of the material go-ahead period (go-ahead for purchase of input materials)
    productionGoAheadEndDate
        Date denoting the end of the production go-ahead period
-->
<!ELEMENT ReleaseInfo (UnitOfMeasure, ShipNoticeReleaseInfo?, Extrinsic*)>
<!ATTLIST ReleaseInfo
    releaseType                 (forecast | jit)  #REQUIRED
    cumulativeReceivedQuantity  %r8;              #REQUIRED
    releaseNumber               %string;          #IMPLIED
    productionGoAheadEndDate    %datetime.tz;     #IMPLIED
    materialGoAheadEndDate      %datetime.tz;     #IMPLIED
>

<!--
    The ShipNoticeReleaseInfo will be used to reference a ship notice created from a scheduling agreement release. 

    receivedQuantity 
        Quantity received by the buyer for the referenced ship notice
-->
<!ELEMENT ShipNoticeReleaseInfo ((ShipNoticeReference|ShipNoticeIDInfo), UnitOfMeasure)>
<!ATTLIST ShipNoticeReleaseInfo
    receivedQuantity            %r8;              #REQUIRED
>


<!--
    The representation of a line item as it needs to be for sending to a
    buyer.

    quantity
        How many items are desired.
    openQuantity
        The quantity pending to be fulfilled by the seller to ship to
        the buyer.
        Example: for an Order Quantity of 100, if 50 was delivered, the
        open quantity is set to 50. The quantity is recorded as undelivered
        quantity by the buyer.
    promisedQuantity
        The quantity that has been promised by the selling party. The
        promised quantity, also called confirmed quantity, will be computed
        in the seller’s ERP based on ATP functionality. ATP is a function
        that enables customers’ orders to be confirmed based on available
        inventory or based on incoming commitments from the suppliers. This
        quantity will be used to indicate if the Order has been confirmed
        by the ERP system.
    lineNumber
        Position (counting from 1) of this item in an order.  Used to
        maintain a reference between items in create and update OrderRequest
        documents.
    parentLineNumber
        Position of the parent line item. Used to create a nesting structure for line items.
    itemType 
        specify whether the line item contains child line items or acts as a child item
    compositeItemType
        specify type of parent line item(lot/box)
    itemClassification
        Specifies whether the current line item is material or service.
        Valid values are material and service.
-->
<!ELEMENT ItemIn (ItemID, Path?, ItemDetail, (SupplierID | SupplierList)?,
                  ShipTo?, Shipping?, Tax?, SpendDetail?, Distribution*,
                  Contact*, Comments?, ScheduleLine*, BillTo?, Batch?,
                  DateInfo*, Extrinsic*)>
<!ATTLIST ItemIn
    quantity         %r8;           #REQUIRED
    openQuantity     %r8;           #IMPLIED
    promisedQuantity %r8;           #IMPLIED
    lineNumber       %uint;         #IMPLIED
    parentLineNumber %uint;         #IMPLIED
    itemType         %lineItemType; #IMPLIED
    compositeItemType      %compositeItemType;	#IMPLIED
    itemClassification     %serviceItemType;	#IMPLIED
>

<!--
Defines SubcontractingComponent  information.

ComponentID
An identifier for a subcontracting component within the procurement process

Description
Description of subcontracting component

Product
It contains product information of subcontracting component (such as buyer product id, supplier product id, standard product id, internal product id…etc.)

ProductRevisionID
An identifier that is assigned when changes are made to component

Batch
An element carrying a batch information for material or goods  produced in a single manufacturing run (such as buyer/supplier batch id, production date, property valuation…etc.)

UnitOfMeasure
Unit of measure code

quantity
Quantity of the subcontracting component required to produce the finished goods in a unit of measurement

requirementDate
Specifies the date on which the requested quantity of subcontracting component is required

materialProvisionIndicator
    The material provision indicator (MPI) is used to identify the subcontracting type of a part for the components. The following indicators are provided to support the subcontracting type 
	Rework Material to Subcontractor  with Value 1
	Rework Material from Subcontractor  with Value 2
	Subcontracting with Value 3 when the vendor is provide stock 


-->
<!ELEMENT SubcontractingComponent (ComponentID, UnitOfMeasure, Description?, Product?, ProductRevisionID?, Batch?)>
<!ATTLIST SubcontractingComponent
quantity          	%r8;           		#REQUIRED
requirementDate  	%datetime.tz;  		#IMPLIED
materialProvisionIndicator (reworkTo | reworkFrom | regular) #IMPLIED
>

<!--
    Defines Schedule Line information.

    quantity
        Quantity of items to be shipped for this schedule line.         

    requestedDeliveryDate
        Date that the specified quantity is expected to be delivered. 
		
	lineNumber
        Line identifier for a specific schedule line.

    UnitOfMeasure
        Unit of Measure for specified quantity.
		
	deliveryWindow
		Duration of time in which the quantity is expected to be delivered.

    SubcontractingComponent
        Contains detailed information about a subcontracting component which is used to manufacture the finished goods

	requestedShipmentDate
		The ship date requested by the buyer for the schedule line

    originalRequestedDeliveryDate
		The Original Date that the specified quantity is expected to be delivered. This Date is not subject to changes
-->
<!ELEMENT ScheduleLine (UnitOfMeasure, ScheduleLineReleaseInfo?, SubcontractingComponent*, Extrinsic*)>
<!ATTLIST ScheduleLine
    quantity               %r8;           #REQUIRED
    requestedDeliveryDate  %datetime.tz;  #REQUIRED
	lineNumber  		   %uint;  		  #IMPLIED
	deliveryWindow         %duration;     #IMPLIED
	requestedShipmentDate  %datetime.tz;  #IMPLIED
	originalRequestedDeliveryDate    %datetime.tz;  #IMPLIED
>

<!--
    Defines release information on schedule line.

    commitmentCode
        String value to identify the type of the delivery. The value will be
	firm – go ahead for production. Vendor can ship against the schedule line and customer is 
		responsible for cost of production as well as cost of material procurement 
	tradeoff – go ahead for material procurement. Vendor can ship against the schedule 
		line if rule is enabled. Buyer is responsible for cost of material procurement
	forecast – informational. Customer can change the schedule line without incurring any
		liabilities  with the vendor

    cumulativeScheduledQuantity
        Total quantity to be shipped for a particular line item up through the schedule line
    receivedQuantity
        Received Quantity is the Quantity Received against the Schedule line of the PO or Scheduling Agreement line item based on the Goods Receipt posted in ERP. 
        The quantity is informational and will be only used as visibility for suppliers and will not be validated for Invoice or Shipment processing.
-->

<!ELEMENT ScheduleLineReleaseInfo (UnitOfMeasure)>
<!ATTLIST ScheduleLineReleaseInfo
    commitmentCode              (firm | tradeoff | forecast)  #REQUIRED
    cumulativeScheduledQuantity %r8;                          #REQUIRED
    receivedQuantity %r8;                                     #IMPLIED 
>




<!--
    StatusUpdate for Confirmation (type=RequestToPay) request.

    transactionTimestamp
        time when the XMLPay transaction was submitted

    transactionID
        an identifier assisgned to the transaction by the payment processing gateway

    authorizationID
        the authorization code for the transaction provided by the bank

    isFailed
        should have a status code greater than zero.  Zero implies a successful transaction.
-->
<!ELEMENT PaymentStatus (PCard, Total, Shipping?, Tax?, Extrinsic*)>
<!ATTLIST PaymentStatus
    orderID    %string;    #REQUIRED
    transactionTimestamp    %datetime.tz;    #REQUIRED
    type    (Authorization| Settlement| Sale| Credit)    #REQUIRED
    isFailed   (yes)    #IMPLIED
    transactionID    %string;    #IMPLIED
    authorizationID    %string;    #IMPLIED
>

<!--
	Partial amount paid against an InvoiceDetail request. Used in InvoiceStatus.
	If this element exists in an InvoiceStatus element, it should mean that the buyer
	does not pay the full amount as the InvoiceDetail request specified. 
-->
<!ELEMENT PartialAmount (Money)>

<!--
	StatusUpdate for InvoiceDetail request.

        InvoiceIDInfo
        	ID of an invoice known to the supplier system. This attribute is used to reference an invoice in StatusUpdateRequest when DocumentReference is omitted.

	PartialAmount
		The partial amount paid against the InvoiceDetail document.  This attribute is
		only relevant when the status type is "paid".

	Comments
		Comments associated with the status update.

	type
		Type of the invoice status. 
                    processing - The invoice is received and being processed.
                    canceled - The invoice has been canceled.
                    reconciled - The invoice is reconciled. 
                    rejected - The invoice is rejected.
                    paying - The invoice is being paid. 
                    paid - The InvoiceDetail request is paid.  
-->

<!ELEMENT InvoiceStatus (InvoiceIDInfo?, PartialAmount?, Comments*)>
<!ATTLIST InvoiceStatus
	type	(processing | canceled | reconciled | rejected | paying | paid) #REQUIRED
>
	
<!-- OrderRequest* Elements -->
<!--  
  Specifies the earliest date when either the supplier can deliver the goods or when the receiver is able to handle incoming shipments, 
  and  the latest date when either the supplier can deliver the goods OR until the receiver is able to handle incoming shipments. 
-->
<!ELEMENT DeliveryPeriod (Period)>

<!--
    Definition of an order.  This is the data that is sent to the supplier
    to have them place an order in their order management system. The new
    world order equivalent of a PO.
-->
<!ELEMENT OrderRequest (OrderRequestHeader, ItemOut+)>

<!--
    Header of an order.  This is the data that is sent to the supplier
    to have them place an order in their order management system. Money
    represents the total amount of this order.

    orderID
        The buyer system orderID for this request.  This is an internal
        Buyer unique number.

    orderVersion
        The buyer system order version number for this request. Relevant when
        the OrderRequest represents a change order request. The version number
        for the original document should be 1 and should be incremented by 1 for
        each subsequent version (2,3,4...).

    isInternalVersion
        A value of yes indicates that this OrderRequest is a version whose changes from
        the previous version are deemed internal to the buyer system. Relevant when the
        version being sent to the supplier is not the first version.

    orderDate
        The date and time the order request was created.

    type
        The type of the order request. Defaults to "new".

    requisitionID
        The buyers system requisition id for this entire order. It might be
        the same as orderID, and it might not be included at all.  Must not
        be included if requisitionID is specified in any ItemOut elements.

    shipComplete
        Optional preference for "hold until complete" processing.  Defaults
        to shipping when available if not specified.  Future versions of the
        protocol may extend the datatype of this attribute to include
        additional possible values (such as "unlessGreatlyBackOrdered"?).

    orderType
        "release", indicates that this is a Release Order from an existing
	Master Agreement/ Contract. Default is regular. Type "blanket" indicates
	that this order is a Blanket Order.
    releaseRequired
	"yes" if the blanket order allows released. Currently used only if 
	orderType is "blanket".
    effectiveDate
	Date the order is available for ordering. If orderType is "blanket", 
	effectiveDate is required. Otherwise it is optional. Currently only
	used with blanket orders.
    expirationDate
	Date the order is no longer available. If not defined, end date is open
	ended. Currently only used with blanket orders.
    agreementID
        Identifies associated agreement corresponding to the Release Order.
	At an implementation level it has to be validated that if the orderType
	is 'release' then the appropriate agreementID is also provided.
    agreementPayloadID
        Optional PayloadID for the corresponding Master Agreement.

    parentAgreementID
	Used only in the context of a Order of type "blanket". This identifies the
	parent blanket order if the current order is part of an hierarchy.

    parentAgreementPayloadID
        Optional PayloadID for the corresponding Master Agreement.
        
    pickUpDate
  	Specifies the date when the goods can be/will be provided for picking up and delivery

    requestedDeliveryDate
	The requested delivery date reflects the time when the buyer is willing to receive the goods.

    Total 
	If the Order is of type "blanket", the Total element is not used to compute
	the sum of the item level subtotals. The total is used to indicate the maximum
	commitment with the supplier. The total will not add upto the individual item
	level sub total or MaxAmounts. The item level MaxAmounts should not exceed the
	header level total. If the item level MaxAmount is not specified it is assumed
	that the Item level maximum amount is the same as the Total.
    
     DeliveryPeriod
     	Start and end date for the delivery.
     	
     IdReference
       ID reference is Within the application context (for example,
a certain pair of buyer and supplier), 
       the (identifier, domain) pair
 should be unique.
 
	OrderRequestHeaderIndustry
	Industry specific header information  

    The contained DocumentReference element would appear in a document only
    when the type is "update" or "delete".  In that case, the
    DocumentReference would reference the most recent OrderRequest document
    for the order.  For example when an order is created, updated and then
    deleted, the final document should contain a DocumentReference
    referring to the OrderRequest with type="update".  That document would,
    in turn, refer to the original (type="new") OrderRequest document.
-->
<!ELEMENT OrderRequestHeader (Total, ShipTo?, BillTo, Shipping?, Tax?,
                              Payment?, PaymentTerm*, Contact*, Comments?, Followup?, ControlKeys?,
                              DocumentReference?, SupplierOrderInfo?,  TermsOfDelivery?, DeliveryPeriod?, IdReference*, OrderRequestHeaderIndustry?, Extrinsic*)>
<!ATTLIST OrderRequestHeader
    orderID    %string;        #REQUIRED
    orderDate  %datetime.tz;   #REQUIRED
    orderType  (release| regular | blanket) "regular"
    releaseRequired (yes) #IMPLIED
    type       (new | update | delete)  "new"
    orderVersion %number;      #IMPLIED
    isInternalVersion  (yes)   #IMPLIED
    parentAgreementID %string;       #IMPLIED
    parentAgreementPayloadID %string; #IMPLIED
    effectiveDate  %datetime.tz;     #IMPLIED
    expirationDate %datetime.tz;    #IMPLIED
    agreementID %string;       #IMPLIED
    agreementPayloadID %string; #IMPLIED
    requisitionID   %string;   #IMPLIED
    shipComplete    (yes)      #IMPLIED
    pickUpDate    %datetime.tz;   #IMPLIED
    requestedDeliveryDate     %datetime.tz;   #IMPLIED
>
<!--
    Definition of a Master Agreement.  This is the electronic document representing the 
    Master Agreement that was created and agreed upon in the Buying organizations.
-->
<!ELEMENT MasterAgreementRequest (MasterAgreementRequestHeader, AgreementItemOut*)>

<!--
   Header of an Agreement.  This is the header level information in the Agreement.
   agreementID
	 The buyer system agreementID for this request.  the Master Agreement Number in Buyer.
   agreementDate
	 The date and time the agreement request was created. 
	 This is different from the effective and expiry date of the agreement.
   agreementType
	 Identifies if this is a Value based agreement or quantity based Agreement.
   requestType
	 The type of the agreement request. Defaults to "new".
   effectiveDate
         Date the Master Agreement is available for ordering/releases.
   expirationDate
         Date the Master Agreement is no longer available.
   parentAgreementPayloadID
	 PayloadID for the corresponding parent document that this agreement is derived from.
   operation: 
	"delete" operation will be used to cancel an existing Master Agreement, the
	 assumption here is that the delete request will be an exact replica of the 
	 original request.
	 "new" operation identifies a new MasterAgreement transaction.
	 "update" operation identified an update to an existing transaction. 
	 the DocumentReference attribute should be used to indicate the Orignal
	 Document information.
   Note: 
	 Use "Contact" element to supply any additional Address or Location information.
-->

<!ELEMENT  MasterAgreementRequestHeader (MaxAmount?, MinAmount?, 
					 MaxReleaseAmount?, MinReleaseAmount?, 
					 Contact*,Comments?, DocumentReference?,  Extrinsic*)> 
<!ATTLIST MasterAgreementRequestHeader
    agreementID    %string;		   #REQUIRED
    agreementDate  %datetime.tz;	   #REQUIRED
    type	   (value | quantity)	   "value"
    effectiveDate  %datetime.tz;	   #REQUIRED
    expirationDate %datetime.tz;	   #REQUIRED
    parentAgreementPayloadID %string;      #IMPLIED
    operation      (new | update | delete) "new"
>

<!--
    The representation of a  agreement line item as it needs to be for sending to a
    supplier.
    maxQuantity 
          maximum quantity for this particular lineItem
    minQuantity 
          minimum quantity for this particular lineItem
    maxReleaseQuantity 
          maximum quantity per release for this particular lineItem
    minReleaseQuantity 
          minimum quantity per release for this particular lineItem

    Note :
	  The #lineNumber attribute in the <ItemOut> will be used to specify the corresponding 
	  lineNumber on the Master Agreement in the Procurement Application.
	  At an implementation, level checks should be made to validate this.
    Note :
	  The quantity attribute in the ItemOut tag should be set to one and ignored at 
	  the Mater Agreement implementation processing stage. 
    Note :
	  The MaxReleaseAmount/Quantity and MinReleaseAmount/Quantity at an item level i
	  indicate the ItemLevel amounts and quantities per release.
-->
<!ELEMENT AgreementItemOut (MaxAmount?, MinAmount?, MaxReleaseAmount?, MinReleaseAmount?, ItemOut)>
<!ATTLIST AgreementItemOut
   maxQuantity		%r8;      #IMPLIED
   minQuantity		%r8;      #IMPLIED
   maxReleaseQuantity	%r8;      #IMPLIED
   minReleaseQuantity	%r8;      #IMPLIED
>

<!--
    The maximum amount  for something.
-->
<!ELEMENT MaxAmount (Money)>

<!--
    The minimum amount  for something.
-->
<!ELEMENT MinAmount (Money)>

<!--
    The contractual maximum amount per Release of this Master Agreement.
-->
<!ELEMENT MaxReleaseAmount (Money)>

<!--
 The contractual minimum amount per Release of this Master Agreement
-->
<!ELEMENT MinReleaseAmount (Money)>

<!--
    The Overall Limit amount for something.
-->
<!ELEMENT OverallLimit (Money)>

<!--
     The Expected Limit amount for something.
-->
<!ELEMENT ExpectedLimit (Money)>

<!--
    The maximum quantity  for something.
-->
<!ELEMENT MaxQuantity (#PCDATA)> <!-- number -->

<!--
    The minimum quantity  for something.
-->
<!ELEMENT MinQuantity (#PCDATA)> <!-- number -->

<!--
    The contractual maximum quantity per Release of a contract.
-->
<!ELEMENT MaxReleaseQuantity (#PCDATA)> <!-- number -->

<!--
    The contractual minimum quantity per Release of a contract.
-->
<!ELEMENT MinReleaseQuantity (#PCDATA)> <!-- number -->


<!-- Followup

     Location to which future StatusUpdateRequest documents should be
     posted.  In general, this is the input location for any later
     documents which reference the current OrderRequest document.
-->
<!ELEMENT Followup (URL)>

<!-- PunchOut* Elements -->
<!--
    Definition of a PunchOut Setup Request.  This is the data that is sent
    to the external system that the procurement application is going to
    extract catalog data from.

    The BrowserFormPost element contains the URL we would like the browser
    re-directed to when the PunchOut shopping experience is finished (where
    the PunchOutOrder message should be returned).
-->
<!-- PurchaseRequisitionRequest* Elements -->
<!--
    Definition of Purchase Requisition.  This is the data that is sent from the Buyer
    to another buyer system.
-->
<!ELEMENT PurchaseRequisitionRequest (PurchaseRequisition)>

<!ELEMENT PurchaseRequisition (PurchaseRequisitionHeader, ItemIn*)>

<!--
    Header of an Purchase Requisition.  

    requisitionID
        The buyer system requisitionID  for this request.  This is an internal
        Buyer unique number.

    requisitionVersion
        The buyer system requisition version number for this request. Relevant when
        the PurchaseRequisitionRequest represents a change Requisition request. The version 
        number for the original document should be 1 and should be incremented by 1 for
        each subsequent version (2,3,4...).

    requisitionDate
        The date and time the Requisition request was created.

    type
        The type of the Requisition request. Defaults to "new".

       
    The contained DocumentReference element would appear in a document only
    when the type is "update" or "delete".  In that case, the
    DocumentReference would reference the most recent PurchaseRequisitionRequest document
    for the order.  For example when an requisition is created, updated and then
    deleted, the final document should contain a DocumentReference
    referring to the PurchaseRequisitionRequest with type="update".  That document would,
    in turn, refer to the original (type="new") PurchaseRequisitionRequest document.
-->

<!ELEMENT PurchaseRequisitionHeader (Shipping?, Tax?, Total?, ShipTo?, BillTo?, Contact*, Comments?,
                                     DocumentReference?, Extrinsic*)>
<!ATTLIST PurchaseRequisitionHeader
   requisitionID %string;        #IMPLIED
   requisitionDate %datetime.tz;   #IMPLIED
   type       (new | update | delete)  "new"
   requisitionVersion %number;      #IMPLIED
>

<!ELEMENT PunchOutSetupRequest (BuyerCookie, Extrinsic*, BrowserFormPost?,
                                Contact*, SupplierSetup?, ShipTo?,
                                SelectedItem?, ItemOut*)>
<!ATTLIST PunchOutSetupRequest
    operation  (create | inspect | edit | source)  #REQUIRED
>

<!ELEMENT BuyerCookie ANY> <!-- any valid XML data -->

<!ELEMENT SelectedItem (ItemID)>
<!ELEMENT SupplierSetup (URL)>

<!ELEMENT PunchOutSetupResponse (StartPage)>

<!--
    Definition of a PunchOut Order Message.  This is the data that is sent
    back to the procurement application from the external system that the
    PunchOut Request was targeted at.
-->
<!ELEMENT PunchOutOrderMessage (BuyerCookie, PunchOutOrderMessageHeader,
                                ItemIn*)>

<!--
     Header of a PunchOut Order Request.  This is the data that is sent from
     the supplier to transfer the supplier acquired shopping basket back to
     the buyer system.

     operationAllowed
          Highest operation allowed on the PunchOut shopping basket.
          "create" allows only later OrderRequest operations on these items.
          "inspect" adds a PunchOutSetupRequest with operation="inspect".
          And, "edit" allows operation="edit" in that later Setup request.

     quoteStatus 
          "pending"  - Identifies that the transaction is still pending
	  "final" - Identifies that the transaction is complete
-->
<!ELEMENT PunchOutOrderMessageHeader (SourcingStatus?, Total, ShipTo?, Shipping?, Tax?, SupplierOrderInfo?)>
<!ATTLIST PunchOutOrderMessageHeader
    operationAllowed  (create | inspect | edit)  #REQUIRED
    quoteStatus (pending|final) "final"
>

<!-- ====
    Other small Request elements.
==== -->

<!--
    Request to update the status of an earlier transaction.

    DocumentReference 
        A reference by payloadID to a cXML document to be updated.  This 
        element can be omitted only when InvoiceStatus is specified and
        the InvoiceStatus contains InvoiceIDInfo.

-->
<!ENTITY % cxml.statuses  "(PaymentStatus |
			    SourcingStatus | InvoiceStatus | DocumentStatus | IntegrationStatus)">
<!ELEMENT StatusUpdateRequest  (DocumentReference?, Status, (%cxml.statuses;)?, Extrinsic*)>

<!--
    Status Update for Document Status

        DocumentInfo
            ID of a document entry known to the system. This attribute is used to reference a document in StatusUpdateRequest when DocumentReference is omitted.

    Comments
        Comments associated with the status update.

    type
        Type of the document status.
-->

<!ELEMENT DocumentStatus (DocumentInfo?, ItemStatus*, Comments*)>
<!ATTLIST DocumentStatus
        type              %string;               #REQUIRED
        >

<!--
  When a StatusUpdateRequest is send with a DocumentStatus, then you could send more detailed information about the original item.

  type
        Specifies which kind of status that item should have. Possible values are:
        	rejected - that item was not accepted
        	accepted - original ConfirmationItem is accepted as it was send

  code
        optional code from the backend ERP system
  
  parentLineNumber
		Represents the line number of its parent line number to idenfity this 
		item's hierarchical parent item in a response message. 
		
  ReferenceDocumentInfo
        contains details of referenced document
		
  Comments
        may be used to have a more user readable description of the code
-->
<!ELEMENT ItemStatus (ReferenceDocumentInfo, Comments*)>
<!ATTLIST ItemStatus
	type        %string;  #REQUIRED
	code        %string;  #IMPLIED
	parentLineNumber       %uint;         #IMPLIED
>

<!--
    Defines the ID of a document known to the system.

    DocumentID
        The id of a document known to the system.

    DocumentType
        The document type.

    DocumentDate
        The document date.
-->
<!ELEMENT DocumentInfo EMPTY>
<!ATTLIST DocumentInfo
        documentID              %string;               #REQUIRED
        documentType            %string;               #REQUIRED
        documentDate            %datetime.tz;          #IMPLIED
        >

<!--
    A reference to an attachment containing cXML document. 

    Attachment
        A reference to the attachment containing a cXML document.  The 
        attachment must be either a single, complete cXML document or another 
        MIME envelope containing a single, complete cXML document with 
        attachments.
-->
<!ELEMENT cXMLAttachment (Attachment)>

<!--
    Request to forward a cXML document to another party.  This Request
    occurs in multiple DTD files and is used depending on where (in which
    DTD) the forwarded message resides.

    cXMLAttachment
        A reference to the attachment containing the cXML document being 
        forwarded.  Refer to cXMLAttachment for more details.

    cXML
        Deprecated - Do Not Use.
-->
<!ELEMENT CopyRequest (cXMLAttachment | cXML)>

<!--
    Attribute processingMode of CopyRequest element specifies whether the
    cXML document is meant for processing, information only or copy.

    info : The cxml document is for information only
    process : The recipient of the cxml document should process the document.
    copy : the cxml document is a copy as a result of Path element with copy type in the source document.
-->
<!ATTLIST CopyRequest
    processingMode (info | process | copy)  #IMPLIED>

<!--
    Status for a pre-existing sourcing transaction. The textual content indicates
    the display information. "action" attribute defines the context of this message
    based on the value.

    approve : Approve the pending transaction
    deny : deny pending transaction
    cancel : cancel any preexisting transaction.

-->
<!ELEMENT SourcingStatus (#PCDATA)>
<!ATTLIST SourcingStatus
action    (approve | cancel | deny )  #IMPLIED
xml:lang %xmlLangCode; #REQUIRED>

<!--
	IntegrationStatus is used to allow external parties to provide document status visibility
	after the document is processed and delivered by AN.
	
	documentStatus indicates document status and could be one of the following values:
	deliverySuccessful, The document was successfully delivered to the customer (but no processing confirmation has been issued yet)
	deliveryDelayed, The document is experiencing delays while trying to reach the customer
	deliveryFailed, The document could not be sent to the customer due to a failure between the gateway and the customer
	deliveryReady, When sending to the buyer, the document has been queued and is ready for pick-up
	customerConfirmed, The customer has confirmed that the document has been processed successfully
	customerReceived, The customer has confirmed that the document has been received successfully
	customerFailed, The customer has received the document and is reporting a failure in the content
-->
<!ELEMENT IntegrationStatus (IntegrationMessage?)>
<!ATTLIST IntegrationStatus
	documentStatus     (deliverySuccessful | deliveryDelayed | deliveryFailed | deliveryReady
	| customerConfirmed | customerReceived | customerFailed)        #REQUIRED>

<!--
	IntegrationMessage indicates the type/result of the message used by
	external parties.
	
	isSuccessful: indicates whether the message result is successful or not
	type: indicates the message type, for example, 997/824/MDN
-->
<!ELEMENT IntegrationMessage (#PCDATA)>
<!ATTLIST IntegrationMessage
	isSuccessful	(yes | no)	#REQUIRED
	type	%string;	#REQUIRED>

<!--
    How the shipment will travel on this segment.  Each carrier within a
    segment controlled by a third party logistics provider provides
    tracking information to that provider externally.  The
    ShipNoticeRequest includes tracking information at the ShipControl
    level only.

    One Route element may describe only a single mode of travel.  If
    described at all, each mode of a multi-modal route must be described by
    a separate Route element.  It is not necessary to describe every leg of
    the journey to the buyer's ShipTo location.

    The only Contact roles likely to be sensible in this element are
    "carrierCorporate" (details the contact information the supplier has
    about the carrier organization), "shipFrom" and "shipTo".  The
    "carrierCorporate" role would be relevant at this level only when a
    third party is providing tracking information across multiple carriers.
    A Contact element with role "shipFrom" must appear in all Route
    elements after the first.  Route elements are not required to describe
    the entire travel under a specific carrier's control.  They may
    describe a discontinuous stream of events, starting and ending at
    different times and locations.

    Elements in the Contact list may appear in any order.  A contact role
    (Contact@role attribute value) must not appear more than once within a
    Route element.

    method
        Qualifier identifying the transportation type code:
		- ship: transportation by boat (ocean).
		- rail: transportation by rail
		- motor: transportation by land motor craft (common carrier)
		- air: transportation by flight
		- mail: This code is provided for practical reasons, despite the
			fact that mail is not a genuine mode of transport. In many
			countries, the value of merchandise exported and imported
			by mail is considerable, but the exporter or importer concerned
			would be unable to state by which mode postal items had passed
			the national border
		- multimodal: This code is provided for practical reasons, despite
			the fact that multimodal transport is not a genuine mode of
			transport. It can be used when goods are carried by at least
			two different modes from a place at which the goods are taken
			in charge by a transport operator to a place designated for
			delivery, on the basis of one transport contract. (Operations
			of pick-up and delivery of goods carried out in the performance
			of a unimodal transport, as defined in such a contract, shall
			not be considered as multimodal transport.)
		- fixedTransport: This code applies to installations for continuous
			transport such as pipelines, ropeways and electric power lines.
		- inlandWater: This code is used only in such cases where the
			application of waterborne transport is reported separately
			than maritime transport.
		- unknown: This code can be used when the mode is not known or when
			information on it is not available at the time of issuing the
			document concerned.
		- custom: This code can be used whenever a custom code is used for
			the method. You can put the actual custom code as a text child
			this element.
	means
		Particular vessel, vehicle or other device used for transport of goods.
		The value of means depends on the value of method. Examples include:
		
		When the value of method is "ship", the possible values of means are:
		- cargoVessel: Vessel designed to carry general cargo.
		- unitCarrier: Vessel designed to carry unit loads.
		- bulkCarrier: Vessel designed to carry bulk cargo.
		- tanker: Vessel solely equipped with tanks to carry cargo.
		- liquefiedGasTanker: Tanker designed to carry liquefied gas.
		- otherSpecialTanker: Tanker designed to carry other special liquids.
		- cargoAndPassengerVessel: Vessel designed to carry cargo and passengers.
		- otherVessel: Sea-going vessel, not otherwise specified.
		- fishingBoat: Vessel designed for fishing.
		- floatingStructure: Any floating structure.
		
		When the value of method is "rail", the possible values of means are:
		- train: One or more rail wagons pulled or pushed by one or more
				locomotive units, or self-propelled, that move over rail tracks.
		- freightTrain: Train for carrying freight.
		
		When the value of method is "motor", the possible values of means are:
		- truck: Automotive vehicle designed for hauling loads.
		- tractor: Automotive vehicle with an engine designed for pulling.
		- van: Closed automotive vehicle designed for carrying freight.
		- carCarrier: Automotive vehicle designed for carrying motorcars.
		- shovelLoader: Automotive vehicle designed for shovelling sand and other bulk material.
		- straddleCarrier: Automotive vehicle designed for lifting and transporting containers
		- mobileCrane: Automotive vehicle with cargo crane.
		- bus: Automotive vehicle designed for carrying more than 8 passengers including the
				driver.
		- car: Automotive vehicle designed to carry a small number of passengers.
		- taxi: Automotive vehicle licensed to ply for hire.
		
		When the value of method is "air, the values for means are specified in the
		IATA (International Air Transport Association) publication Standard Schedules
		Information Manual (SSIM) under the section "ATA/IATA Aircraft Types". The
		referenced codes cover all aircraft that are flown, or are soon to be flown,
		for commercial scheduled or chartered services only, or have been announced
		by the manufacturer and for which airline orders have been placed.

		When the value of method is "multimodal": as this includes multiple segments,
		each of which may have different mode and means, the only possible value
		for means is "unknown".
		
		When the value of method is "fixedTransport", the possible values of means are:
		- unknown: Fixed transport installation of unknown type.
		- pipeline: A line of one or more pipes for continuous transport of
				liquid or gas commodity.
		- powerline: A line of one or more cables or wires for continuous
				transport of electricity.
				
		When the value of method is "inlandWater", the possible values of means are:
		- unknownVessel: Vessel of unknown type.
		- motorFreighter: Motorized vessel designed for carrying general cargo.
		- motorTanker: Motorized vessel designed for carrying liquid cargo.
		- containerVessel: Vessel designed for carrying containers.
		- gasTanker: Vessel with tanks designed for carrying gas
		- tug: Vessel designed to push or pull another vessel.
		- barge: Lighter designed for carrying general cargo.
		- pushTow: Vessel designed for pushing/towing, facilitating the movement
				of one or more cargo barges.
		- fishingBoat: Vessel designed for fishing.
		- bunkerShip: Vessel designed for carrying and delivering bunkers.

		When the value of method is either "mail" or "unknown", there are no
		specific values of means defined.
		
    startDate
        The date and time this shipment started this part of the trip.
        Required in all Route elements after the first.
    endDate
        The date and time this shipment ended this part of the trip.  Must
        be after startDate.  If any Route elements follow, the startDate of
        that element must not precede this value.
-->
<!ELEMENT Route (#PCDATA | Contact)* >
<!ATTLIST Route
    method         (air | motor | rail | ship | mail | multimodal |
					fixedTransport | inlandWater | unknown | custom) 
											   #REQUIRED
	means				 NMTOKEN			   #IMPLIED
    startDate            %datetime.tz;         #IMPLIED
    endDate              %datetime.tz;         #IMPLIED
>

<!--
    Additional information for transportation of the shipment.
    
    Description
        Free text description of shipment instructions.
-->
<!ELEMENT ShippingInstructions (Description?)>

<!--
    The shipping contract number specified for the transportation of the shipment.
    
    #PCDATA
        The contract number specified by the buyer or seller for the transport. 
-->
<!ELEMENT ShippingContractNumber (#PCDATA)>

<!--
    The terms for transportation of the shipment. This specifies that to whom amongst the buyer and seller
    the title, risk and insurance cost will pass to.
    
    value
        The terms of transportation.
        Typically this may be Free-Carrier, CostAndFreight, DeliveredAtFrontier etc. or an option to specify a free text.
        If the value of this attribute is specified as other, specifying
        a description is mandatory.
    #PCDATA
        Free text description of means of transportation. The text desription must be
        provided if the value "Other" is specified.

-->
<!ELEMENT TransportTerms (#PCDATA)>
<!ATTLIST TransportTerms
    value %string; #REQUIRED
>

<!--
    The transport information for the shipment described by the order 
    and ship notice. This information comes from the order 
    specified by the buyer and have to be presented in the ship notice
    so that these can be edited by supplier, if required. This information
    and possible changes have to be carried back to the buyer.

    Route
        The method or type of transportation of the shipment.
    ShippingContractNumber
        Contract number for the transport specified by the buyer or seller.
    ShippingInstructions
        Optional instructions for the shipment.
-->
<!ELEMENT TransportInformation (Route?, ShippingContractNumber?, ShippingInstructions?)>

<!--
    The mode of payment for order items shipped. This element is mandatory for 
    specifying terms of delivery.

    value
        The shipping payment method used for the order. Possible values include the following -
        Account, AdvanceCollect, AdvancePrepaid, Other etc.
    #PCDATA
        Free text description of shipping payment method. The text desription must be
        provided if the value "Other" is specified.
-->
<!ELEMENT ShippingPaymentMethod (#PCDATA)>
<!ATTLIST ShippingPaymentMethod
    value %string; #REQUIRED
>

<!--
    This element specifies the terms of delivery code. The free text description is optional
    for an order or a ship notice except for the case when "Other" is specified for value.
    
    value
        The value of the code that specifies terms of delivery. 
        Indicates whether the terms relate to price conditions, delivery conditions, 
        transport conditions, or a combination of these, or any other.
        If the value of this attribute is specified as other, specifying
        a description is mandatory. Possible values include the following -
        PriceCondition, DespatchCondition, PriceandDespatchCondition, CollectedByCustomer, 
        TransportCondition, DeliveryCondition, Other etc.
    #PCDATA
        Free text description of terms of delivery code. The text desription must be
        provided if the value "Other" is specified.

-->
<!ELEMENT TermsOfDeliveryCode (#PCDATA)>
<!ATTLIST TermsOfDeliveryCode
    value %string; #REQUIRED
>
 
<!--
    The terms of delivery for the shipment described by the order 
    and ship notice. These terms come from the Purchase Order 
    specified by the buyer and have to be presented in the ship notice
    so that these can be edited by supplier, if required. These terms
    and possible changes have to be carried back to the buyer.

    TermsOfDeliveryCode
        The code that specifies terms of delivery. Indicates whether the terms relate to price conditions, 
        delivery conditions, transport conditions, or a combination of these, or any other.
        One must specify description for this if "Other" is specified as the value.
    ShippingPaymentMethod
        The mode of payment for order items shipped. Specifying a mode of payment is a must. Examples include:
        Account, AdvanceCollect, AdvancePrepaid etc.
    TransportTerms
        This specifies that to whom amongst the buyer and seller the title, risk and insurance cost will pass to.
    Address
        Location and city specified with the terms.
    Comments
        Optional structured comments can be specified here for multiple types:
        Type "Transport"
            Additonal description of the transport. Examples include:
            "Delivered To Site / Stores", "OVERNIGHT FIRST CLASS", "To Be Collected by Courier" etc.
        Type "TermsOfDelivery"
            Additonal delivery instructions can be provided along with
            the other terms.
-->
<!ELEMENT TermsOfDelivery (TermsOfDeliveryCode, ShippingPaymentMethod, TransportTerms?, Address?, Comments*)>

<!--
	SealID
		A seal is used to preserve integrity of a transport or cargo shipment. Seals come in different versions and technical approaches with one common characteristic: a unique ID given by the owner or the responsible party. The SealID is used to internationally track a container, truck, vessel or other cargo property along the route.
-->
<!ELEMENT SealID (#PCDATA)>
<!--
	SealingPartyCode
		Is the company code for the party that has given the seal in its ID (usually the owner of the goods or the freight forwarder that loaded the cargo.
-->
<!ELEMENT SealingPartyCode (#PCDATA)>
<!--
	EquipmentIdentificationCode
		Mainly for internal transport and storage purposes the packing equipment is or will be marked with unique codes in order to monitor and manage movement and storage location. Coding can be temporarily or permantent (with GUID-like codes or RFID coding, but unique within the local addressing scheme.
-->
<!ELEMENT EquipmentIdentificationCode (#PCDATA)>
<!--
    The terms for transportation of the shipment. 

	SealID
		A seal is used to preserve integrity of a transport or cargo shipment. Seals come in different versions and technical approaches with one common characteristic: a unique ID given by the owner or the responsible party. The SealID is used to internationally track a container, truck, vessel or other cargo property along the route.
	
	SealingPartyCode
		Is the company code for the party that has given the seal in its ID (usually the owner of the goods or the freight forwarder that loaded the cargo.
	
	EquipmentIdentificationCode
		Mainly for internal transport and storage purposes the packing equipment is or will be marked with unique codes in order to monitor and manage movement and storage location. Coding can be temporarily or permantent (with GUID-like codes or RFID coding, but unique within the local addressing scheme.
-->
<!ELEMENT TermsOfTransport (SealID?, SealingPartyCode?, EquipmentIdentificationCode?, TransportTerms?, Dimension*, Extrinsic*)>

<!--
	For information of referenced document.

	DocumentInfo
	The element provides info (such id, type and date) about a document. 
	Following are the possible document types:
	salesOrder refers to sales order triggering the PO.
	customerOrder refers to  the customer order maintained in sales order.
	freightOrder refers to order for transportation.
	productionOrder refers to order that specifies  which material is to be produced, where it is to be produced, which operations are 
					required to do this  and on which date production is to take place. It also defines how the order costs are to be settled.
    purchaseOrder refers to Orders used to replenish based on Supplier Managed Inventory process
	DocumentReference
	Reference to an earlier document (for example, OrderRequest).  

	DateInfo
	Information of date associated with the document/item.  Following are the possible dates:
	expectecDeliveryDate refers to the expected delivery date for the material to be received at the partner location
	expectedShipmentDate refers to the expected ship date for the material is used to determine when the supplier is expected to ship the material from their location.
	productionStartDate refers to the production start date
	productionFinishDate refers to the production finish date

	Contact
	It is used for contact information for the referenced document

	lineNumber
	Line number of an item in the referenced document

	status
	status used to refer to the referenced document.  Following are the possible values.
	created
	released
	open
	completed
	closed
	cancelled
-->
<!ELEMENT ReferenceDocumentInfo ((DocumentInfo | DocumentReference)?, DateInfo*, Contact*, Extrinsic*)>
<!ATTLIST ReferenceDocumentInfo
	lineNumber  %uint;                   #IMPLIED      
	status (created | released | open | completed | closed | cancelled )     #IMPLIED                       
>

<!--
	For information of date.

	type 
	Date type
			expectedShipmentDate refers to the expected ship date for the material is
				used to determine when the supplier is expected to ship the material
				from their location
	productionStartDate refers to the production start date
	productionFinishDate refers to the production finish date

			requestedPickUpDate refers to the pick up date as requested by the party
				arranging the transport.
			expectedPickUpDate refers to the date when the logistic provider expects to
				pick up the materials.
			actualPickUpDate refers to the actual pick up date, as it has occurred.
			
			requestedDeliveryDate refers to the delivery date as requested by the party
				arranging the transport.
			expectedDeliveryDate refers to the expected delivery date for the material
				to be received at the partner location
			actualDeliveryDate refers to the actual delivery date of the goods.
			confirmedDeliveryDate refers to the delivery date that has been confirmed
				to be delivered by the seller.
			confirmedShipmentDate refers to the shipment date that has been confirmed by
				to be shipped by seller.
	date
	Date value
-->
<!ELEMENT DateInfo (Extrinsic*)>
<!ATTLIST DateInfo
	type	(expectedShipmentDate | productionStartDate | productionFinishDate |
				requestedPickUpDate | expectedPickUpDate | actualPickUpDate | 
				requestedDeliveryDate | expectedDeliveryDate | actualDeliveryDate |
				confirmedShipmentDate | confirmedDeliveryDate)	#REQUIRED
	date	%datetime.tz;				#REQUIRED
>

<!--
	Priority
	Priority indicator, used to drive the priority of the orders for the suppliers.
	Example:
	Level 1 is Very High Priority
	Level 2 is High Priority 
	Level 3 is Medium Priority
	Level 4 is Medium Low Priority
	Level 5 is Low Priority

	Description
	Description for priority (such as very high, high, medium, medium low, low).

	level
	There are 5 levels (1, 2, 3, 4, 5).  Level 1 has the highest priority.  Level 5 has the lowest priority.
	 
	sequence
	An unique secondary order number for prioritizing items with the same priority level. Two items with the same priority level are not allowed to have the same sequence number.
	
	inventory_level
	Inventory level shows the % inventory (buffer) level with respect to target. Possible values 0.0% - 100.0%.
-->
<!ELEMENT Priority (Description?)>
<!ATTLIST Priority
  level           ( 1 | 2 | 3 | 4 | 5  )  #REQUIRED
  sequence        %ui8;                   #IMPLIED
  inventory_level %r8;                    #IMPLIED
>

<!--
    ExternalDocumentType is managed in the external systems like ERP. This would be sent for for PO to uniquely identify the document.

    For example,
    <ExternalDocumentType documentType="ZNB">
        <Description xml:lang="en">Standard Purchase Order</Description>
    </ExternalDocumentType>
-->

<!ELEMENT ExternalDocumentType (Description?)>
<!ATTLIST ExternalDocumentType        
	documentType    %string;    #REQUIRED
>

<!--
	Industry specific header information  

	ReferenceDocumentInfo 
	Details of referenced document 

	Priority
	Priority indicator, it is used to drive the priority of the orders for the suppliers
-->
<!ELEMENT OrderRequestHeaderIndustry (ReferenceDocumentInfo*, Priority?, ExternalDocumentType?)>

<!--   Industry specific item information 
	ReferenceDocumentInfo 
	It contains the details of referenced document

	Priority
	Priority Indicator used to drive the priority of the item ordered by the buyer.

    QualityInfo
    The representation of the quality information of a line item.

	planningType
	To specify different production planning strategies. Following are possible strategies:
	MTO: Make to Order
	MTS: Make to Stock
	ATO: Assemble to Order
	CTO: Configure to Order
-->
<!ELEMENT ItemOutIndustry (ItemOutRetail?, ReferenceDocumentInfo*, Priority?, QualityInfo?)>
<!ATTLIST ItemOutIndustry
    planningType	 ( MTO | MTS | ATO | CTO )	#IMPLIED
>

<!--    Retails industry item information 
	PromotionVariantID
	Used when only one or some variants of an article are promoted

	PromotionDealID 
	Number assigned by a supplier to a special promotion activity. Promotions affect the forward planning/ordering process (and the related pricing)
-->
<!ELEMENT ItemOutRetail (PromotionVariantID?, PromotionDealID?)> 

<!--
    Details about the packaging of this line item.

    Zero or more PackagingCode elements may appear in the Packaging
    element.  Each PackagingCode must contain a single string corresponding
    to the packaging for this item.  When multiple PackagingCode elements
    appear, all must describe the same packaging in different languages or
    locales.  (No two PackagingCode elements may have the same xml:lang
    attribute.)  Elements in such a list may appear in any order.

    The dimensions mentioned in the Dimension element list may appear in
    any order.  A particular dimension (Dimension@type attribute value)
    must not appear more than once in a Packaging element.
    
    	Description
        	The Package description.

	PackagingLevelCode
	Describes the level (inner, outer, intermediate) for packages.
	
	PackageTypeCodeIdentifierCode 
	Unique ID of packaging material. This helps receiving side for unloading and storage.
	
	ShippingContainerSerialCode
	Serial number of a package that helps to identify package during transportation and inventory.
    
    ShippingContainerSerialCodeReference
    Reference from a package with shipping code to the shipping code of the next higher package level. It references the parent ShippingContainerSerialCode.
	
	PackageID
	Package related IDs.
	
	ShippingMark
	Information about packaging proposals and packaging hierarchy.
	
	OrderedQuantity
	The quantity ordered in purchase order.
	
	DispatchQuantity
	The dispatch quantity in package.
	
	FreeGoodsQuantity
	Quantities delivered but not charged. 
	
	QuantityVarianceNote
	Quantity Variance Note gives detailed information about partial delivery.
	
	BestBeforeDate
	Gives the best before date for all goods related to food, drugs, chemicals and others.

-->
<!ELEMENT Packaging (((PackagingCode+, Dimension*) | Dimension+), Description?, 
				PackagingLevelCode?, PackageTypeCodeIdentifierCode?, ShippingContainerSerialCode?, 
                ShippingContainerSerialCodeReference?,
				PackageID?, ShippingMark*, OrderedQuantity?, DispatchQuantity?, 
				FreeGoodsQuantity?, QuantityVarianceNote?, BestBeforeDate?, Extrinsic*)>

<!--
    One language-specific code for the packaging of this item.  Values such
    as "pallet", "skid" and "truck load" may be appropriate (for an
    English-based locale).

    xml:lang
        The language or locale in which the PackagingCode content (the
        value of the code) is written.
-->
<!ELEMENT PackagingCode (#PCDATA)>             <!-- string -->
<!ATTLIST PackagingCode
    xml:lang             %xmlLangCode;         #REQUIRED
>

<!--
    A single dimension for the packaging. It also can be used to define item dimensions.
    quantity
        Size in this dimension.  Expressed in the units given in the UnitOfMeasure element.
    type
        Type of dimension.  Supported values include:
        length - The length of the packaging or item.
        width - The width of the packaging or item.
        height - The height of the packaging or item.
        weight - The weight  or net weight of the packaging or item.
        volume - The volume or net volume of the packaging or item.
        stackHeight -The stack height of packaging. This indicates total height of the stacked packages. 
        grossWeight - The gross weight is the total weight including packaging.
        grossVolume -The gross volume is the total volume including packaging. 
        unitGrossWeight  - The unit gross weight of the item.
        unitNetWeight  -The unit net weight of the item.
-->
<!ELEMENT Dimension (UnitOfMeasure)>
<!ATTLIST Dimension
    quantity             %r8;                        #REQUIRED
    type (length | width | height | weight | volume | stackHeight | grossWeight | grossVolume | unitGrossWeight | unitNetWeight ) #REQUIRED
>


<!-- Describes the level (inner, outer, intermediate) for packages. It is used in logistics for loading and unloading information. This information qualifies the 
packing level within the packing hierarchy. -->

<!ELEMENT PackagingLevelCode (#PCDATA)>

<!-- This is a unique ID of packaging materials like box, container, pallet and rack. This helps receiving side for unloading and storage. This also defines the 
maximum load or weight of articles -->

<!ELEMENT PackageTypeCodeIdentifierCode (#PCDATA)>

<!--This identifies a package during transport and in inventory. Serial number of a packaging unit like container, box and rack -->
<!ELEMENT ShippingContainerSerialCode (#PCDATA)>

<!--
Reference from a package with shipping code to the shipping code of the next higher package level. It references the parent ShippingContainerSerialCode.
-->
<!ELEMENT ShippingContainerSerialCodeReference (#PCDATA)>


<!-- Unique ID for a package.  GIAI, numbering scheme of GS1 specifying the ownership of an asset.-->
<!ELEMENT GlobalIndividualAssetID (#PCDATA)>


<!-- The ID that helps supplier with handling of any returned package.-->
<!ELEMENT ReturnablePackageID (#PCDATA)>

<!-- The information to track packages based on an internal numbering scheme of the supplier. -->
<!ELEMENT PackageTrackingID (#PCDATA)>

<!-- Packaging related IDs.-->
<!ELEMENT PackageID (GlobalIndividualAssetID?,ReturnablePackageID?,PackageTrackingID?)>

<!-- This contains codes for packaging proposals and packaging hierarchy. Also can contain marking for containers/packages that need special signing or handling 
(hazardous goods, explosives and maximum stack size)-->

<!ELEMENT ShippingMark (#PCDATA)>


<!--This is the ordered quantity from purchase order. -->
<!ELEMENT OrderedQuantity (UnitOfMeasure?) >
<!ATTLIST OrderedQuantity
    quantity	%r8;	#IMPLIED>

<!-- The dispatch quantity in package.-->
<!ELEMENT DispatchQuantity (UnitOfMeasure?)  >
<!ATTLIST DispatchQuantity
    quantity        %r8;       #IMPLIED>

<!--  Quantities delivered but not charged. These can be samples or promotions or just "fill up" articles. These will not be on the commercial invoice (or marked with value 0.00)  -->
<!ELEMENT FreeGoodsQuantity (UnitOfMeasure?)  >
<!ATTLIST FreeGoodsQuantity
    quantity        %r8;       #IMPLIED>


<!-- Detailed information about partial delivery. Used for different measurements (1 lot = 500 pieces) -->
<!ELEMENT QuantityVarianceNote (#PCDATA)>

<!-- The best before date helps with in FDA-related deliveries for go/no-go criteria. This can be used to indicate best before date for all goods related to food, drugs, chemicals etc. -->
<!ELEMENT BestBeforeDate EMPTY>
<!ATTLIST BestBeforeDate
      date         %datetime.tz;    #REQUIRED>
      
<!-- The expiry date  can be used to indicate expiry date for all goods related to food, drugs, chemicals etc. -->
<!ELEMENT ExpiryDate EMPTY>
<!ATTLIST ExpiryDate
      date         %datetime.tz;    #REQUIRED>

<!--
	References a specific item and its relationship with a PO, Invoice and Ship Notice.
    
	quantity
		The quantity included in the document. For example, in TransportRequest,
		this is the quantity contained of this item in a package.
    
-->
<!ELEMENT ItemInfo (ItemID?, Description?, Classification*,
						(ManufacturerPartID, ManufacturerName)?,
						Country?, SupplierBatchID?, ReferenceDocumentInfo*,
						UnitOfMeasure, Extrinsic*)>
<!ATTLIST ItemInfo
	quantity		%r8;		#REQUIRED
>

<!--
    The representation of the quality information of a line item.

    requiresQualityProcess
        A value of yes indicates that this item requires quality process.
    
    IdReference
        Use this element to send Quality Material Control Code and Inspection Certificate type information.
            For Quality Material Control Code, domain is "controlCode".
            For Inspection Certificate type, domain is "certificateType".   
-->
<!ELEMENT QualityInfo (IdReference*)>
<!ATTLIST QualityInfo
	requiresQualityProcess         (yes)          #IMPLIED
>

<!--
    The ShipNoticeLineItemReference element provides a clear 
    reference to the line item  in a prior ShipNoticeRequest document.

    shipNoticeLineNumber
        The line number of current line item, copied from ShipNoticeRequest. 

-->
<!ELEMENT ShipNoticeLineItemReference EMPTY>
<!ATTLIST ShipNoticeLineItemReference
    shipNoticeLineNumber      %uint;                 #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    Transaction Specification documents.
-->

<!-- Basic financial elements used throughout -->

<!--
    The following defines a list of money amounts.

    DepositAmount
        The amount of deposit or prepayment.

    SubtotalAmount
        The subtotal amount.
        
    DiscountAmount
	Defines the discount amount

    FixedAmount
    Defines a new amount

    SpecialHandlingAmount
        The special handling amount.

    ShippingAmount
        The shipping amount.

    GrossAmount
        The gross amount.

    NetAmount
        The net amount.

    DueAmount
        The due amount.

    FeeAmount
        Defines gross amount of the fee associated with a purchase
        in original currency.
-->
<!ELEMENT DepositAmount (Money)>

<!ELEMENT SubtotalAmount (Money)>

<!ELEMENT SpecialHandlingAmount (Money, Description?, Distribution*)>

<!ELEMENT ShippingAmount (Money, Distribution*)>

<!ELEMENT GrossAmount (Money)>

<!ELEMENT NetAmount (Money)>

<!ELEMENT DueAmount (Money)>

<!ELEMENT DiscountAmount (Money)>

<!ELEMENT FixedAmount (Money)>

<!-- 
    Defines gross amount of the fee associated with a purchase in original currency.
    Money - the fee amount
    Fee
        different types of individual fees, for example, service provider fee 
-->
<!ELEMENT FeeAmount (Money, Fee*)>

<!-- 
    Different types of individual fees
    type - the type of fee
-->
<!ELEMENT Fee (Money)>
<!ATTLIST Fee
    type     %string;  #IMPLIED
>

<!ELEMENT DeductionAmount (Money)>

<!ELEMENT DeductedPrice (Money)>

<!--
    Defines a Purchasing Card element used for payment
-->
<!ELEMENT PCard (PostalAddress?)>
<!ATTLIST PCard
    number      %number;  #REQUIRED
    expiration  %date;    #REQUIRED
    name        %string;  #IMPLIED
>

<!--
    TotalCharges represents the total sum of all the charges  applied on the goods and 
    services. This can appear at the  line item and summary in an invoice.
-->
<!ELEMENT TotalCharges (Money)>

<!--
    TotalAllowances represents the total sum of all the allowances applied on the goods and 
    services. This can appear at the  line item and summary in an invoice.
-->
<!ELEMENT TotalAllowances (Money)>

<!--
    TotalAmountWithoutTax represents the sum of the SubTotal, Charges (including special handling 
    charges and shipping charges), Allowances (including discounts). This does not include taxes.
    This can appear at the  line item and summary in an invoice.
-->
<!ELEMENT TotalAmountWithoutTax (Money)>

<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!--
    This element captures spend detail information.  SpendDetail can
    be used in the ItemIn and ItemOut and for the following types of
    messages:

        PunchOutSetupRequest
        PunchOutOrderMessage
        OrderRequest
        ConfirmationRequest

    But not for:

        MasterAgreementRequest

    TravelDetail
        Travel details for the current travel line item.

    LaborDetail
        Labor details for the current temporary labor line item.

    FeeDetail
        Fee details for the current fee line item.
        
    Extrinsic
    	Detail information for the any undefined spend category.  The name
    	attribute of the Extrinsic element should specify the type of the
    	spend category (e.g., (PrintDetail, ProjectLaborDetail))

-->
<!ELEMENT SpendDetail (TravelDetail | FeeDetail | LaborDetail | Extrinsic)>

<!--
    FeeDetail contains additional information about a line item for a fee, 
    which may or may not be recurring.

    UnitRate
        The amount(s) to be paid per unit (of time or other measure).
        In the case of multiple UnitRates (i.e., a "rate schedule"), it is
        customary and expected that each UnitRate will include a
        TermReference to distinguish them.

    Period
        The Period of time over which the fee is charged, if applicable.

    isRecurring 
        Indicates that the fee is recurring (charged more than once).
  -->
<!ELEMENT FeeDetail (UnitRate+, Period?) >
<!ATTLIST FeeDetail
	isRecurring (yes) #IMPLIED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: $
-->

<!--
    LaborDetail contains information about an item for a temporary
    labor engagement. 

    UnitRate
        The amount(s) to be paid per unit (of time or other measure).
        In the case of multiple UnitRates (i.e., a "rate schedule"), it is
        customary and expected that each UnitRate will include a
        TermReference to distinguish them.

    Period
        The Period of time over which the service occurs.

    Contractor
        Identifies the contractor being engaged

    JobDescription
        Description of the job or work to be performed.

    Supervisor
        The person who is expected to supervise the contractor.

    WorkLocation
         Place where the work is expected to be performed.

    supplierReferenceCode
        The supplier's quote or proposal id, for cross-reference.
-->
<!ELEMENT LaborDetail (UnitRate+, Period, Contractor?, JobDescription?, Supervisor?, WorkLocation?, Extrinsic*)>
<!ATTLIST LaborDetail
	supplierReferenceCode %string; #IMPLIED
>
<!--    Text description of a job (service)-->
<!ELEMENT JobDescription (Description)>
<!--    Contact information for the person supervising a job (service)-->
<!ELEMENT Supervisor (Contact)>
<!--    Address of the location where a service is to be performed-->
<!ELEMENT WorkLocation (Address)>
<!--
    	Definition of a Contractor used in the context of temp labor. 
	The contractor is uniquely identified by a contractor identifier. 
	The piece of identification for a contractor is exchanged between 
	the buyer and the supplier prior to sending out order/timecards.
-->
<!--
    	Definition of a Contractor used in the context of temp labor. 
	The contractor is uniquely identified by a contractor identifier. 
	The piece of identification for a contractor is exchanged between 
	the buyer and the supplier prior to sending out order/timecards.
-->
<!ELEMENT Contractor (ContractorIdentifier, Contact)>

<!--
    	Definition of a ContractorIdentifier. uniquely identifies a contractor.
    
	domain
        	in what domain the identity is represented. This is for the
		end systems to know who assigned the id. buyerReferenceID 
		implies that it is something generated by the buyer system 
		and supplierReferenceID implies that it is something generated 
		by the supplier system/entered by the supplier.
-->
<!ELEMENT ContractorIdentifier (#PCDATA)>
<!ATTLIST ContractorIdentifier
        domain     	(supplierReferenceID|buyerReferenceID) #REQUIRED
>

<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Reference.mod#1 $
-->

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    User's Guide and related documents.
-->

<!--
    The OrderReference element provides a clear reference to a prior
    OrderRequest document.  While the contained DocumentReference provides
    an unambiguous reference, the additional attributes of the
    OrderReference may allow the ConfirmationRequest and ShipNoticeRequest
    to be viewed independently.

    orderID
        The buyer system orderID for this request. Basically, what the PO
        number is today.  If present, must be copied directly from the
        referenced OrderRequest document's OrderRequestHeader.
    orderDate
        The date and time the order request was created.  If present, must
        be copied directly from the referenced OrderRequest document's
        OrderRequestHeader.
-->
<!ELEMENT OrderReference (DocumentReference)>
<!ATTLIST OrderReference
    orderID              %string;              #IMPLIED
    orderDate            %datetime.tz;         #IMPLIED
>

<!--
    Defines the ID of an order known to the buyer system.

    orderID
        The id of an order known to the buyer system.  Basically,
        what the PO number is today.

    orderDate
        The date and time the order was created.
-->
<!ELEMENT OrderIDInfo (IdReference*)>
<!ATTLIST OrderIDInfo
    orderID              %string;               #REQUIRED
    orderDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines information related to an order.

        OrderReference
        The reference to the order being paid.

        OrderIDInfo
        The buyer system order id of the order.
-->
<!ELEMENT OrderInfo (OrderReference | OrderIDInfo)>

<!--
    The InvoiceReference element provides a clear reference to a prior
    InvoiceDetailRequest document.

    invoiceID
        The suplier system invoiceID for this request. Basically, what
        the Invoice number is today.  If present, must be copied
        directly from the referenced InvoiceDetailRequest document's
        InvoiceDetailRequestHeader.

    invoiceDate
        The invoice date.
-->
<!ELEMENT InvoiceReference (DocumentReference)>
<!ATTLIST InvoiceReference
    invoiceID              %string;               #IMPLIED
    invoiceDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of an invoice known to the supplier system.

    invoiceID
        The id of an invoice known to the supplier system.

    invoiceDate
        The invoice date.
-->
<!ELEMENT InvoiceIDInfo EMPTY>
<!ATTLIST InvoiceIDInfo
    invoiceID              %string;               #REQUIRED
    invoiceDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of a PaymentProposalRequest known to the supplier and buyer system.

    paymentProposalID
        The id of a PaymentProposalRequest known to the buyer and supplier system.
-->
<!ELEMENT PaymentProposalIDInfo EMPTY>
<!ATTLIST PaymentProposalIDInfo
    paymentProposalID      %string;               #REQUIRED
>

<!--
    Defines the ID of a master agreement known to the buyer system.
    In InvoiceDetailRequest, this element identifies the master agreement
    of the release order to be invoiced.


    IdReference
         Additional reference ID for MasterAgreement.

    agreementID
        The id of a master agreement known to the buyer system.  Basically,
        what the master agreement number is today.

    agreementDate
        The date and time the master agreement request was created.

    agreementType
        The type of the master agreement being referenced, for example: Scheduling Agreement

-->
<!ELEMENT MasterAgreementIDInfo (IdReference*)>
<!ATTLIST MasterAgreementIDInfo
    agreementID              %string;               #REQUIRED
    agreementDate            %datetime.tz;          #IMPLIED
    agreementType            (scheduling_agreement) #IMPLIED

>

<!--
    Defines a reference to an earlier MasterAgreementRequest document.
    In InvoiceDetailRequest, this element identifies the master agreement
    of the release order to be invoiced.

    DocumentReference
        The reference to an earlier MasterAgreementRequest document.

    agreementID
        The id of a master agreement known to the buyer system.  Basically,
        what the master agreement number is today.

    agreementDate
        The date and time the master agreement request was created.

    agreementType
	The type of the master agreement being referenced, for example: Scheduling Agreement
-->
<!ELEMENT MasterAgreementReference (DocumentReference)>
<!ATTLIST MasterAgreementReference
    agreementID              %string;               #IMPLIED
    agreementDate            %datetime.tz;          #IMPLIED
    agreementType            (scheduling_agreement) #IMPLIED
>

<!--
	Defines a reference to an earlier TransportRequest document.
	
	DocumentReference
		The reference to an earlier TransportRequest document.
	
    requestID
        The id of a transport request known to the system of the party that
        created the TransportRequest.  Basically, what the transport request
        number is today.
	
	requestDate
		The date and time the transport request was created.

-->
<!ELEMENT TransportReference (DocumentReference)>
<!ATTLIST TransportReference
	requestID	%string;		#IMPLIED
	requestDate	%datetime.tz;	#IMPLIED
>

<!--
    Defines the ID of a transport request known to the system of the party
    that created the TransportRequest.

    IdReference
         Additional reference ID for TransportRequest.

    requestID
        The id of a transport request known to the system of the party that
        created the TransportRequest.  Basically, what the transport request
        number is today.

    requestDate
        The date and time the transport request was created.

-->
<!ELEMENT TransportIDInfo (IdReference*)>
<!ATTLIST TransportIDInfo
    requestID              %string;               #IMPLIED
    requestDate            %datetime.tz;          #IMPLIED
>

<!--
    Identifies the carrier who will transport a shipment.

    domain
        Domain in which this value has meaning.  Recognized domains
        include:
        companyName - The legal name for this company.  In some cases, this
            could also be provided in a Contact element with role
            "carrierCorporate".  That option should be reserved for cases
            in which additional detail about the carrier appears in this
            element.
        SCAC - Standard Carrier Alpha Code (see
            http://users.erols.com/nmfta/Codes.htm)
        IATA - International Air Transport Association (see
            http://www.iata.org)
        AAR  - Association of American Railroads (see http://www.aar.org/)
        UIC  - International Union of Railways (see
            http://www.uic.asso.fr/)
        EAN  - European Article Numbering (see http://www.ean-ucc.org/)
        DUNS - D&B's Data Universal Numbering System (see
            http://www.dnb.com/dnbhome.htm)
-->
<!ELEMENT CarrierIdentifier (#PCDATA)>         <!-- string -->
<!ATTLIST CarrierIdentifier
    domain               %string;              #REQUIRED
>

<!--
    Identifier that appears on a shipment and through which additional
    detail about the shipment may be retrieved.  Defined by the carrier.
    Has meaning in the domain described by the CarrierIdentifier values.
    Therefore, CarrierIdentifier and ShipmentIdentifier should normally
    be used together.

    Conceptually, this is a tracking number.  Different carriers have
    different names for shipment identifiers.  Some call it a way bill
    number, others call it a pro number, and still others call it a bill of
    lading.  They all represent tracking numbers.
    
    domain
        Specifies more precisely what kind of identifier this is.
        Likely values include trackingNumber, billOfLading. 
        
    trackingNumberDate
        The date when the logistics provider intimates the tracking number 
        for this shipment. This date is used to find out the efficiency of the
        supply chain process.

    trackingURL
        carrier URL that can be used to track the shipment in conjunction with the tracking number
-->
<!ELEMENT ShipmentIdentifier (#PCDATA)>        <!-- string -->
<!ATTLIST ShipmentIdentifier
    domain                %string;              #IMPLIED
    trackingNumberDate    %datetime.tz;         #IMPLIED
    trackingURL           %URL;                 #IMPLIED>


<!--
    One language-specific string for the creator of an IdReference,
    e.g. IRS, BofA, UPS, Cisco, etc.

    xml:lang
        The language or locale in which the name of the creator is written.
-->
<!ELEMENT Creator (#PCDATA)>              <!-- string -->
<!ATTLIST Creator
   xml:lang              %xmlLangCode;         #REQUIRED
>

<!--
    Defines an ID reference.  Within the application context (for example,
    a certain pair of buyer and supplier), the (identifier, domain) pair
    should be unique.

    Creator
        The creator of this IdReference, e.g. BofA, UPS, Cisco, etc.

    Description
        Textual description of the IdReference. For human readability.

    identifier
        The unique identifier of the IdReference within the domain.

    domain
        The domain of the IdReference.  It should be one of the
        following:
        accountID, bankRoutingID, accountPayableID,
        accountReceivableID, bankAccountID, ibanID, abaRoutingNumber,
        bankNationalID, isoBicID, swiftID, bankBranchID, federalTaxID,
        stateTaxID, provincialTaxID, vatID, gstID, and taxExemptionID.
        supplierTaxID is deprecated and will be treated as federalTaxID.
        Other possible values could be 1099ID, courtRegisterID, 
        supplierReference, governmentNumber, documentName, etc.
-->
<!ELEMENT IdReference (Creator?, Description?)>
<!ATTLIST IdReference
    identifier      %string;                         #REQUIRED
    domain          %string;                         #REQUIRED
>

<!--
    Defines supplier sales order information related to an order.

    This is also used in PunchOutOrderMessage to indicate that the 
    supplier has created an order associated with the punchout order message.  
    The buyer can later cancel the sales order by sending an OrderRequest 
    of type "delete" that refers to the sales order by including the 
    SupplierOrderInfo element in the OrderRequestHeader

    orderID
        Supplier sales order id of this order.
        
    orderDate
        The date and time the sales order was created.
-->
<!ELEMENT SupplierOrderInfo EMPTY>
<!ATTLIST SupplierOrderInfo
    orderID              %string;               #REQUIRED
    orderDate          %datetime.tz;      #IMPLIED
>


<!-- 
    The ShipNoticeReference element provides a clear reference to a prior
    ShipNoticeRequest document.  While the contained DocumentReference provides
    an unambiguous reference, the additional attributes of the
    ShipNoticeReference may allow the ReceiptRequest to be viewed independently.

    DocumentReference
        The reference to an earlier ShipNoticeRequest.
        	
    shipNoticeID
        Unique identifier of the referenced ShipNoticeRequest.

    shipNoticeDate
        Date and time of the referenced ShipNoticeRequest.
-->
<!ELEMENT ShipNoticeReference (DocumentReference)>
<!ATTLIST ShipNoticeReference
	shipNoticeID %string; #IMPLIED
	shipNoticeDate %datetime.tz; #IMPLIED
>

<!-- 
    Defines ID of a Ship Notice known to the Buyer system.
 
 
    IdReference
	Additional reference ID for shipment related IDs e.g. DispatchAdviceID, ReceivingAdviceID, DeliveryNoteId, ProofOfDeliveryID.

    shipNoticeID
        Unique identifier of the referenced ShipNoticeRequest.

    shipNoticeDate
        Date and time of the referenced ShipNoticeRequest.
-->
<!ELEMENT ShipNoticeIDInfo (IdReference*)>
<!ATTLIST ShipNoticeIDInfo
    shipNoticeID              %string;               #REQUIRED
    shipNoticeDate            %datetime.tz;          #IMPLIED
>

<!--
    The OrderStatusRequestReference element provides a clear reference to a prior
    OrderStatusRequest document.

    orderStatusRequestID
        The buyer system orderStatusRequestID for this request. If present, must be copied
        directly from the referenced OrderStatusRequest document's
        OrderStatusRequestHeader.

    orderStatusRequestDate
        The order status request date.
-->
<!ELEMENT OrderStatusRequestReference (DocumentReference)>
<!ATTLIST OrderStatusRequestReference
    orderStatusRequestID              %string;               #IMPLIED
    orderStatusRequestDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of an order status request known to the buyer system.

    orderStatusRequestID
        The id of an order status request known to the buyer system.

    orderStatusRequestDate
        The order status request date.
-->
<!ELEMENT OrderStatusRequestIDInfo EMPTY>
<!ATTLIST OrderStatusRequestIDInfo
    orderStatusRequestID              %string;               #REQUIRED
    orderStatusRequestDate            %datetime.tz;          #IMPLIED
>

<!--
    The ReceiptReference element provides a clear reference to a prior
    ReceiptRequest document.

    receiptID
        The buyer system receiptID for this request.
        If present, must be copied directly from the
        referenced ReceiptRequest document's ReceiptRequestHeader.

    receiptDate
        The date and time the receipt request was created. If present, must
        be copied directly from the referenced ReceiptRequest document's
        RequestRequestHeader.
-->
<!ELEMENT ReceiptReference (DocumentReference) >
<!ATTLIST ReceiptReference
    receiptID              %string;              #IMPLIED
    receiptDate            %datetime.tz;         #IMPLIED
>

<!--
    Defines the ID of a receipt known to the buyer system.

    receiptID
        The id of an receipt known to the buyer system.

    receiptDate
        The date and time the order was created.
-->
<!ELEMENT ReceiptIDInfo (IdReference*)>
<!ATTLIST ReceiptIDInfo
    receiptID              %string;               #REQUIRED
    receiptDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of a quality inspection request document.

    inspectionID
        The id of a quality inspection request document.

    inspectionDate
        The date and time the quality inspection request document was created.
-->
<!ELEMENT QualityInspectionRequestReference (DocumentReference?)>
<!ATTLIST QualityInspectionRequestReference
    inspectionID              %string;               #IMPLIED
    inspectionDate           %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of a quality inspection result document.

    inspectionID
        The id of a quality inspection result document.

    inspectionDate
        The date and time the quality inspection result document was created.
-->
<!ELEMENT QualityInspectionResultReference (DocumentReference?)>
<!ATTLIST QualityInspectionResultReference
    inspectionID              %string;               #IMPLIED
    inspectionDate           %datetime.tz;          #IMPLIED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Entities.mod#1 $
-->

<!--
     Top-level entities used in Transport.mod.  Defined here to allow easy
     extention of the cXML specification (using additional DTDs) without
     redefining these entities.
-->

<!-- cxml.messages
     Possible elements (for particular situations) within Message.  These
     are all of the messages defined in the base cXML protocol.
-->
<!ENTITY % cxml.messages ",(PunchOutOrderMessage |
                           ProviderDoneMessage |
                           SubscriptionChangeMessage |
                           DataAvailableMessage |
                           SupplierChangeMessage |
                           OrganizationChangeMessage |
                           ProductActivityMessage)"
>

<!-- cxml.requests
     Possible elements (for particular situations) within Request.  These
     are all of the requests defined in the base cXML protocol.
-->
<!ENTITY % cxml.requests "(ProfileRequest |
                           OrderRequest |
                           MasterAgreementRequest|
                           PurchaseRequisitionRequest|
                           PunchOutSetupRequest |
                           ProviderSetupRequest |
                           StatusUpdateRequest |
                           GetPendingRequest |
                           SubscriptionListRequest |
                           SubscriptionContentRequest |
                           SupplierListRequest |
                           SupplierDataRequest |
                           SubscriptionStatusUpdateRequest |
                           CopyRequest |
                           CatalogUploadRequest |
                           AuthRequest |
                           DataRequest |
                           OrganizationDataRequest | 
						   ApprovalRequest |
                           QualityNotificationRequest |
                           QualityInspectionRequest |
                           QualityInspectionResultRequest |
                           QualityInspectionDecisionRequest
                           )"
>

<!-- cxml.responses
     Possible elements (for particular situations) within Response.  These
     are all of the responses (corresponding to a subset of the possible
     requests) defined in the base cXML protocol.
-->
<!ENTITY % cxml.responses ",(ProfileResponse |
                            PunchOutSetupResponse |
                            ProviderSetupResponse |
                            GetPendingResponse |
                            SubscriptionListResponse |
                            SubscriptionContentResponse |
                            SupplierListResponse |
                            SupplierDataResponse |
                            AuthResponse |
                            DataResponse |
                            OrganizationDataResponse)?"
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Profile.mod#1 $
-->

<!--
    Request for the latest profile from the server.  May also be used as
    a 'ping' transaction (to check if the server is available).
-->
<!ELEMENT ProfileRequest EMPTY >

<!--
    Static profile response describing the transactions supported by this
    server.  The content should not change frequently.

    effectiveDate
        When these services were first available.  Should not be in the
    future since new clients may need to interact with a server.

    lastRefresh
        When service information was last received from the end server.

    a-dtype
        Datatype enumeration for the attributes of this element.  May be
    ignored by most XML parsers (used for documentation purposes).
-->
<!ELEMENT ProfileResponse ( Option*, Transaction+ )>
<!ATTLIST ProfileResponse
    effectiveDate %datetime.tz; #REQUIRED
    lastRefresh %datetime.tz; #IMPLIED
    a-dtype NMTOKENS #FIXED 'effectiveDate dateTime.tz
                             lastRefresh dateTime.tz'
>


<!--
    Value for a defined option (either for the overall service or a
    specific transaction.  At this time, no options are defined at either
    level.

    name
        The name of this option.  Future versions of cXML will define
    values for this attribute.  This is not intended to be viewed
    directly (the profile is intended mostly for machine consumption).

    a-dtype
        Datatype enumeration for the attributes of this element.  May be
    ignored by most XML parsers (used for documentation purposes).
-->
<!ELEMENT Option ( #PCDATA )>   <!-- string -->
<!ATTLIST Option
    name          %string;      #REQUIRED
    a-dtype       NMTOKENS      #FIXED 'name string'
>

<!--
    A transaction supported by this server.

    requestName
        A specific request this server accepts at the given URL.  The
    %cxml.requests entity (defined in transport.mod) contains the
    possible values for this attribute.

    a-dtype
        Datatype enumeration for the attributes of this element.  May be
    ignored by most XML parsers (used for documentation purposes).
-->
<!ELEMENT Transaction ( URL, Option* )>
<!ATTLIST Transaction
    requestName   %nmtoken;     #REQUIRED
    a-dtype       NMTOKENS      #FIXED 'requestName NMTOKEN'
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Transport.mod#1 $
-->

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    Protocol Specification documents.
-->

<!--
    Defines the set of known valid cXML digital signature versions
-->
<!ENTITY % cxml.signatureVersions "(1.0)">

<!--
    cXML envelope

    version
        Version of this cXML transmission.  Should be less than or equal
    to the version portion of the SYSTEM identifier for this document.

    payloadID
        A unique identifier for this document.

    timestamp
        The date and time at which this document was originally created.

    signatureVersion
        If present, specifies the cXML digital signature version to
        which this document conforms.  This implies that the
        ds:Signature element must be present.  It is an error if this
        attribute is present and the document does not conform to the
        specified signature version.  If absent, the document is not
        signed.

    xml:lang
        The default locale for all strings (not formatted items such as
    dates, times and numbers) in this document.  This attribute will be
    required in a future version of cXML.  (Leaving it out is
    deprecated.)
-->
<!ELEMENT cXML (((Header, (Message | Request)) | Response), ds:Signature*)>
<!ATTLIST cXML
    version    %string;       "&cxml.version;"
    payloadID  %string;       #REQUIRED
    timestamp  %datetime.tz;  #REQUIRED
    signatureVersion %cxml.signatureVersions; #IMPLIED
    xml:lang   %xmlLangCode;  #IMPLIED
>

<!-- header -->
<!ELEMENT Header (From, To, Sender, (Path, OriginalDocument)?)>

<!ELEMENT From (Credential+, Correspondent?)>
<!ELEMENT To (Credential+, Correspondent?)>
<!ELEMENT Sender (Credential+, UserAgent)>

<!--
    Path. A list of nodes that records the path taken by a user through 
    a punchout chaining scenario.

    If no route node is included then punchout chaining scenario is not executed and only copies are processed. 
-->
<!ELEMENT Path (Node+)>

<!--
    A Node is any entity connected to a Network.
    
    type
        A node can define itself as a router node or a copy node.  Routers
    assume responsibility for the transaction.  Copy Nodes request to only
    be aware of the transaction.
    
    itemDetailsRequired
        Intermediary Nodes may want to support special operations without
    having to store specific information required to fulfill that operation.
    This attribute tells the previous node to send ItemDetail information
    when performing a PunchOutSetupRequest edit/inspect operation.
-->
<!ELEMENT Node (Credential+)>
<!ATTLIST Node
    type (copy | route) #REQUIRED
    itemDetailsRequired (yes) #IMPLIED
>


<!--
    Identifies the previous document in the situation that a router node
    forwards a message or request on to a more distant node.
    
    payloadID
        The payloadId of the original document.
-->
<!ELEMENT OriginalDocument EMPTY>
<!ATTLIST OriginalDocument
    payloadID %string; #REQUIRED
>

<!--
    A textual string representing who the UserAgent is conducting the cXML
    conversation. Analogous to UserAgent for HTTP conversations.
-->
<!ELEMENT UserAgent (#PCDATA)>

<!--
    DEPRECATED 
    Do not use this element.
-->
<!ELEMENT DigitalSignature ANY>
<!ATTLIST DigitalSignature
    type      %string;  "PK7 self-contained"
    encoding  %string;  "Base64"
>

<!--
    A shared secret. Typically, this is a username/password type of secret
    exchanged through a secure transport before communication takes place.
-->
<!ELEMENT SharedSecret ANY>

<!--
    Represents an identity for a credential.

    lastChangedTimestamp
       When the underlying object last changed in the originating system.
       This is used in cases where the same object (e.g. a buyer
       organization) is replicated, and kept synchronized, across two
       systems.
-->
<!ELEMENT Identity ANY>
<!ATTLIST Identity
    lastChangedTimestamp  %datetime.tz;  #IMPLIED
>

<!--
    A Credential Message Authentication Code (MAC).  This is used in
    situations where one party (the sender) must prove to another (the
    receiver) that it is authenticated by a shared secret with a third
    party trusted by both.

    The MAC should be computed by the trusted third party and
    transferred to the sender.  The MAC should be opaque to the sender
    (i.e., it should be secure and non-reversible).  The MAC should
    use as its inputs enough information to accomplish the following
    goals:

    (1) The MAC must prove to the receiver that it really originated
    with the trusted third party.  E.g., the MAC could use a shared
    secret between the receiver and the trusted third party as its
    secret key.

    (2) The MAC should be usable only by a certain sender.  E.g., the
    MAC could authenticate an identifier for the sending organization.

    (3) The MAC should prove that the sender is authorized to send on
    behalf of the From organization.  E.g., the MAC could authenticate
    an identifier for the From organization.

    (4) The MAC should limit the risk of the MAC being compromised and
    used to impersonate the sender by another party communicating with
    the receiver.  E.g., the MAC could authenticate an expiration date
    or sequence number.

    type
        An implementation-dependent identifier for the exact data
        being authenticated and the method in which it is formatted
        for authentication.  Currently the only supported value is
        "FromSenderCredentials".

    algorithm
        An implementation-dependent identifier for the exact MAC
        algorithm used on the data.  Currently the only supported
        value is "HMAC-SHA1-96".

    creationDate
        The time at which this MAC was issued.  The receiver must not
        accept the MAC before this time.

    expirationDate
        The time at which this MAC expires.  The receiver must not
        accept the MAC after this time.
-->
<!ELEMENT CredentialMac (#PCDATA)>
<!ATTLIST CredentialMac
    type           %string;      #REQUIRED
    algorithm      %string;      #REQUIRED
    creationDate   %datetime.tz; #REQUIRED
    expirationDate %datetime.tz; #REQUIRED
>

<!--
    A combination of an Identity and authentication element. If the
    authentication element is present, it strongly authenticates who/what
    someone is.  The authentication element should not be sent within Message
    documents transported via an end user's browser.  One-way communication
    must be authenticated in the transport layer.

    domain
        In what domain is this Credential represented?
    type
        Does this Credential identify a marketplace or one of its member
        companies?  A Credential without this attribute describes a member
        company or unaffiliated buying organization.
-->
<!ENTITY % cxml.authentication  "SharedSecret |
                                 DigitalSignature |
                                 CredentialMac"
>
<!ELEMENT Credential (Identity, (%cxml.authentication;)?)>
<!ATTLIST Credential
    domain  %string;      #REQUIRED
    type    (marketplace) #IMPLIED
>

<!--
    Status of a Response or Message.  If present, the element content
    describes specifics of a problem.

    code
        HTTP or cXML-specific status code.

    text
        Textual version of the status code (not specific issue).

    xml:lang
        The language in which the text attribute and element content are
    written.  This attribute will be required in a future version of
    cXML.  (Leaving it out is deprecated.)
-->
<!ELEMENT Status (#PCDATA)>
<!ATTLIST Status
    code     %uint;        #REQUIRED
    text     %string;      #REQUIRED
    xml:lang %xmlLangCode; #IMPLIED
>

<!--
    Message

    When Status not present, '<Status code="200" text="OK" />' is implied.
-->
<!ELEMENT Message (Status? %cxml.messages;)>
<!ATTLIST Message
    deploymentMode  (production | test)  "production"
    inReplyTo       %string;  #IMPLIED
    Id              ID        #IMPLIED
>

<!-- request -->
<!ELEMENT Request (%cxml.requests;)>
<!ATTLIST Request
    deploymentMode  (production | test)  "production"
    Id              ID        #IMPLIED
>

<!-- response -->
<!ELEMENT Response (Status %cxml.responses;)>
<!ATTLIST Response
    Id              ID        #IMPLIED
>

<!--
    This element includes signed cXML-specific details about the
    document being signed.  When a cXML document is signed, this
    element must appear inside the first ds:Object element in the
    ds:Signature element.

    signatureVersion
        This specifies the cXML signature version to which this
        document conforms.  It is an error if this attribute value
        does not exactly match the value of the signatureVersion
        attribute from the top-level cXML element.  It is an error if
        the document does not conform to the specified cXML signature
        version.

    payloadID
        Specifies the payloadID of the document.  It is an error if
        the value of this attribute does not exactly match the value
        of the payloadID attribute from the top-level cXML element.

    Id
        This identifies this cXMLSignedInfo element for purposes of
        the signature.  This attribute must always be present and
        should always have the value "cXMLSignedInfo"

-->
<!ELEMENT cXMLSignedInfo EMPTY>
<!ATTLIST cXMLSignedInfo
    signatureVersion    %cxml.signatureVersions;        #REQUIRED
    payloadID           %string;                        #REQUIRED
    Id                  ID                              #REQUIRED
>

<!--
    This element includes the contact information of the organisation
    to/from whom the document is sent/received.

    preferredLanguage
        optional language which the organisation, identified by this 
        element, would prefer to use. Refer to the definition of 
        xmlLangCode entity.
-->
<!ELEMENT Correspondent (Contact+, Extrinsic*)>
<!ATTLIST Correspondent
    preferredLanguage     %xmlLangCode;        #IMPLIED
><!--
    The representation of a line item as it needs to be for sending to a
    supplier.

    quantity
        How many items are desired. 
    lineNumber
        Position (counting from 1) of this item in a QuoteRequest.  Used to
        maintain a reference between items in create and update
        documents.
	parentLineNumber
		Position (counting from 1) of this item's parent in a QuoteRequest. Used to
        maintain a hierarchical reference between items in documents.
    requestedDeliveryDate
        The date this item was requested for delivery.
    agreementItemNumber 
        The corresponding Item Number of the Item in the Master Agreement if this is a 'release' order item.
    itemClassification
        The service item type. It could either be "material" or "service"
	itemType
		Represents if this item is a leaf item or a hierarchical parent item. Used to represent
		service item hierarchy. It could either be "item" or "composite" 
	serviceLineType
		Represents the type of the service line, It could be "standard" or "blanket" or "contingency" or "openquantity" or "information"
-->
<!ELEMENT QuoteItemOut (ItemID?, ItemDetail, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Total?, TermsOfDelivery?, ReferenceDocumentInfo?, Contact*, Comments?)>
<!ATTLIST QuoteItemOut
    quantity               %r8;      #REQUIRED
    lineNumber             %uint;    #IMPLIED
	parentLineNumber       %uint;         #IMPLIED
    requestedDeliveryDate  %datetime.tz;    #IMPLIED
    itemClassification     %serviceItemType; #IMPLIED
	itemType       %lineItemType;    #IMPLIED   
	serviceLineType     %serviceLineType; #IMPLIED
>

<!--
    The representation of quote items associated with the header.
-->
<!ELEMENT QuoteHeaderInfo (LegalEntity?, OrganizationalUnit*, PaymentTerms*, FollowUpDocument?, DocumentReference?, Extrinsic*)>

<!--
    The representation of a line item in a quote.

    type
        supplier action type.
    quantity
        How many items are quoted. 
    lineNumber
        Position (counting from 1) of this item in a QuoteRequest.  Used to maintain a reference between items in create and update documents 
	parentLineNumber
		Position (counting from 1) of this item's parent in a QuoteRequest. Used to
        maintain a hierarchical reference between items in documents.
    requestedDeliveryDate
        The date this item was requested for delivery.
    rank 
        The rank of the bid
    itemClassification
        The service item type. It could either be "material" or "service"
	itemType
		Represents if this item is a leaf item or a hierarchical parent item. Used to represent
		service item hierarchy. It could either be "item" or "composite" 
	serviceLineType
		Represents the type of the service line, It could be "standard" or "blanket" or "contingency" or "openquantity" or "information"
-->
<!ELEMENT QuoteItemIn (ItemID?, ItemDetail, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Total?, TermsOfDelivery?, ReferenceDocumentInfo*, Contact*, Comments?)>
<!ATTLIST QuoteItemIn
    type  (accept | reject | update | final | award) #REQUIRED
    quantity               %r8;      #REQUIRED
    lineNumber             %uint;    #IMPLIED
	parentLineNumber       %uint;         #IMPLIED
    requestedDeliveryDate  %datetime.tz;    #IMPLIED
    rank                   %r8;      #IMPLIED
    itemClassification     %serviceItemType; #IMPLIED
	itemType       %lineItemType;    #IMPLIED   
	serviceLineType     %serviceLineType; #IMPLIED
>

<!--
    Header of an QuoteMessage.  This is the quote data that is sent to the buyer. 
    type
        supplier action type.
    quoteID
        unique identifier for a quote. 
    quoteDate
        The date when the quote is submitted.
-->
<!ELEMENT QuoteMessageHeader (OrganizationID, Total, ShipTo?, Contact*, QuoteRequestReference?, Comments?, QuoteHeaderInfo?, Extrinsic*)>
<!ATTLIST QuoteMessageHeader
    type  (accept | reject | update | final | award)	#REQUIRED
    quoteID    %string;          #REQUIRED
    quoteDate  %datetime.tz;     #REQUIRED
    currency  %isoCurrencyCode;	 #REQUIRED
    xml:lang  %xmlLangCode;      #REQUIRED
>

<!--
    A hint to the way to follow up on a QuoteMessage response.  The type and category could be set to anything.  But, they should
    be well known strings that can be understood by the ERP system.  For example, the type could be set to "Contract" and the
    category could be set to "WK".  This would give a hint to the ERP system that the next step should be to create a WK Contract.
    Furthermore, this element can also be specified in the header section.  This allows the UI of Sourcing to be set appropriately.
    type
        follow up type such as "Contract".
    category
        follow up category such as "WK".
-->
<!ELEMENT FollowUpDocument EMPTY>
<!ATTLIST FollowUpDocument
    type          %string;  #IMPLIED
    category      %string;  #IMPLIED
>

<!ELEMENT QuoteRequestReference (DocumentReference?)>
<!ATTLIST QuoteRequestReference
    requestID		%number;		#REQUIRED
    requestDate	%datetime.tz;	#REQUIRED
>

<!--
    Definition for a quote. This is the data that is sent to the buyer.
-->
<!ELEMENT QuoteMessage (QuoteMessageHeader, QuoteItemIn*)>

<!-- QuoteRequest* Elements -->
<!--
    Definition of an request for quote.  This is the data that is sent to the supplier
    to have them submit a quote.
-->
<!ELEMENT QuoteRequest (QuoteRequestHeader, QuoteItemOut*)>

<!--
    Header of an QuoteRequest.  This is the data that is sent to the supplier
    to have them submit a quote. Total
    represents the total amount of this QuoteRequest.

    requestID
        The buyer system id for this request.  This is an internal
        Buyer unique number.

    requestDate
        The date and time the QuoteRequest request was created.

    type
        The type of the QuoteRequest request. Defaults to "new".

    openDate
        The date when a QuoteRequest is open for supplier responses.
    closeDate
        The date when a QuoteRequest is closed for supplier responses.
    previewDate
        The date when a QuoteRequest is viewable by suppliers.

    quoteReceivingPreference is used by the buyer system to identify the preference for
        receiving QuoteMessage back from the sourcing system
        winningOnly - should result in only the winning supplier quotes being sent to the buyer
        finalBidsFromAll - should result in  quotes from suppliers being sent after event closes
        all - quotes are sent to the buyer system as soon as supplier submits the bid. It does not wait for event closing     
-->


<!ELEMENT QuoteRequestHeader (Name?, SupplierSelector?, Total?, Description?, ShipTo?, Contact*, Comments?, QuoteHeaderInfo?, Extrinsic*)>

<!ATTLIST QuoteRequestHeader
    requestID    %string;        #REQUIRED
    requestDate  %datetime.tz;   #REQUIRED
    type       (new | update | delete)  "new"
    openDate  %datetime.tz;      #REQUIRED
    closeDate %datetime.tz;      #REQUIRED
    previewDate %datetime.tz;    #IMPLIED
    templateName %string;        #IMPLIED
    currency  %isoCurrencyCode;  #REQUIRED
    xml:lang  %xmlLangCode;      #REQUIRED
    quoteReceivingPreference   (winningOnly | finalBidsFromAll | all)   #IMPLIED
>

<!--
    SupplierSelector is used to define the way suppliers are selected for responding to
    RFQ.
    The field is optional. Administrator can configure the default matching type for a given category of commodity. Hence, If no value is provided here, the matching type will be picked up from administrator's configuration. If the value is provided here, then administrator configuration will be ignored. To know more talk to your administrator.

    OrganizationID is used to select explicit suppliers to be invited for bidding

    matchingType:invitationOnly means invite suppliers listed in OrganizationID element(s)
    matchingType:approvedVendorOnly means any supplier from vendor-master can bid on RFQ. However,
    the RFQ engine may narrow the suppliers that can bid based on factors such as commodity and territory match.
    invitationOnly:public means any public supplier can bid on the RFQ. The supplier may already exist in vendor-master.
    However, the RFQ engine may narrow the suppliers that can bid based on factors such as commodity and territory match.
-->
<!ELEMENT SupplierSelector (SupplierInvitation*)>

<!ATTLIST SupplierSelector
    matchingType (invitationOnly|approvedVendorOnly|public) #IMPLIED
>

<!--
  Supplier invitation represents explicit invitation for a supplier.
  Supplier can have two different status in buyer system:
     approved - supplier exists in buyer system and is approved
     contracted - supplier exists in buyer system and is contracted (and is also approved). Buyer system may give
                  MasterAgreementIDInfo as well in that case

  Correspondent is used to supplier's contact information from ERP to network or sourcing system. If the supplier does not
  already exists in the receiving system this information can be used to create the supplier and contact the supplier.

  OrganizationID will have credential information that can uniquely identify the supplier in the ERP.
-->
<!ELEMENT SupplierInvitation (OrganizationID, Correspondent?, MasterAgreementIDInfo?, Extrinsic*)>

<!ATTLIST SupplierInvitation
    supplierStatus       (approved | contracted )  "approved"
>

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    User's Guide and related documents.
-->

<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/modules/Contract.mod#6 $
-->

<!--
    Definition of a contract. This is the data that is sent from the Buyer to an external buyer system.
-->
<!ELEMENT ContractRequest (ContractRequestHeader, ContractItemIn+)>

<!--
    Header of a Contract.  This is the header level information in the Contract.

    contractID
        The source buyer system contractID for this request.
        For example, Contract ID in Ariba sourcing.

    type
        Identifies if this is a Value based contract or quantity based Contract.

    createDate
        The date and time the contract was created/published.

    agreementDate
        The date and time the contract was created.
        This is different from the effective and expiry date of the Contract.

    effectiveDate
        Date the Contract is available for ordering/releases.

    expirationDate
        Date the Contract is no longer available.

    operation:
        "new" operation identifies a new Contract transaction.
        "update" operation identified an update to an existing transaction.
        the DocumentInfo attribute can be used to indicate the Document information
        in the external system.
        "delete" operation will be used to cancel an existing Contract, the
        assumption here is that the delete request will be an exact replica of the
        original request.

    LegalEntity
        Legal entity defined in the external system. Smallest organizational unit of external accounting for which a complete,
        self-contained set of accounts can be created. This includes the entry of all transactions that must be posted and
        the creation of all items for legal individual financial statements, such as the balance sheet and the profit and loss statement.
        For example, Company Code for SAP.

    OrganizationalUnit
        Purchase Unit or Purchase group defined in the external system.
        Purchase Unit is an organizational unit within Logistics. Almost all business transactions related to
        procurement are carried out in a purchase unit.
        A purchasing group corresponds to a buyer or group of buyers who perform the following
        purchasing activities: Procuring certain articles or merchandise categories Acting as the contact for vendors
        For example, Purchasing Organization or Purchasing Group for SAP.
            <OrganizationalUnit domain="PurchasingOrganization">
                 1001
            </OrganizationalUnit>
            <OrganizationalUnit domain="PurchasingGroup">
                 10101
            </OrganizationalUnit>


    DocumentInfo
        Contract Id managed in the external system. This would be sent for "update" operation.
        For example,
        <DocumentInfo documentID="55000000" documentType="Contract"/>

    ParentContractInfo
        Parent contract Id if the current contract is a part of an hierarchy.


    QuoteRequestReference
        If the contract is referencing to QuoteRequest originated from the external system, send requestId and requestDate.


    TermsOfDelivery
        Optional shipping terms (incoTerms) as defined by the International Chamber of
        Commerce. These terms inform the buyer which portion of the shipping charges are their responsibility.
        For example,
        <TermsOfDelivery>
            <TermsOfDeliveryCode value="TransportCondition"/>
            <ShippingPaymentMethod value ="Other"/>
            <TransportTerms value="FOB">Free on board vessel</TransportTerms>
        </TermsOfDelivery>

    Note:
        Use "Contact" element to supply any additional Address or Location information.
-->

<!ELEMENT  ContractRequestHeader (LegalEntity, OrganizationID, OrganizationalUnit*, PaymentTerm*,
        QuoteRequestReference?, MaxAmount?, MinAmount?, MaxReleaseAmount?, MinReleaseAmount?,
        Contact*, Comments?, DocumentInfo?, ParentContractInfo?, TermsOfDelivery?, Extrinsic*)>
<!ATTLIST ContractRequestHeader
        contractID     %string;            #REQUIRED
        type       (value | quantity)      "value"
        createDate     %datetime.tz;       #IMPLIED
        agreementDate  %datetime.tz;       #IMPLIED
        effectiveDate  %datetime.tz;       #REQUIRED
        expirationDate %datetime.tz;       #IMPLIED
        xml:lang       %xmlLangCode;       #REQUIRED
        operation  (new | update | delete) "new"
        >

<!--
    The representation of a contract line item to be sent to external system.

    TermsOfDelivery
        Optional item level incoTerms.

    ReferenceDocumentInfo
        Optional reference document info for this line item.
        For example, Requisition or RFQ in the external system.
        <ReferenceDocumentInfo lineNumber = "1">
            <DocumentInfo documentID = "RFQ12345"
                          documentType = "RFQ"
                          documentDate = "2005-11-07T07:03:34-05:00">
            </DocumentInfo>
        </ReferenceDocumentInfo>

    Note:
        The lineNumber attribute in the <ItemIn> will be used to specify the corresponding
        lineNumber on the contract in the source buyer system.
        At an implementation, level checks should be made to validate this.

    Note:
        itemClassification attribute in the <ItemIn> will be used to specify whether the current line item is material or service.

    Note:
        The external system Id of PaymentTerm can be sent as an extrinsic inside of <PaymentTerm>
        For example,
         <PaymentTerm payInNumberOfDays="30">
             <Extrinsic name="Id">Net30</Extrinsic>
         </PaymentTerm>

    Note:
         Address in ShipTo will be used specify Location (Plant or StorageLocation for SAP) of the line item.
         For example,
         <ShipTo>
             <Address
                  addressID="3000"
                  addressIDDomain="buyerLocationID"
                  isoCountryCode="US">
                 <Name xml:lang="en">Plant 3000</Name>
             </Address>
          </ShipTo>


    Note:
        <IdReference> in <ItemID> will be used to send the corresponding line number of the
        contract in the external system. For example, domain = 'SAPLineNumber', identifier='0100'

    Note:
        The quantity attribute in the ItemIn tag should be set to target quantity. If the line item is amount based,
        it could be set to one.

    Note:
        The UnitsOfMeasure of Min/MaxQuantity and Min/MaxReleaseQuantity is same as the one in ItemDetail.

    Note:
        The MaxReleaseAmount/Quantity and MinReleaseAmount/Quantity at an item level
        indicate the item level amounts and quantities per release (purchase order).

    Note:
        <Modifications> in <UnitPrice> will be used to send Discount amount/percent, Surcharges, Tax, and etc.
        For example,
        <UnitPrice>
            <Money currency="USD">1000.00</Money>
            <Modifications>
                 <Modification>
                     <AdditionalDeduction type="DISCOUNT">
                         <DeductionAmount>
                             <Money currency="USD">10.00</Money>
                         </DeductionAmount>
                     </AdditionalDeduction>
                 </Modification>
            </Modifications>
        </UnitPrice>
	
	operation
		Represents the state of the Contract line item that is being sent to the external system. 
		new: represents new contract line item sent to External system
		update: represents update to an existing contract line item 
		delete: represents instruction to delete this contract line item in external system.

-->
<!ELEMENT ContractItemIn (MaxAmount?, MinAmount?, MaxReleaseAmount?, MinReleaseAmount?,
        MaxQuantity?, MinQuantity?, MaxReleaseQuantity?, MinReleaseQuantity?,
        TermsOfDelivery?, ItemIn, ReferenceDocumentInfo*)>
<!ATTLIST ContractItemIn
        operation  (new | update | delete) #IMPLIED
        >

<!--
    Identifies Parent contract Id if the current contract is a part of an hierarchy.
-->
<!ELEMENT ParentContractInfo (DocumentInfo)>

<!--
    Identifies legal entity in the external system.

    identifier
         Unique Id for Legal Entity. For example, 3000.
    domain
        Domain is the name of the legal entity in the external system.
        For example, CompanyCode for SAP, BusinessUnit for PSoft

-->
<!ELEMENT LegalEntity (IdReference)>

<!--
    Identifies Purchase Unit or Purchase group in the external system.

    identifier
         Unique Id for Purchase Unit or Purchase Group. For example, 3000.

    domain
        Domain is the name of the purchase unit or Purchase group in the external system.
        For example, PurchasingOrganization or PurchasingGroup for SAP
-->
<!ELEMENT OrganizationalUnit (IdReference)>

<!--
    The representation of a contract status including line items.

    Status
        The status whether a contract is created/updated successfully. It contains code and text.
        code: 200 - succeeded, 406 - failed.
        For example,

        <Status xml:lang="en-US" code="200" text="OK">Succeeded</Status>

        <Status code="406" text="Not Acceptable">Failed. Invalid Plant 1234.</Status>
-->
<!ELEMENT ContractStatusUpdateRequest (Status, ContractStatus?, Extrinsic*)>

<!--
    Status Update for Contract Status

    ContractIDInfo
        The ID info of a contract created/updated in the source buyer system.
        For example, Contract Id in Ariba sourcing.

    Comments
        Comments associated with the status update.

    type
        Type of the contract status. for example, 'created'
-->
<!ELEMENT ContractStatus (ContractIDInfo, ContractItemStatus*, Comments*)>
<!ATTLIST ContractStatus
        type              %string;               #REQUIRED
        >

<!--
    Defines the ID of a contract known to the source buyer system.


    IdReference
         Additional reference ID for Contract. For example, SAP AgreementId.

    contractID
        The id of a contract known to the source buyer system.

    contractDate
        The date and time the contract request was created or updated.

    contractType
        The type of the contract being referenced, for example: Scheduling Agreement

-->
<!ELEMENT ContractIDInfo (IdReference*)>
<!ATTLIST ContractIDInfo
        contractID        %string;               #REQUIRED
        contractDate      %datetime.tz;          #IMPLIED
        contractType      (scheduling_agreement) #IMPLIED
        >

<!--
  The representation of a line item in a contract status update request.

  Note:
     "type" attribute in <ItemStatus> specifies which kind of status that item should have. For example "created"
     "lineNumber" attribute in <ItemInfo> specifies the line number of current line item in the source buyer system.
     For example, item number in Ariba Sourcing contract.

  IdReference:
      The reference to a line item of the contract in the external system.
      For example, domain = 'SAPLineNumber', identifier='0100'

  Comments
        may be used to have a more user readable description of the code
-->
<!ELEMENT ContractItemStatus (ItemStatus, IdReference?, Comments*)>



<!--
    Use of the Contract element is deprecated

    A  mechanism for sending static contract pricing information.
-->
<!ELEMENT Contract (SupplierID+, Comments?, ItemSegment+)>
<!ATTLIST Contract
        effectiveDate   %datetime.tz;  #REQUIRED
        expirationDate  %datetime.tz;  #REQUIRED
        >

<!--
    Use of the ItemSegment element is deprecated.

    Defines an item segment for the index.  An item segment is an
    overlay for index items, allowing suppliers to override certain
    item attributes on a per-contract basis.

    Items may be segmented by some agreed-upon user-specific key that
    is used to determine who is eligible for these particular overlaid
    attributes (such as reduced or different prices).  Omitting the
    segmentKey indicates that the supplier wishes to set the given
    contract price system wide (for all users).

    segmentKey      - optional agreed-upon string used to segment
                      custom prices
-->
<!ELEMENT ItemSegment (ContractItem+)>
<!ATTLIST ItemSegment
        segmentKey  %string;  #IMPLIED
        >

<!--
    Use of the ContractItem element is deprecated

    A particular (custom) item overlay for a index item.  The item is
    referenced by the supplierPartID.

    ItemID - ID for the part to be overlaid.
    UnitPrice - Contract price for item
    Extrinsic - Named overlay. The Extrinsic should be named with the
    item field name it is to overlay. The Extrinsic must contain a
    <value> element which supplies the replacement value for the item
    field.
    For example:
    <ContractItem>
      <ItemID>
           <SupplierPartID>123456</SupplierPartID>
      </ItemID>
      <Extrinsic name="URL">http://www.newaddress.com</Extrinsic>
    </ContractItem>
-->
<!ELEMENT ContractItem (ItemID, UnitPrice?, Extrinsic*)>


<!--
    For better definitions of these Elements/Entities, refer to the cXML
    User's Guide and related documents.
-->

<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Index.mod#1 $
-->

<!--
     IndexItemAdd is the element used to insert an item in an index.

     ItemID          - uniquely identifies the item
     ItemDetail      - general information about the item
     IndexItemDetail - Index specific item detail

     Note that for historical reasons there is a LeadTime element in
     both ItemDetail and IndexItemDetail.  For interoperability, it is
     recommended to specify the same value in both LeadTime elements.
     If different values are specified in the different LeadTime
     elements for the same IndexItemAdd, the meaning of this is
     undefined.
-->
<!ELEMENT IndexItemAdd (ItemID, ItemDetail, IndexItemDetail)>
<!--
     IndexItemDelete is the element used to remove an item from the
     index.
     ItemID          - uniquely identifies the item

-->
<!ELEMENT IndexItemDelete (ItemID) >

<!--
     IndexItemPunchout is the element used to dynamically connect an
     index item to the supplier's resource for that item.

     ItemID          - uniquely identifies the item
     PunchoutDetail  - Describes the item being accessed
-->
<!ELEMENT IndexItemPunchout (ItemID, PunchoutDetail)>

<!--
     IndexItem is the general ELEMENT for the list of items in an
     index.

     IndexItemAdd      - Item(s) to be added to the index
     IndexItemDelete   - Item(s) to be removed from the index
     IndexItemPunchout - PunchOut Item(s) to be added to the index

-->
<!ELEMENT IndexItem (IndexItemAdd+ | IndexItemDelete+ | IndexItemPunchout+)>

<!--
     PunchoutDetail is the description of an item which is referenced
     in the index.

-->
<!ELEMENT PunchoutDetail (Description+, URL, Classification+,
                          UnitPrice?, UnitOfMeasure?, PriceBasisQuantity?,
                          ManufacturerName?, ManufacturerPartID?,
                          LeadTime?, ExpirationDate?, EffectiveDate?,
                          SearchGroupData*, TerritoryAvailable*,
                          Extrinsic*)>

<!ATTLIST PunchoutDetail
    punchoutLevel (store | aisle | shelf | product) "store"
>

<!--
     Index is the element used to update the list of goods and/or
     services which are being handled by the system.

     SupplierID  - One or more identities by which this supplier is
                   known. NOTE: These are to be considered synonyms
                   for the same Supplier.
     SearchGroup - Description(s) of parametric search(es) for this
                   index.  Use of the SearchGroup element is
                   deprecated.
     IndexItem   - The list of items with which to modify the index

     loadmode    - The mode in which the Index is loaded, either Full
                   or Incremental.  A full index load will
                   completely replace a previously loaded index. The
                   recommended application default is incremental.
-->
<!ELEMENT Index (SupplierID+, Comments?, SearchGroup*, IndexItem+)>
<!ATTLIST Index
    loadmode (Full | Incremental) #IMPLIED
>

<!--
     Use of the SearchGroup element is deprecated.  Parametric search
     shapes should be defined using TypeDefinition and its child
     elements.

     SearchGroup is a grouping of attributes which constitute a search
     which can be performed against an index.

     Name            - Name of the search
     SearchAttribute - List of searchable index fields.
-->
<!ELEMENT SearchGroup (Name, SearchAttribute+)>

<!--
     Use of the SearchAttribute element is deprecated.  Parametric
     search shapes should be defined using TypeDefinition and its
     child elements.

     An attribute that can searched parametrically.

     name - name of the attribute.
     type - the type of the attribute
-->
<!ELEMENT SearchAttribute EMPTY>
<!ATTLIST SearchAttribute
    name  %string;  #REQUIRED
    type  %string;  #IMPLIED
>

<!--
     ExpirationDate is the date and time after which the element is no longer
     valid.  Must be specified in ISO 8601 format.

-->
<!ELEMENT ExpirationDate (#PCDATA)>   <!-- datetime.tz -->
<!--
     EffectiveDate date and time at which the element becomes valid.
     Must be specified in ISO 8601 format.
-->
<!ELEMENT EffectiveDate (#PCDATA)>    <!-- datetime.tz -->

<!--
     IndexItemDetail contains various index specific elements which
     help to define an index item.
     LeadTime           - time in days to receive the item
     ExpirationDate     - Expiration date and time for the item in this index
     EffectiveDate      - Effective date and time for the item in this index
     SearchGroupData    - Parametric search data
     TerritoryAvailable - Country codes
-->
<!ELEMENT IndexItemDetail (LeadTime, ExpirationDate?, EffectiveDate?,
                           SearchGroupData*, TerritoryAvailable*)>

<!--
     Specification of a territory (using ISO country and/or region codes)
     in which the particular index item is available.
-->
<!ELEMENT TerritoryAvailable (#PCDATA)>

<!--
     SearchGroupData specifies the data which should be used to identify
     this item in a search.
-->
<!ELEMENT SearchGroupData (Name, SearchDataElement*)>

<!--
     SearchDataElement is a field and value which are used to provide the
     parametric data to a search.
-->
<!ELEMENT SearchDataElement EMPTY>
<!ATTLIST SearchDataElement
     name  %string; #REQUIRED
     value %string; #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/modules/Pending.mod#6 $
-->

<!--
    For better definitions of these Elements/Entities, refer to the cXML
    Specification documents.
-->

<!--
    A request used for polling for waiting messages. A waiting message, if
    any, will be included in the returned stream. The lastReceivedTimestamp
    attribute, if present, provides the timestamp of the last received
    message. When the Receiver sees this, it can remove messages with earlier
    timestamps from the pending queue.

    The maxMessages attribute is used to indicate the maximum number of
    pending messages that can be included in the response.


-->
<!ELEMENT GetPendingRequest (MessageType+)>
<!ATTLIST GetPendingRequest
    maxMessages            %uint;         #IMPLIED
    lastReceivedTimestamp  %datetime.tz;  #IMPLIED
>

<!--
    Indicates the type of message(s) being polled for. The valid values are
    the corresponding element names e.g. SubscriptionChangeMessage.
-->
<!ELEMENT MessageType (#PCDATA)> <!-- nmtoken -->


<!--
    The data elements being carried back in the response. These are fully
    formed cXML messages being carried through the Request/Response channel.
-->
<!ELEMENT GetPendingResponse (cXML+)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Subscription.mod#1 $
-->

<!--
    Indicates that something changed in a buyer's content subscription.
    Since this is a Message, it can come at any time - no explicit Request
    needs to be sent first.
-->
<!ELEMENT SubscriptionChangeMessage (Subscription+)>
<!ATTLIST SubscriptionChangeMessage
    type  (new | update | delete)  #REQUIRED
>

<!--
    A content subscription.
-->
<!ELEMENT Subscription (InternalID, SubscriptionVersion?, Name, Changetime, SupplierID+, Format?,
                        Description?)>


<!ELEMENT Changetime (#PCDATA)> <!-- datetime.tz -->
<!ELEMENT Format (#PCDATA)> <!-- string -->
<!ATTLIST Format
    version  %string;  #REQUIRED
>

<!--
    Requests a complete list of catalog subscriptions for a buyer.
-->
<!ELEMENT SubscriptionListRequest EMPTY>

<!--
    The list of Subscriptions for the given buyer.
-->
<!ELEMENT SubscriptionListResponse (Subscription+)>

<!--
    Requests the contents of a catalog that the buyer is subscribed to.
-->
<!ELEMENT SubscriptionContentRequest (InternalID, SubscriptionVersion?, SupplierID+)>

<!--
    The data associated with a particular subscription.
-->
<!ELEMENT SubscriptionContentResponse (Subscription, SubscriptionContent+)>

<!--
    The actual content associated with a particular subscription.

    Use of the Contract element is deprecated.
-->
<!ELEMENT SubscriptionContent (CIFContent | Index | Contract)>
<!ATTLIST SubscriptionContent
    filename  %string;  #IMPLIED
>

<!--
    Contents of CIF file in base64 encoding.
-->
<!ELEMENT CIFContent (#PCDATA)> <!-- bin.base64 -->

<!--
    Indicates that something has changed in the supplier data for
    a supplier the buyer has a relationship with. Since this is a message, no
    Request needs to be sent to receive this Message.
-->
<!ELEMENT SupplierChangeMessage (Supplier+)>
<!ATTLIST SupplierChangeMessage
    type  (new | update | delete)  #REQUIRED
>

<!--
    Requests for a complete list of suppliers the buyer currently has
    relationships with.
-->
<!ELEMENT SupplierListRequest EMPTY>

<!--
    The list of suppliers requested by SupplierListRequest.
-->
<!ELEMENT SupplierListResponse (Supplier+)>

<!--
    Requests for a data associated with a particular supplier identified by
    SupplierID.
-->
<!ELEMENT SupplierDataRequest (SupplierID+)>

<!--
    The data associated with the desired supplier.
-->
<!ELEMENT SupplierDataResponse (Supplier)>


<!--
	Reference to the Subscription Version. To be used with InternalID of a catalog.
	vesionNumber
		To uniquely identify a catalog with the given InternalID and versionNumber.
-->
<!ELEMENT SubscriptionVersion EMPTY>
<!ATTLIST SubscriptionVersion
    versionNumber   %uint;  #REQUIRED
>


<!--
	Catalog subscription status from buyer.
-->
<!ELEMENT SubscriptionStatus (Comments?)>
<!ATTLIST SubscriptionStatus
      status    (received | validation_error | validated | approved | rejected | activated | deactivated | deleted | changed)  #REQUIRED>

<!--
	SubscriptionStatusUpdateRequest
	A request to update the subscription status of a Catalog. 

	InternalID
	   ID of the catalog.

	SubscriptionStatus
	   Element representing the status updates to the catalog.
-->
<!ELEMENT SubscriptionStatusUpdateRequest (InternalID, SubscriptionVersion?, SubscriptionStatus)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Provider.mod#1 $
-->

<!-- ====
    Provider* transaction is used to visually integrate an application with
    a UI provided by a service provider.
==== -->

<!--
     ProviderSetupRequest

     The originating application would provide the BrowserFormPost location
     only if it wished the provider site to display a "Done" button or
     would like information (at least Status) returned at the end of the
     interactive session.  Inclusion should lead to a ProviderDoneMessage
     from the provider at the end of a session.

     The originating application would provide the Followup location if it
     wished the provider to provide information about later status changes
     in the service (after the end of a particular Provider session).  This
     applies only when the initial status (transmitted via a
     ProviderDoneMessage) was an interim value.
-->

<!ELEMENT ProviderSetupRequest (OriginatorCookie,
                                (BrowserFormPost, Followup?)?,
                                SelectedService, Extrinsic*)>

<!--
     ProviderSetupResponse
-->

<!ELEMENT ProviderSetupResponse (StartPage)>

<!--
    ProviderDoneMessage
-->

<!ELEMENT ProviderDoneMessage (OriginatorCookie, ReturnData*)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/DataAvailable.mod#1 $
-->


<!--
    DataAvailable message.
-->

<!ELEMENT DataAvailableMessage (InternalID)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/DataRequest.mod#1 $
-->


<!--
    Definition of a DataRequest.
-->
<!ELEMENT DataRequest (InternalID)>

<!--
    DataResponse. Contains the attachments if any for this response.
    Only a successful response to a download attempt would include this element
-->

<!ELEMENT DataResponse (Attachment+)>

<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/CatalogUpload.mod#1 $
-->

<!--
    Contain all the information related to the catalog upload, the same
    functionality as the catalog upload provided by supplier.ariba.com
-->
<!ELEMENT CatalogUploadRequest (CatalogName, Description, Attachment,
                                Commodities?, AutoPublish?, Notification)>
<!ATTLIST CatalogUploadRequest
    operation  (new | update)  #REQUIRED
>

<!--
    CatalogName is the name of the uploaded/published catalog. The
    name is unique per supplier, and it can be defined in the
    different languages
-->
<!ELEMENT CatalogName ( #PCDATA )> <!-- string -->
<!ATTLIST CatalogName
    xml:lang  %xmlLangCode;  #REQUIRED
>

<!--
    The list of the commodity codes.
-->
<!ELEMENT Commodities (CommodityCode+)>

<!--
    The two-digit code
-->
<!ELEMENT CommodityCode ( #PCDATA )> <!-- string -->

<!--
    If the attribute "enabled" set to be "true", the updated catalog
    will be published to the same buyers according to its previous
    publish
-->
<!ELEMENT AutoPublish EMPTY>
<!ATTLIST AutoPublish
    enabled       %string;       #REQUIRED
>

<!--
    The information used by Ariba CSN to send the notification (the
    status of the catalog upload) to the suppliers.
-->
<!ELEMENT Notification (Email?, URLPost?)>

<!--
    The URL to receive the StatusUpdateRequest, which describes the
    status of the catalog upload, such as the "success" (means the
    catalog is validated, or the catalog is published),
    the "failed" (the catalog has errors, ......)
-->
<!ELEMENT URLPost EMPTY>
<!ATTLIST URLPost
    enabled       %string;       #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/Modules/Profile.mod#6 $
-->

<!--
    AuthRequest

    An AuthRequest is used when one party (the "receiver") receives
    credentials from another party (the "principal") and the receiver
    needs a trusted third party to validate the credentials.  The
    receiver should enclose the credentials in an AuthRequest and send
    them to the trusted third party for validation.

    If the principal attempts to authenticate by revealing the shared
    secret between itself and the trusted third party (not
    recommended), the receiver should forward the credentials as they
    were received, including the shared secret.

    If the principal attempts to authenticate through a client
    certificate (recommended), the receiver should forward the
    credentials as well as an X509Data element containing an
    X509IssuerSerial element describing the certificate used by the
    principal (the receiver normally obtains this information from its
    webserver or SSL/TLS implementation).

    If the supplied credential is invalid, the trusted third party
    should respond with an empty cXML response of status 403
    (Forbidden).  If the supplied credential is valid, the trusted
    third party should respond with an AuthResponse that contains the
    valid credentials.
-->
<!ELEMENT AuthRequest (Credential+, X509Data?)>

<!--
    X509Data

    An X509Data element is constructed to describe an X.509 client
    certificate being used for authentication.  This element (and its
    children) are derived from the XML Digital Signature standard ().
-->
<!ELEMENT X509Data ((X509IssuerSerial |
                     X509SKI |
                     X509SubjectName |
                     X509Certificate)+ |
                     X509CRL)>

<!--
    X509IssuerSerial

    This element is a container for the serial number and issuer name
    of the X.509 certificate.
-->
<!ELEMENT X509IssuerSerial (X509IssuerName, X509SerialNumber) >

<!--
    X509IssuerName

    This element contains the distinguished name of the issuer of the
    X.509 certificate.  The distinguished name should be a string 
    representation of an LDAP Distinguished Name, as described in RFC 
    2253.  For example,

    C=US, O="John Doe Data Security, Inc.", OU=Secure Server
    Certification Authority

-->
<!ELEMENT X509IssuerName (#PCDATA)> <!-- string -->

<!--
    X509 SubjectName

    This element contains the distinguished name of the subject of the
    X.509 certificate.  This should be a string representation of an 
    LDAP distinguished name, as described in RFC 2253.
-->
<!ELEMENT X509SubjectName (#PCDATA)> <!-- string -->

<!--
    X509SerialNumber

    This element contains the serial number of the X.509 certificate.
-->
<!ELEMENT X509SerialNumber (#PCDATA)> <!-- string -->

<!--
    X509SKI

    This element contains the Subject Key Identifier of the X.509
    certificate.
 -->
<!ELEMENT X509SKI (#PCDATA)> <!-- string -->

<!--
    X509Certificate

    This element contains a Base 64-encoded X.509v3 certificate.
-->
<!ELEMENT X509Certificate (#PCDATA)> <!-- string -->

<!--
    X509CRL

    This element contains a Base 64-encoded X.509v3 Certificate
    Revocation List.
-->
<!ELEMENT X509CRL (#PCDATA)> <!-- string -->

<!--
    AuthResponse

    This response returns a list of valid credentials of the person
    entity in the AuthRequest.  An AuthResponse is returned only for a
    successful authentication; for failed authentications, an empty
    response with status 403 (Forbidden) will be returned.

    expirationDate
        Specifies the time beyond which the information contained in
        the AuthResponse must be discarded.  In other words, the
        inclusion of the expirationDate attribute specifies that the
        receiver of the AuthResponse may cache the information therein
        until the expirationDate.

        The absence of an expirationDate should be interpreted to
        forbid caching.
-->
<!ELEMENT AuthResponse (Credential)+>
<!ATTLIST AuthResponse
    expirationDate %datetime.tz; #IMPLIED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/schema/Modules/Payment.mod#1 $
-->

<!--
    This file contains all the payment related elements
-->

<!--
    Defines different payment methods
-->
<!ENTITY % cxml.paymentMethod  "(ach | cash | check |
                                creditCard | debitCard |
                                draft | wire |
                                other)">

<!--
    Defines a payment method

    Description
        The description of the payment method. Description is
        mandatory if the type is set to "other". The <ShortName>
	element in Description must indicate the name of the payment
	method.

    type
        the payment method type
-->
<!ELEMENT PaymentMethod (Description?)>
<!ATTLIST PaymentMethod
    type %cxml.paymentMethod; #REQUIRED
>

<!--
    Defines payable information related to a invoice.

    InvoiceReference
        The reference to invoice being paid. Copied from the InvoiceDetailRequest message.

    InvoiceIDInfo
        The reference to invoice in the Supplier system being paid.

    PayableOrderInfo
        Supplementary information related to the invoice. For example,
        if you are making a payment against a consolidated invoice,
        you may also include associated order information.

    PayableMasterAgreementInfo
        Supplementary information related to the invoice. For example,
        if you are making a payment against a Consolidated Invoice,
        you may also include associated master agreement information.
-->
<!ELEMENT PayableInvoiceInfo ((InvoiceReference | InvoiceIDInfo),
                              (PayableOrderInfo | PayableMasterAgreementInfo)?)>

<!--
    Defines payable information related to an order.

    OrderReference
        The reference to the order being paid.

    OrderIDInfo
        The buyer system order id of the order.
-->
<!ELEMENT PayableOrderInfo (OrderReference | OrderIDInfo)>

<!--
    Defines payable information related to a master agreement.

    MasterAgreementReference
        The reference to master agreement in the Buyer system being paid.
        Copied from the InvoiceDetailRequest message.

    MasterAgreementIDInfo
        The reference to master agreement in the Buyer system being paid.
-->
<!ELEMENT PayableMasterAgreementInfo (MasterAgreementReference | MasterAgreementIDInfo)>

<!--
    Defines information related to a payable such as an invoice,
    order, masteragreement, receipt, etc. More than one payable
    information can be included.

    PayableInvoiceInfo
        The info about the invoice being paid.

    PayableOrderInfo
        The info about the order being paid.

    PayableMasterAgreeementInfo
        The info about the master agreement being paid.

-->
<!ELEMENT PayableInfo ( PayableInvoiceInfo | PayableOrderInfo |
                        PayableMasterAgreementInfo)>



<!--
    Defines the party involved in the payment, including Payer of this
    payment (payer), Payee of this payment (payee),
    Payer's bank (originatingBank), Payee's bank (receivingBank),
    Payer's Correspondent Bank, Payee's Correspondent Bank, Intermediary Bank, etc

    Contact
        Contact information of the payment partner.  Allowed contact
        roles include payer, payee, originatingBank, receivingBank,
        originatingCorrespondentBank, receivingCorrespondent, 
        receivingCorrespondentBank, intermediaryBank, and remitTo.

        Contact elements with role 'payer' and 'payee' are always
        required. If the payment method indicates a bank transfer,
        then Contact elements with role 'originatingBank' and
        'receivingBank' are required.

        If the contact role is 'remitTo', it would contain contact
        information of the remittance address. For this role, the
        IdReference and PCard elements may be absent.

    IdReference
        Partner reference ID, including bank account identification,
        bank identification, and optionally bank branch identification.

        IdReference is mandatory for all transactions that involve
        electronic payments. It is optional only for non-electronic
        forms of payments, such as, 'check', 'draft' etc.

        The bank account identification is specified as follows:
            bankAccountID   : Domestic account number
            ibanID          : IBAN ID (International Bank Account Number) as
                              specified in ISO 13616.

        The bank identification is specified as follows:
            abaRoutingNumber: ABA (American Banking Association)
                              Routing Number)
            swiftID         : SWIFT ID (Society for Worldwide Interbank Financial
                              Telecommunications)
            chipsID         : CHIPS ID (Clearing House Interbank Payment System)
            isoBicID        : ISO BIC ID (Bank Identifier Code) as specified
                              in ISO 9362.
                              The Bank Identifier Code (BIC) is a
                              universal method of identifying
                              financial institutions. The BIC consists
                              of 8 or 11 characters, comprising a bank
                              code (4 characters), a country code (2
                              characters), a location code (2
                              characters) and an optional branch code
                              (3 characters).

            bankNationalID : If none of the above bank identification
                             methods are applicable, then use this to
                             specify national clearing codes that are
                             specific to a country. This identification
                             if used, should uniquely identify
                             the bank within the country specified in the
                             Contact.
	
	    
        The bank branch identification, if necessary, is specified as follows:
            bankBranchID    : The bank branch ID

        The following table illustrates some valid combinations of
        Contact and IdReference domains:
        +..............................+.....................................+
        | Contact@role                 | IdReference@domain                  |
        +..............................+.....................................+
        | payer                        | bankAccountID, ibanID               |
        |                              |                                     |
        | payee                        | bankAccountID, ibanID               |
        | receivingCorrespondent       | bankAccountId, swiftID              |        
        |                              |                                     |
        | originatingBank              | abaRoutingNumber, bankNationalID,   |
        |                              | isoBicID, swiftID,                  |
        |                              | bankBranchID (optional)             |
        |                              |                                     |
        | receivingBank                | abaRoutingNumber, bankNationalID,   |
        |                              | isoBicID, swiftID,                  |
        |                              | bankBranchID (optional)             |
        |                              |                                     |
        | originatingCorrespondentBank | abaRoutingNumber, isoBicID, swiftID |
        |                              |                                     |
        | receivingCorrespondentBank   | abaRoutingNumber, isoBicID, swiftID |
        |                              |                                     |
        | intermediaryBank             | abaRoutingNumber, isoBicID, swiftID |
        +..............................+.....................................+

    PCard
        PCard information including pcard number, pcard expiration date,
        pcard name.IdReference

        This can only appear for the Contact with payer role. This is used
        when the payment is done through a pcard.
-->
<!ELEMENT PaymentPartner (Contact, IdReference*, PCard?)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/release/schema/1.2.35.1+/Modules/Organization.mod#1 $
-->
<!--
     Organization
-->

<!ELEMENT Organization (Name, Credential+, OrganizationRole*, Address, CorporateInformation?, TaxInformation?, RelationshipInformation?, Description*,  Person*, Industry*, Commodity*, Territory*, PaymentInformation*, Extrinsic*)>



<!-- ====
    OrganizationDataRequest - Get data about an organization (or multiple
    organizations).

    The OrganizationID wrapper is used to distinguish between requests
    about multiple organizations and requests including alias Credentials
    for the same organization.
==== -->

<!ELEMENT OrganizationDataRequest
         (OrganizationID+)>

<!--
    OrganizationDataResponse

    Extrinsic elements will be used to pass data about an Org that is not
    already represented by the Organization element.
-->

<!ELEMENT OrganizationDataResponse (Organization+)>

<!--
	Used to push organization information to another system.
-->

<!ELEMENT OrganizationChangeMessage (Organization+)>
<!ATTLIST OrganizationChangeMessage
    type  (new | update | delete)  #REQUIRED
>



<!ELEMENT CorporateInformation (AnnualRevenue?, StateOfIncorporation?, OwnershipType*)>
<!ATTLIST CorporateInformation
    yearFounded        %uint; #IMPLIED
    numberOfEmployees  %uint; #IMPLIED
    organizationType  NMTOKEN #IMPLIED
>
<!ELEMENT StateOfIncorporation (State)>
<!ELEMENT AnnualRevenue (MinAmount, MaxAmount?)>
<!ELEMENT OwnershipType (Extrinsic*)>

<!--
	name can be either minorityOwned, womanOwned, veteranOwned, disabledVeteranOwned,
	vietnamVeteranOwned for US companies.
	The list is not enumerated since it can be different for different countries.
-->
<!ATTLIST OwnershipType
    name  NMTOKEN #REQUIRED
>



<!--
        TaxInformation

        Used to list the associated tax information that for example can be
        used for 1099 purposes.
-->	
<!ELEMENT TaxInformation (LegalName?, TaxID*)>
<!ATTLIST TaxInformation
    isExemptFromBackupWithholding  (yes | no) #IMPLIED
>

<!--
        Owner of ssn or tin
-->
<!ELEMENT LegalName (#PCDATA)>
<!ATTLIST LegalName
    xml:lang  %xmlLangCode;  #REQUIRED
>

<!--
        This contains the actual tin or ssn number. Domain specifies
        whether it is us social security number or us tax identification
        number.
-->
<!ELEMENT TaxID (#PCDATA)>
<!ATTLIST  TaxID
    domain  (usSSN | usTIN | stateTIN | regionalTIN | vatID)  #REQUIRED
>



<!--
        This section contains anything that is specific between the
        requester and requestee
--> 
<!ELEMENT RelationshipInformation (PaymentRelationshipInformation?)>
		
<!--
       This section contains payment information between requester and 
       requestee. 
-->
<!ELEMENT PaymentRelationshipInformation (PaymentProviderInformation+, Extrinsic*)>
                      
<!--
       This section contains information about the payment provider who is 
       going to execute payment between the requester and the requestee. 
       It has the id of the payment provider payment service as well as 
       the payment methods that the payment provider supports. 
-->
<!ELEMENT PaymentProviderInformation (Description?, PaymentMethod+, Extrinsic*)>
<!ATTLIST PaymentProviderInformation
     paymentProviderID %string; #REQUIRED
>



<!--
    Person associates a particular individual with the (many) roles they may
    play on behalf of an organization.

    Note: The Contact element in this context would not include a role
    attribute since this does not describe a person acting in any particular
    fashion.
-->
<!ELEMENT Person (Contact, PersonRole+, IdReference*, Extrinsic*)>

<!--
    PersonRole

    Used to list the possible values the Contact@role attribute may take
    when the associated Contact appears in a cXML Request (such as
    ProviderSetupRequest).
-->
<!ELEMENT PersonRole EMPTY>
<!ATTLIST PersonRole
    name NMTOKEN #REQUIRED
>


<!ELEMENT Industry (Classification)>
<!ELEMENT Commodity (Classification)>
<!ELEMENT Territory (Classification)>



<!ELEMENT PaymentInformation (PaymentMethodRemittanceInformation+)>

<!ELEMENT PaymentMethodRemittanceInformation (Contact, PaymentMethod*, PaymentMethodPartner*)>
<!ATTLIST PaymentMethodRemittanceInformation
    isDefault (yes) #IMPLIED
    preferredPaymentMethod %cxml.paymentMethod; #IMPLIED
>

<!--
	This new tag helps to include the financial information of an organization into the 
        PaymentMethodRemittance tag.
	Also, for IdReference tag, we add a new domain receivingCorrspondent.  This new role 
        behaves as the payee for receiving correspondent bank.  We need this new role because 
        in the wire transfer case, the receiving party could have up to two banks: beneficiary 
        and corresponding banks.  Hence,  payee role is needed to contain the information about 
        beneficiary bank account and receivingBank role is needed to contain the information 
        about the beneficiary bank.  Similary, for the receiving correspondent bank, we have the 
        roles receivingCorresondent and receivingCorrespondentBank

-->

<!ELEMENT PaymentMethodPartner (PaymentMethod, PaymentPartner+) >

 
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/schema/Modules/OrganizationID.mod#1 $
-->
<!--
     OrganizationID

     Credentials listed here describe the same organization.  May include
     type="marketplace" Credential elements if that context is necessary.
-->
<!ELEMENT OrganizationID (Credential+)>


<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/schema/Modules/OrganizationPrivate.mod#1 $
-->


<!--
    OrganizationRole - Identifies one of the roles this (new) organization
    is playing.

    name
        Name of the role played by the organization.  Common values
        include "supplier" and "buyer".
-->
<!ELEMENT OrganizationRole EMPTY>
<!ATTLIST OrganizationRole
    name NMTOKEN #REQUIRED
>
<!-- Inventory that is in the possession of the customer, and is owned and managed by the customer.-->
<!ELEMENT Inventory (SubcontractingStockInTransferQuantity?, UnrestrictedUseQuantity?, 
BlockedQuantity?, QualityInspectionQuantity?, PromotionQuantity?,
StockInTransferQuantity?, IncrementQuantity?, RequiredMinimumQuantity?,
RequiredMaximumQuantity?,
StockOnHandQuantity?, WorkInProcessQuantity?, IntransitQuantity?, ScrapQuantity?,
OrderQuantity?, DaysOfSupply?)>

<!-- Consignment Inventory  is inventory that is in the possession of the customer, but is still owned by the supplier.-->
<!ELEMENT ConsignmentInventory (SubcontractingStockInTransferQuantity?,
UnrestrictedUseQuantity?, BlockedQuantity?, 
QualityInspectionQuantity?, PromotionQuantity?, StockInTransferQuantity?, 
IncrementQuantity?, RequiredMinimumQuantity?, RequiredMaximumQuantity?)>

<!--SubcontractingStockInTransfer is the transfer of stock to a vendor of type subcontracting using a special movement type. -->
<!ELEMENT SubcontractingStockInTransferQuantity (UnitOfMeasure?)  >
<!ATTLIST SubcontractingStockInTransferQuantity
    quantity        %r8;       #IMPLIED>

<!-- Unrestricted Stock is the physical stock that is always available at a plant/storage location that can be consumed for stock movements and available for Material requirements planning.-->
<!ELEMENT UnrestrictedUseQuantity (UnitOfMeasure?)  >
<!ATTLIST UnrestrictedUseQuantity
    quantity        %r8;       #IMPLIED>

<!--Blocked stock is not counted as unrestricted stock .You can have Plant level configuration to consider the stock for MRP.-->
<!ELEMENT BlockedQuantity (UnitOfMeasure?)  >
<!ATTLIST BlockedQuantity
    quantity        %r8;       #IMPLIED>

<!-- QualityInspectionQuantity is the stock type where the received  stock is under quality inspection.-->
<!ELEMENT QualityInspectionQuantity (UnitOfMeasure?)  >
<!ATTLIST QualityInspectionQuantity
    quantity        %r8;       #IMPLIED>

<!--PromotionQuanity is the stock quantity that is reserved  for promotions.-->
<!ELEMENT PromotionQuantity (UnitOfMeasure?)  >
<!ATTLIST PromotionQuantity
    quantity        %r8;       #IMPLIED>
<!--StockInTransferQuantity 
When there is a movement of stock between plant to plant, company code to company code then such movement of stock is called as Stock transfer.
-->
<!ELEMENT StockInTransferQuantity (UnitOfMeasure?)  >
<!ATTLIST StockInTransferQuantity
    quantity        %r8;       #IMPLIED>

<!-- -->
<!ELEMENT IncrementQuantity (UnitOfMeasure?)  >
<!ATTLIST IncrementQuantity
    quantity        %r8;       #IMPLIED>

<!--Required Minimum Quantity is a minimum stock level above which the stock has to be maintained.-->
<!ELEMENT RequiredMinimumQuantity (UnitOfMeasure?)  >
<!ATTLIST RequiredMinimumQuantity
    quantity        %r8;       #IMPLIED>

<!--Required Maximum Quantity is a maximum stock level above which the stock has to be maintained.-->
<!ELEMENT RequiredMaximumQuantity (UnitOfMeasure?)  >
<!ATTLIST RequiredMaximumQuantity
    quantity        %r8;       #IMPLIED>

<!--Forecast, represents the forecast quantity of a product for a specific time period.-->
<!ELEMENT Forecast (Period, ForecastQuantity, UnitPrice?, Extrinsic*)  >

<!--The Forecast quantity.-->
<!ELEMENT ForecastQuantity (UnitOfMeasure?)  >
<!ATTLIST ForecastQuantity
    quantity        %r8;       #IMPLIED>

<!--The quantity withdrawn in a consignment movement.-->
<!ELEMENT MovementQuantity (UnitOfMeasure?)  >
<!ATTLIST MovementQuantity
    quantity        %r8;       #IMPLIED>
    
<!--The minimum/maximum order quantity refers to the minimum/maximum quantity the customer must order. The trading partners are alerted if the order quantity is not within the required quantity range during order entry.-->
<!ELEMENT OrderQuantity (UnitOfMeasure?)>
<!ATTLIST OrderQuantity
    minimum        %r8;    #IMPLIED
    maximum        %r8;    #IMPLIED>

<!--DaysOfSupply is used to determine for how long stocks and receipts will cover the requirements, to avoid product shortages or stock levels that are too high.
    Minimum and Maximum Days of Supply in days can be specified. The system then issues replenishment proposals when the days’ supply falls above or Below the threshold.-->
<!ELEMENT DaysOfSupply EMPTY>
<!ATTLIST DaysOfSupply
    minimum        %r8;    #IMPLIED
    maximum        %r8;    #IMPLIED >

<!--StockOnHand represents the calculated value of different Stock types dependent on the customer, location and material.-->
<!ELEMENT StockOnHandQuantity (UnitOfMeasure?)>
<!ATTLIST StockOnHandQuantity
    quantity        %r8;       #REQUIRED >

<!--Work in progress (WIP), also called work in process, is inventory that has begun the manufacturing process and is no longer included in raw materials inventory, but is not yet a completed product. On a balance sheet, work in progress is considered to be an asset because money has been spent towards a completed product.-->
<!ELEMENT WorkInProcessQuantity (UnitOfMeasure?)>
<!ATTLIST WorkInProcessQuantity
    quantity        %r8;       #REQUIRED >
    
<!--The stock in transit is the quantity of a material that was withdrawn from the stock of the issuing plant but has not yet arrived at the receiving plant.-->
<!ELEMENT IntransitQuantity (UnitOfMeasure?)>
<!ATTLIST IntransitQuantity
    quantity        %r8;       #REQUIRED >
    
<!--The quantity represents the Scrap of a material that is expected to occur during production if the material is a component.-->
<!ELEMENT ScrapQuantity (UnitOfMeasure?)>
<!ATTLIST ScrapQuantity
    quantity        %r8;       #REQUIRED >
    
<!--
    TimeSeriesDetails carries product activity or product replenishment information regarding the quantity of a product for a specific time period.
    Period
        The start date and end date for the forecast response.
    TimeSeriesQuantity
        The generic quantity associated with the given type of inventory timeseries or replenishment timeseries.
    UpsideQuantity
        The quantity of inventory that the supplier can provide above and beyond the request demand.
        This quantity should only be specified when the type of ReplenishmentTimeSeries is forecastConrimation.
    Priority
        Priority for the given timeseries. (Optional)
-->
<!ELEMENT TimeSeriesDetails (Period, TimeSeriesQuantity?, UpsideQuantity?, IdReference*, Priority?, Extrinsic*)>

<!--
    The generic quantity associated with the given type of inventory timeseries or replenishment timeseries.
-->
<!ELEMENT TimeSeriesQuantity (UnitOfMeasure?)>
<!ATTLIST TimeSeriesQuantity
    quantity        %r8;    #REQUIRED>

<!--
    The Forecast Upside quantity. The quantity of inventory that the supplier can provide above and beyond the request demand.
    This quantity should only be specified when the type of ReplenishmentTimeSeries is forecastConrimation.
-->
<!ELEMENT UpsideQuantity (UnitOfMeasure?)  >
<!ATTLIST UpsideQuantity
    quantity        %r8;       #REQUIRED >


<!--
    Quality Notification Header
        The quality notification header contains data that is relevant for the entire quality notification. This includes data about the partners, locations, reference documents, the subject, task, activity, affected product and quantity.
    Defect items
        A quality notification can contain one or more defect items. A defect item provides details about a specific problem or defect. You use a code to classify each item according to the type of problem or defect (codes).
    Details of Defect Item
        A defect item can contain causes, tasks, activities, including codes, code groups, and description.
-->
<!ELEMENT QualityNotificationRequest (QualityNotificationRequestHeader, QualityNotificationRequestItem*)>

<!--
    Contains information about this Quality Notification Request that is common to all contained QualityNotificationRequestItem.
    
    requestID
        AN document number for QN.
    externalRequestID
        This is ERP document number for QN.
    requestDate
        QN date time.
    requestVersion
        Number of version of this document if the current operation is "update".
    operation 
        "new" operation identifies a new QN.
        "update" operation identified an update to an existing QN. 
            DocumentReference attribute should be used to indicate the original QN.
    status
        Current status of document. Its values are: draft, new, in-process, completed, postponed, canceled and closed.
    discoveryDate
        When the defect was discovered.
    serialNumber
        Serial number of defective good.
    returnDate
        Date on which the defective good is returned.
    returnAuthorizationNumber
        Return Authorization Number information for a line item.
    itemCategory
        if defect was originated in subcontract supplier, then its value is "subcontract".
    minimumRequiredTasks
	   Number of minimum required tasks to close this quality notification, it will be evaluated only when the status is "closed".
    minimumRequiredActivities
	   Number of minimum required activities to close this quality notification, it will be evaluated only when the status is "closed".
    minimumRequiredCauses
	   Number of minimum required causes to complete a defect, it will be evaluated only when this attribute is not present at defect level.
    DocumentReference
        Reference to an earlier QualityNotificationRequest. If the attribute QualityNotificationRequestHeader@operation is "update", the DocumentReference is required and it must reference the original QualityNotificationRequest document (with value "new" for its attribute QualityNotificationRequest@operation) during the same notification process.
    QNCode
        These codes define the QN in four domains:
          - "type" of QN without code group.
          - "subject" (category) group and code.
          - "reason" of this QN.
          - "revision" Quality Notification revision.
        See element QNCode below for more details.    
    ShipTo, BillTo, Shipping
        Optional. Addresses related to item if it is not related to referenced PO or ASN.
    Contact
        Related contacts like buyerParty, sellerParty, senderBusinessSystemID, senderParty, receipientParty or componentSupplier.
    QNNotes
        Structure to define comments and attachments.
    Priority
        Priority for Quality Notification.s
    RequestedProcessingPeriod
        The time period during which the processing is required.
    MalfunctionPeriod
        The time period during which item presented this defect.
    ReferenceDocumentInfo
        Optional. Reference to Purchase Order or Ship Notice on which the quality notification is reported. Notifications are only addressed to a single item. It is possible send a QN without a referenced document in which case relevant information should be send in the other elements. 
    ItemInfo
        To get the good information.
    Batch
        Standard element to capture batch information of Customer and Supplier.
    ComplainQuantity
        Quantity that was complained.
    ReturnQuantity
        Quantity that was returned.
    QualityNotificationTask
        Structure to capture task detail at QN level: Task Number (Auto Generated 1 to n), Code Group (Task type)
        Code Group description, Task Code, Task Code Description, Description,  Comments for Task Section,
        Status, start end datetime, Processor and Completion detail.
    QualityNotificationActivity
        Structure to capture Activity detail at QN level: Activity Number , Code Group (Activity type)
        Code Group description, Activity Code,  Code Description, Description,  Comments for activity Section,
        Status, start end datetime.
    Extrinsic
        Additional information related to this document.
-->
<!ELEMENT QualityNotificationRequestHeader (
    DocumentReference?,
    QNCode*,
    ShipTo?,
    BillTo?,
    Shipping?,
    Contact*,
    QNNotes+,
    Priority,
    RequestedProcessingPeriod?,
    MalfunctionPeriod?,
    ReferenceDocumentInfo?,
    ItemInfo,
    Batch?,
    ComplainQuantity?,
    ReturnQuantity?,
    QualityNotificationTask*,
    QualityNotificationActivity*,
    Extrinsic*)>
<!ATTLIST QualityNotificationRequestHeader
    requestID                 %string;              #REQUIRED
    externalRequestID         %string;              #IMPLIED
    requestDate               %datetime.tz;         #REQUIRED
    requestVersion            %number;              #IMPLIED
    operation                (new | update)         "new"
    status                   (draft | new | in-process | completed | postponed | canceled | closed)  "new"
    discoveryDate             %datetime.tz;         #IMPLIED
    serialNumber              %string;              #IMPLIED
    returnDate                %datetime.tz;         #IMPLIED
    returnAuthorizationNumber %string;              #IMPLIED
    itemCategory             (subcontract)          #IMPLIED
    minimumRequiredTasks	  %uint;                #IMPLIED
    minimumRequiredActivities %uint;                #IMPLIED
    minimumRequiredCauses     %uint;                #IMPLIED  
>

<!--
    QualityNotificationRequestItem contains defect item detail. It's not PO/ASN item but defect item detail.

    defectId
        Ordinal of defect.
    defectCount
        Number of defects in this item.
    isCompleted
        All tasks and activities in item were completed.
    completedDate
        Date time when item was completed.
    minimumRequiredTasks
	   Number of minimum required tasks to complete this defect, it will be evaluated only when isCompleted attribute is "true".
    minimumRequiredActivities
	   Number of minimum required activities to complete this defect, it will be evaluated only when isCompleted attribute is "true".
    minimumRequiredCauses
	   Number of minimum required causes to complete this defect, it will be evaluated only when isCompleted attribute is "true".
    QNCode
        Code with domain "defect".
    OwnerInfo
        Contains information about the owner of this defect.
    Description
        Explanatory text describing this defect.
    Period
        Start and end time period during which the processing of this defect is required.
    AdditionalQNInfo
        Structure to add additional batch and part numbers to this defect.
    QualityNotificationTask
        Tasks required to process this item.
    QualityNotificationActivity
        Activities required to process this item.
    QualityNotificationCause
        Causes of defects in this item.
    Extrinsic
        Additional information related to this defect.
-->
<!ELEMENT QualityNotificationRequestItem (
    QNCode?,
    OwnerInfo?,
    Description?, 
    Period?,
    AdditionalQNInfo*,
    QualityNotificationTask*, 
    QualityNotificationActivity*, 
    QualityNotificationCause*,
    Extrinsic*)>
<!ATTLIST QualityNotificationRequestItem
    defectId                     %string;         #REQUIRED
    defectCount                  %uint;           #IMPLIED
    isCompleted                  (yes)            #IMPLIED
    completedDate                %datetime.tz;    #IMPLIED
    minimumRequiredTasks	     %uint;           #IMPLIED
    minimumRequiredActivities    %uint;           #IMPLIED
    minimumRequiredCauses        %uint;           #IMPLIED
>

<!--
    AdditionalQNInfo provides additional information about a quality notification, such as part numbers (customer or supplier), batch information, or other information.

    lineNumber
        Additional QN Info line number, this attribute is required.
    ItemID
        Represents the supplier part number and customer part number.
        To provide a plant location description, the domain attribute of the element IdReference should be set to "buyerLocationID", "supplierLocationID" or "storageLocation" and the identifier to the plantID.
    Batch
        Standard element to capture batch information of Customer and Supplier.
    Extrinsic
        Additional information related to this element.
-->
<!ELEMENT AdditionalQNInfo (
    ItemID?,
    Batch?,
    Extrinsic*)>
<!ATTLIST AdditionalQNInfo
    lineNumber              %string;         #REQUIRED
>

<!--
    Quality Notification Task

    taskId
        Ordinal of task.
    status
        Current state of execution of this task. Its values are: new, in-process and complete. 
    completedDate
        Date time when task was completed.
    completedBy
        User Id of who completed this task.
    processorId, processorName
        Who is responsible of this task. In case of supplier can be User ID or Supplier ANId.
    processorType
        Type of processor. Its value can be: “customer”, “supplier” or “customerUser”.
    QNCode
        Codes for task with domain "task".
    OwnerInfo
        Contains information about the owner of this task.
    Description
        Explanatory text describing this task.
    Period
        Planned start and end time period during which the processing of this task is required.
    Extrinsic
        Additional information related to this task.
-->
<!ELEMENT QualityNotificationTask (
    QNCode?,
    OwnerInfo?,
    Description?, 
    Period?,
    Extrinsic*)>
<!ATTLIST QualityNotificationTask
    taskId               %string;         #REQUIRED
    status               (new | in-process | complete)         "new"
    completedDate        %datetime.tz;    #IMPLIED
    completedBy          %string;         #IMPLIED
    processorId          %string;         #IMPLIED
    processorName        %string;         #IMPLIED
    processorType        (customer | supplier | customerUser)  #IMPLIED
>
 
<!--
    Quality Notification Activity

    activityId
        Ordinal of activity.
    isCompleted
        "yes" if activity was completed.
    QNCode
        Codes for activities with domain "activity".
    OwnerInfo
        Contains information about the owner of this activity.
    Description
        Explanatory text describing this activity.
    Period
        Start and end time period during which the processing of this activity is required.
    Extrinsic
        Additional information related to this activity.
-->
<!ELEMENT QualityNotificationActivity (
    QNCode?,
    OwnerInfo?,
    Description?,
    Period?,
    Extrinsic*)>
<!ATTLIST QualityNotificationActivity
    activityId         %string;        #REQUIRED
    isCompleted        (yes)           #IMPLIED
>


<!--
    QualityNotificationCause: Structure to capture cause detail: Cause Number , Code Group (Cause type)
    Code Group description, Cause Code, Cause Code Description, Description.

    causeId
        Ordinal of cause.
    QNCode
        Group and codes defining the type of cause.
    OwnerInfo
        Contains information about the owner of this cause.
    Description
        Explanatory text describing this cause.
    Extrinsic
        Additional information related to this cause.
-->
<!ELEMENT QualityNotificationCause (
    QNCode?,
    OwnerInfo?,
    Description?,
    Extrinsic*)>
<!ATTLIST QualityNotificationCause
    causeId          %string;         #REQUIRED
>

<!--
    Support for codes and their descriptions in different domains.

    domain
        Domain in which this value has meaning. Recognized domains includes:
            type - Quality Notification type, does not have code group.
            subject - Quality Notification subject (category).
            reason - Reason of defect.
            task - Quality Notification task.
            activity - Quality Notification activity.
            defect - Quality Notification defect.
            cause - Quality Notification cause.
            revision - Quality Notification revision.
    codeGroup
        Code of group.
    codeGroupDescription
        Description of group.
    code
        Code of type.
    codeDescription
        Description of type.
-->
<!ELEMENT QNCode EMPTY>
<!ATTLIST QNCode
    domain               %string;       #REQUIRED
    codeGroup            %string;       #IMPLIED
    codeGroupDescription %string;       #IMPLIED
    code                 %string;       #REQUIRED
    codeDescription      %string;       #REQUIRED
>

<!--
    Structure to define subject code, description and attachments of QN.

    user
        User name or user id of who created message.
    createDate
        Timestamp of message.
    QNCode
        Code identifying the type message. Its domain is “subject”.
    Description
        Detail of the subject.
    Attachment
        Attached files to this message.
-->
<!ELEMENT QNNotes (QNCode?, Description, Attachment*)>
<!ATTLIST QNNotes
    user        %string;        #REQUIRED
    createDate  %datetime.tz;   #REQUIRED
>

<!--
    Quantity that was compained.

    quantity
        Real value.
    UnitOfMeasure
        Unit of measure defined in cXML.dtd.
-->
<!ELEMENT ComplainQuantity (UnitOfMeasure)>
<!ATTLIST ComplainQuantity
    quantity    %r8;        #REQUIRED
>

<!--  
    The time period during which the processing of this defect was required.

    Period
        Start and end date time
-->
<!ELEMENT RequestedProcessingPeriod (Period)>

<!--  
    The time period during which item presented this defect.

    Period
        Start and end date time
-->
<!ELEMENT MalfunctionPeriod (Period)>

<!--  
    Describes the owner information of a defect, task, cause or activity.

    owner
        Owner of the element, this attribute should contain the userId.
    role
        Role of the owner, could be customer or supplier.
-->
<!ELEMENT OwnerInfo EMPTY>
<!ATTLIST OwnerInfo
    owner   %string;                #REQUIRED
    role    (customer | supplier)   #REQUIRED 
>

<!--
    Request to examine a specific quantity of materials at a plant.

    QualityInspectionRequestHeader
        Contains data that is relevant for the entire quality inspection. This includes data about the partners, locations, reference documents, and item information.
    QualityInspectionRequestDetail
        Detail about quality inspection request.
-->
<!ELEMENT QualityInspectionRequest (QualityInspectionRequestHeader, QualityInspectionRequestDetail)>

<!--
    Contains common information about the quality inspection request.
    
    requestID
        AN document number for Quality Inspection Request.
    requestDate
        Quality Inspection Request date time.
    operation 
        "new" operation identifies a new Quality Inspection Request.
        "update" operation identified an update to an existing Quality Inspection Request. 
        "delete" operation identified a cancellation of the Quality Inspection Request.
        DocumentReference attribute should be used to indicate the original Quality Inspection Request for "update" and "delete" operations.
    version 
        Number of version of this document if the current operation is "update".
    createdBy
        The user which creates the Quality Inspection Request.
    DocumentReference
        Reference to an earlier QualityInspectionRequest. If the attribute QualityInspectionRequestHeader@operation is "update", the DocumentReference is required and it must reference the original QualityInspectionRequest document (with value "new" for its attribute QualityInspectionRequest@operation) during the same quality inspection process.
        If the attribute QualityInspectionRequestHeader@operation is "delete", the DocumentReference is required and it must reference the original QualityInspectionRequest document (with value "new" or "update" for its attribute QualityInspectionRequest@operation) during the same quality inspection process.
    IdReference
        This is the inspection type, composed by code and description.
        Use IdReference element with domain "inspectionType".   
    ShipTo, BillTo
        Optional addresses related to item if it is not related to referenced PO or GRN.
    Contact
        Related contacts like buyerParty, sellerParty, senderBusinessSystemID, senderParty, receipientParty or componentSupplier.
    Period
        Start and end date of the quality inspection request.
    Priority
        Priority for Quality Inspection.
    ReferenceDocumentInfo
        Reference to Purchase Order or Good Receipt on which the quality inspection request is reported. Quality Inspection request is only addressed to a single item. 
    ItemInfo
        To get the good information.
        Lot quantity for inspection is handled in quantity attribute.
        Use UnitOfMeasure element for the UOM of lot quantity, samples.
    SampleDefinition
        This element contains the sample size, only use sampleSize at header level.
    Batch
        Standard element to capture batch information of Customer and Supplier.
    QualityInfo
        The representation of the quality information of a line item.
    Comments
        Comments associated with Quality Inspection Request.   
    Extrinsic
        Optional additional information related to Quality Inspection Request.
-->
<!ELEMENT QualityInspectionRequestHeader (
    DocumentReference?,
    IdReference,
    ShipTo?,
    BillTo?,
    Contact*,
    Period?,
    Priority?,
    ReferenceDocumentInfo?,
    ItemInfo,
    SampleDefinition?,
    Batch?,
    QualityInfo?,
    Comments?,
    Extrinsic*)>
<!ATTLIST QualityInspectionRequestHeader
    requestID               %string;            #REQUIRED
    requestDate             %datetime.tz;       #REQUIRED
    operation               (new | update | delete)      "new"
    version                 %uint;              #IMPLIED
    createdBy               %string;            #IMPLIED
>

<!--
    Details about quality inspection request.

    QualityInspectionCharacteristic
        Represents an inspection characteristic that describes what should be inspected.
        A quality inspection request can contain one or more characteristics.
-->
<!ELEMENT QualityInspectionRequestDetail (QualityInspectionCharacteristic+)>

<!--  
    Represents an inspection characteristic that describes what should be inspected.

    characteristicID
        Number of the characteristic, the combination of this attribute with operationNumber should be unique.
    operationNumber
        Inspection operation, the combination of this attribute with characteristicID should be unique.
    workCenter
        Work center number.
    procedure
        Specifies how the sample size is calculated and how the inspection characteristic is valuated, is a text value.   
    isLocked
        If a characteristic is locked not more valuations are allowed for this characteristic.
    allowDefectRecording
        If you set this indicator and an inspection characteristic is rejected during results recording, the function for recording defects for a characteristic is automatically called up.
    characteristicType
        You use inspection characteristics to describe the inspection criteria for materials, parts, and products. This allows you to plan inspections systematically, uniformly, and economically. An inspection request can contain different type of characteristics some required, optional or conditional.
            required, the inspection of this characteristic is required to create an Inspection Decision.
            optional, the inspection of this characteristic is not required to create an Inspection Decision.
            afterAccept, if this type is selected, this conditional inspection characteristic must be inspected if the previous
                required characteristic was valuated as accepted. 
                i.e. QualityInspectionRequest with 3 characteristics, second one is "required", third one is "afterAccept". 
                If the valuation of second characteristic is accepted, the third characteristic should be inspected.
            afterRejection, if this type is selected, this conditional inspection characteristic must be inspected if the previous 
                required characteristic in the operation was valuated as rejected.
                i.e. QualityInspectionRequest with 3 characteristics, second one is "required", third one is "afterRejection". 
                If the valuation of second characteristic is rejected, the third characteristic should be inspected.
    isQuantitative
            If send (Quantitative), it means numerical measurement for this characteristic.
            If not send (Qualitative), it means non-numerical measurement for this characteristic. 
    recordingType  
        It indicates how the valuation will be sent: 
        single value, summarized value, no characteristic record, classed recording.   
    expirationDate
        Expiration date of the characteristic.
    inspectionPoint
        There are inspection point types for equipment, functional locations, physical samples, and production. These inspection point types can be assigned individually in the user specifications if required.
    version
         It defines the version of Characteristic. If any of the attribute change for the characteristics, ERP would generate another version of it.  
    Description
        Quality Inspection Request description.
    IdReference
        Describes the code and description of the buyer characteristic, supplier characteristic, inspection method and additional information.
            For customer characteristic, the domain is "buyerInspectionCode".
            For supplier characteristic, the domain is "supplierInspectionCode".
            For inspection method, the domain is "inspectionMethod". 
            For additional information, the domain is "additionalInfo".
    AllowedValues  
        Allowed values during the valuation.
    ExpectedResult
        Expected result for this characteristic.             
        This element is necessary because is used in UI to calculate the conformance and non-conformance samples by characteristic.
    SampleDefinition
        This element contains the sample size and sample type.
    Comments
        Additional text.
    Extrinsic   
        Optional additional information related to this document.          
-->
<!ELEMENT QualityInspectionCharacteristic (
    Description?,
    IdReference*,
    AllowedValues,
    ExpectedResult?,
    SampleDefinition?,
    Comments?,
    Extrinsic*
    )>
<!ATTLIST QualityInspectionCharacteristic
    characteristicID         %string;          #REQUIRED
    operationNumber          %uint;            #REQUIRED   
    workCenter               %string;          #IMPLIED   
    procedure                %string;          #IMPLIED   
    isLocked                 (yes)             #IMPLIED
    allowDefectRecording     (yes)             #IMPLIED
    characteristicType       (required | optional | afterAccept | afterRejection)      #IMPLIED  
    isQuantitative           (yes)             #IMPLIED
    recordingType            (summarizedRecording | singleResult | noCharacteristicRecording | classedRecording)  #IMPLIED    
    expirationDate           %datetime.tz;     #IMPLIED 
    inspectionPoint          %string;          #IMPLIED
    version                  %number;          #IMPLIED
>

<!--
    Sample definition.

    sampleSize
        Number of the samples required.
    sampleType
        Sample type. Possible values are:
            - samplingProcedure: You define whether a sampling procedure must be assigned when the master inspection characteristic is used in the task list or in the material specification (optional for an inspection with a material specification).
            - additiveSample: When samples are calculated, you define whether the size of the partial sample is increased by the quantity that is required for the inspection of this characteristic.
            - destructiveSample: You specify whether the sample is to be destroyed after inspection. This means that is no longer available. This quantity is used in the usage decision as the proposed quantity for the posting to sample.
            - spcCharacteristic: You define whether a [statistical process] control chart is to be run.   
-->
<!ELEMENT SampleDefinition EMPTY>
<!ATTLIST SampleDefinition 
    sampleSize               %uint;            #IMPLIED
    sampleType               (samplingProcedure | additiveSample | destructiveSample | spcCharacteristic) #IMPLIED
>

<!--
    Allowed values during the valuation.

    type
        Type of allowed values.
            If type is numeric, only numeric values are allowed during the valuation.
            If type is decision, only "Accept" and "Reject" values are allowed during the valuation.
            If type is choice, the provided values in "PropertyValue" element are allowed during the valuation.
    PropertyValue
        List of available values. This is mandatory when "choice" is selected for type attribute.
-->
<!ELEMENT AllowedValues (PropertyValue?)>
<!ATTLIST AllowedValues     
    type         (numeric | decision | choice)      #IMPLIED
>

<!--
    Expected result for a measurement.

    targetValue
        Target value for the measurement.
    valuePrecision
        To indicate how many place result need to captured after decimal, i.e. for some characteristics it may be a requirement to capture results up to 4 places for some just 2 only for example.
    qualitativeValue
        This is used to send the expected result for qualitative valuation.
    MinimumLimit
        Minimum acceptable value.
    MaximumLimit
        Maximum acceptable value.
    PropertyValue
        This is used to send the expected result for qualitative valuation.
-->
<!ELEMENT ExpectedResult (
    MinimumLimit?,
    MaximumLimit?,
    PropertyValue?)>
<!ATTLIST ExpectedResult 
    targetValue        %r8;              #IMPLIED
    valuePrecision     %uint;            #IMPLIED
    qualitativeValue   %string;          #IMPLIED
>

<!--
    Minimum acceptable value.
-->
<!ELEMENT MinimumLimit (ComparatorInfo)>

<!--
    Maximum acceptable value.
-->
<!ELEMENT MaximumLimit (ComparatorInfo)>

<!--
    Structure to support comparison regarding a value.

    comparatorType
        Could be greater | less | greaterOrEqual | lessOrEqual
    comparatorValue
        Reference value to make the comparison.
-->
<!ELEMENT ComparatorInfo EMPTY>
<!ATTLIST ComparatorInfo 
    comparatorType     (greater | less | greaterOrEqual | lessOrEqual)  #REQUIRED
    comparatorValue    %r8;              #REQUIRED
>

<!--
    This is the supplier result for quality inspection request, it contains all the valuation according characteristic specification in request.

    QualityInspectionResultRequestHeader
        Contains common information about this Quality Inspection Result.
    QualityInspectionValuation
        To confirm the characteristic inspection results recorded in different inspection operations.          
-->
<!ELEMENT QualityInspectionResultRequest (QualityInspectionResultRequestHeader, QualityInspectionResultRequestDetail)>

<!--  
    Contains common information about this Quality Inspection Result.

    resultID  
        AN document number for Quality Inspection Result.  
    resultDate      
        Quality Inspection Result date time.   
    version     
        Version of the document.
    createdBy
        The user which creates the Quality Inspection Result. 
    QualityInspectionRequestReference,
        Reference to the Quality Inspection Request.
        The reference can contain the payloadId or DocumentNumber and DocumentDate of the Quality Inspection Request.
    Batch
        Standard element to capture batch information of Customer and Supplier.
    Comments
        Comments associated with Quality Inspection Result.
        One Comment by attachment, in Comments@type only "CertificateOfAnalysis" and "CertificateOfConformance" 
        are supported, if it's another document not send the type.
    Extrinsic
        Optional additional information related to Quality Inspection Result.    
-->

<!ELEMENT QualityInspectionResultRequestHeader (
    QualityInspectionRequestReference,
    Batch*,
    Comments*,
    Extrinsic*)>
<!ATTLIST QualityInspectionResultRequestHeader
    resultID              %string;            #REQUIRED
    resultDate            %datetime.tz;       #REQUIRED
    version               %number;            #IMPLIED
    createdBy             %string;            #IMPLIED
>

<!--
    Details about quality inspection result.

    QualityInspectionValuation
        Contains the valuation of a characteristic of an inspection request.
-->
<!ELEMENT QualityInspectionResultRequestDetail (QualityInspectionValuation+)>

<!--
    Contains the valuation of a characteristic specified in an inspection request.

    valuationID
        Number of the valuation.
    characteristicID
        References to the characteristic, the combination of this attribute with operationNumber should be unique.
    operationNumber
        Inspection operation, the combination of this attribute with characteristicID should be unique.
    workCenter
        Work center number.
    meanValue
        Mean value in the valuation.
    aboveTolerance
        Number of samples above tolerance limit.
    belowTolerance
        Number of samples below tolerance limit.  
    inspectedQuantity    
        Number of samples inspected.
    nonConformance
        This value is auto calculated when aboveTolerance or belowTolerance are send.
        If the supplier does not enter those attributes, "nonconformance" attribute could be send.
    deviation
        The deviation value.
    variance
        This will be used when we have valuation based on formula.
    numberOfDefects
        Number of the defects in this valuation.
    serialNumber
        Single unit number for the Unit to Be Inspected.
    inspectionDate
        Date of the characteristic inspection. 
    QualitySampleResult
        Valuation for each sample inspected.
        When QualityInspectionCharacteristic@recordingType is "summarizedRecording" and AllowedValues@type 
        is "decision" or "choice" the summarized valuation is sent in this element.
        When QualityInspectionCharacteristic@recordingType is "summarizedRecording" and AllowedValues@type is "numeric" this element is not required.
    ValueGroup
        Structure to support codes and code groups for this valuation.
    Description
        Valuation description. 
    Extrinsic
        Optional additional information related to this valuation.    
-->
<!ELEMENT QualityInspectionValuation (
    QualitySampleResult*,
    ValueGroup*,                  
    Description?,  
    Extrinsic*
    )>

<!ATTLIST QualityInspectionValuation
    valuationID                 %uint;            #REQUIRED
    characteristicID            %uint;            #REQUIRED
    operationNumber             %uint;            #REQUIRED
    workCenter                  %string;          #IMPLIED
    meanValue                   %r8;              #IMPLIED   
    aboveTolerance              %r8;              #IMPLIED 
    belowTolerance              %r8;              #IMPLIED   
    inspectedQuantity           %uint;            #IMPLIED
    nonConformance              %r8;              #IMPLIED     
    deviation                   %string;          #IMPLIED
    variance                    %string;          #IMPLIED     
    numberOfDefects             %r8;              #IMPLIED
    serialNumber                %string;          #IMPLIED     
    inspectionDate              %datetime.tz;     #IMPLIED
>

<!--  
    Contains the sample result after valuation. 
    
    PropertyValue
        Result of the valuation when AllowedValues@type is "choice" in QualityInspectionCharacteristic.
    sampleID
        Sample Number in valuation.
    unitValue
        Value of the sample.
    physicalSampleNumber
         Is the unique number for the sample when the sample was taken.
-->
<!ELEMENT QualitySampleResult (PropertyValue?)>

<!ATTLIST QualitySampleResult
    sampleID                    %uint;              #IMPLIED
    unitValue                   %string;            #IMPLIED
    physicalSampleNumber        %uint;              #IMPLIED
>


<!--  
    Represents the posting of stock quantities from an inspection lot within the Quality Management module. An inspection lot is a formal request to examine a specific quantity of materials at a plant.
    
    UnrestrictedUseQuantity 
        Unrestricted Stock is the physical stock that is always available at a plant/storage location that can be consumed for stock movements and available for Material requirements planning.
    ScrapQuantity
        The quantity represents the Scrap of a material that is expected to occur during production if the material is a component.
    SampleUsageQuantity
        quantity for sampleUsageQuantity
    BlockedQuantity
        Blocked stock is not counted as unrestricted stock. You can have Plant level configuration to consider the stock for MRP.
    NewMaterialQuantity
        for new material quantity
    ReserveQuantity
        for reserve quantity
    ReturnQuantity
        Quantity that was returned.
-->
<!ELEMENT QualityInspectionLotStock (
    UnrestrictedUseQuantity?, 
    ScrapQuantity?,
    SampleUsageQuantity?,
    BlockedQuantity?,
    NewMaterialQuantity?,
    ReserveQuantity?,
    ReturnQuantity?
    )>

<!--quantity for sampleUsageQuantity . -->
<!ELEMENT SampleUsageQuantity (UnitOfMeasure?)>
<!ATTLIST SampleUsageQuantity
    quantity        %r8;       #IMPLIED>

<!--quanity for NewMaterialQuantity . -->
<!ELEMENT NewMaterialQuantity (UnitOfMeasure?)>
<!ATTLIST NewMaterialQuantity
    quantity        %r8;       #IMPLIED>

<!--quantity for ReserveQuantity. -->
<!ELEMENT ReserveQuantity (UnitOfMeasure?)>
<!ATTLIST ReserveQuantity
    quantity        %r8;       #IMPLIED>


<!--
    Request to confirm that all physical samples have been valuated and the inspection has been completed.
-->
<!ELEMENT QualityInspectionDecisionRequest (QualityInspectionDecisionDetail)>

<!--  
    Contains the information of the quality inspection decision, like inspection result reference, quality quantity details and the decision of the inspection.
    
    decisionID
        AN document number for Quality Inspection Decision Request.
    decisionDate
        Quality Inspection Decision Request date time.
    status
        Usage decision status. Possible values are "accepted" and "rejected".
    qualityScore     
        Quality score.
    createdBy
        The user which creates the Quality Inspection Decision Request.
    QualityInspectionResultReference 
        Reference to the inspection result to confirm that all physical samples have been valuated and the inspection has been completed.
        The reference can contain the payloadId or DocumentNumber and DocumentDate of the Inspection Result.
    QualityInspectionRequestReference,
        Reference to the Quality Inspection Request.
        The reference can contain the payloadId or DocumentNumber and DocumentDate of the Quality Inspection Request.
    ShipNoticeReference
        Reference to the Ship Notice Request.
        The reference can contain the payloadId or DocumentNumber and DocumentDate of the Ship Notice Request.
    ReceiptReference
        Reference to the Receipt Request.
        The reference can contain the payloadId or DocumentNumber and DocumentDate of the Receipt Request.
    QualityInspectionLotStock
        Contains information about what happened to the stock posting. For example, it could include the scrap quantity or the unrestricted use quantity from the ERP.
    ValueGroup
        Structure to support codes and code groups for this Inspection Decision.
    Description
        Description for the Usage Decision.
    Extrinsic 
        Optional additional information.
-->
<!ELEMENT QualityInspectionDecisionDetail (
    (QualityInspectionResultReference | QualityInspectionRequestReference | ShipNoticeReference | ReceiptReference),  
    QualityInspectionLotStock, 
    ValueGroup*, 
    Description?,
    Extrinsic*)>
<!ATTLIST QualityInspectionDecisionDetail
    decisionID               %string;            #REQUIRED
    decisionDate             %datetime.tz;       #REQUIRED
    status                   (accepted | rejected)   #IMPLIED
    qualityScore             %uint;                  #IMPLIED        
    createdBy                %string;                #IMPLIED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp
    
    $Id: //ariba/cxml/schema/Modules/Approval.mod#0 $
-->

<!-- ====
    This module is built as part of cXML DTD file.
==== -->


<!--
    ApprovalRequestHeader
        The approval request header contains data that is relevant for the entire approval request. This includes data about type of approval, date, reference documents.
    ApprovalItem
        A approval request can contain one or more approval items. A approval item provides details about a specific approval of a line item.
-->
<!ELEMENT ApprovalRequest (ApprovalRequestHeader, ApprovalItem*)>

<!--
    DocumentReference
		Contains the payloadId of the underlaying document which is to approved. E.g.: OrderConfirmation.payloadId 
	cXMLAttachment
		Contains the original (cXML) document which is to approved e.g. Original OC confirmation cXML
	Contact
		Contact information for the document partners.
	Comments
		Top level comments
	approvalStatus
		TODO: decide if it's really required .. and ... 
		What should be the value in case some items are “rejected”,  some are “approved” and some are “waiting approval”. 
	type
		in the moment just and only OrderConfirmation. Maybe in future some other document types needs an approval too. 
		In this case ad these types here.
	creationDate
		DateTime when the document was created
	approvalStartDate, approvalEndDate
		DateTime in which the approval is allowed to start/end. 
		For OrderConfirmationApproval not used so far.
-->
<!ELEMENT ApprovalRequestHeader (DocumentReference, cXMLAttachment , Contact?, Comments?)>
<!ATTLIST ApprovalRequestHeader
    approvalStatus           (approved | awaitingApproval | reject | approvedAndUpdatePO)         #IMPLIED
	type                   	 (orderConfirmation)  #REQUIRED
    creationDate              %datetime.tz;         #REQUIRED
    approvalStartDate         %datetime.tz;         #IMPLIED
	approvalEndDate           %datetime.tz;         #IMPLIED
>

<!--
		lineItem which has to approved
	UnitOfMeasure
		Unit of measure to specify the quantity
	Comments
	
	lineNumber
		number of the line item
	quantity
		cumulated quantity of all confirmation status of the same line item in the corresponding order confirmation
	approvalStatus
		approvalStatus of the line item (enumeration)
	reason
		reason why it is not approved / why it's out of tolerance (enumeration)
	startDate/endDate
		placeholder. What shall be the content in case of let's say 100 scheduleLines with different delivery dates? 
		In such a case it's not common to have just and only ONE time period but up to the number of scheduleLines.
		Which should be shown/given? Which "startDate" and which "endDate"? Does it make sense in case there are more
		than one stratDate/endDate?
	deviatedDate
		first deliveryDate of all confirmation status elements of the same line item which is out of tolerance
-->
<!ELEMENT ApprovalItem (UnitOfMeasure, Comments?)>
<!ATTLIST ApprovalItem
    lineNumber                %uint;    			#REQUIRED
	quantity        		  %r8;      			#REQUIRED 
	approvalStatus           (approved | awaitingApproval | reject | approvedAndUpdatePO) 	#REQUIRED
	reason					 (quantityDeviation | dateDeviation | quantityAndDateDeviation)    #IMPLIED
	startDate				  %datetime.tz;         #IMPLIED
	endDate					  %datetime.tz;         #IMPLIED
	deviatedDate			  %datetime.tz;         #IMPLIED
><!--
    Definition of a ProductActivityMessage.  Transmits inventory, consignment movement and forecast information from the buyer’s erp system. The buyer provided inventory summary view includes the issued components to the supplier. The provided information represents a snapshot of the component inventory and forecast situation at a certain point in time.
The consignment movement information represents the movement of material from the consignment inventory to the customer inventory. 
subcontractingIndicator  
    Indicates the data is related to subcontracting. 
-->
<!ELEMENT ProductActivityMessage (ProductActivityHeader, ProductActivityDetails+, Extrinsic*)>
<!ATTLIST ProductActivityMessage
    subcontractingIndicator  (yes)          #IMPLIED
>

<!--
ProductActivityHeader.

messageID
An identifier for this particular product activity message

creationDate
        The date and time this component consumption document was created.
        
processType 
        is used to identify the Business process supported by the message
        processTypes supported include the following
        -SMI for Supplier Managed Inventory 
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries)
        -OEM for Original Equipment Manufacturer owned Inventory scenarios
         (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries, InventoryTimeSeries)
        -VMI for Vendor Managed Inventory
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries)
        -3PL for third party Logistics Inventory Scenarios
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries)
        -ManufacturingVisibility allow ContractManufacturers to share Inventory Visibility
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries)
        -Forecast for Forecast Collaboration
         (TimeSeries, PlanningTimeSeries)
        -Consignment for Consignment Material Movements 
         (ConsignmentInventory, ConsagnmentMovement)
        -Sales for Sales report Visibility
         (SalesReport)
        -POC for PO Collaboration Scenarios
         (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries)
-->

<!ELEMENT ProductActivityHeader EMPTY>

<!ATTLIST ProductActivityHeader
     messageID           %string;              #REQUIRED
     creationDate           %datetime.tz;         #IMPLIED
     processType (SMI|OEM|VMI|3PL|ManufacturingVisibility|Forecast|Consignment|Sales|POC|Other )  #IMPLIED
>


<!--
    The representation of a single component inventory, the product forecast details or a consignment movement for that product. 
    ItemID
        A unique identification of a component item in supplier backend system or buyer backend system.
    Description
        Textual description of the component
    Classification
        Classification is used to group items into similar categories. This also includes product hierarchy and commodity information.
    ForecastDetails
        Contains the cumulative start and end date of the forecast item
    LeadTime
        Lead time in days
    PlannedAcceptanceDays
        Number of days the buyer schedules for the inspection of goods after receiving them.
    ManufacturerPartID
        ID with which the item's manufacturer identifies the item.
    ReferenceDocumentInfo
        contains details of referenced document
    Characteristic    
        Characteristic contains detailed information about an item that can be used across different industries.
        Can also be used to send material characteristics to support configurable material process.
    Batch 
        Batch information of goods or material. The information includes id and characteristics.
    Contact
        The location from and to the product activity is taking place.
        The only Contact roles (Contact@role attribute value) likely to be sensible in this element are
        "locationFrom" and "locationTo". locationFrom can be used by the supplier system to the determine 
        the buyer notified ERP vendor ID or vendor location. locationTo can be used by the supplier system to 
        determine the location of the buyer where the product demand originates.  
        To provide a plant location description, the domain attribute of the element IdReference should be set to "buyerLocationID", "supplierLocationID" or "storageLocation" and the identifier to the plantID.
    Inventory
        Inventory that is in the possession of the buyer, and is owned and managed by the buyer.
    ConsignmentInventory
        Inventory that is in the possession of the buyer, but is owned by the supplier.
    TimeSeries
        Forecast data, can be of type "demand" or "orderForecast"
    InventoryTimeSeries    
		Support the transfer of projected stock, safety stock and target stock levels generated by the buyer's planning system to facilitate supply or demand balance.
    ConsignmentMovement
        The consignment movement information for this product
    SalesReport
        It contains all the information about the sales report at item level.
    status
		Indicate to the supplier whether the material used in the planning process is inactive or whether the value for the material has been deleted.
		By default material status is considered Active.
    PlanningTimeSeries
        Planning information from buyers ERP system represented as keyfigures to provide visibility of critical business information to suppliers and other partners.
-->
<!ELEMENT ProductActivityDetails ( ItemID,  Description?, Classification*, ForecastDetails?, LeadTime?, PlannedAcceptanceDays?, 
    ManufacturerPartID?, ReferenceDocumentInfo*, Characteristic*, Batch?, Contact*, Inventory?, 
    ConsignmentInventory?, TimeSeries*, PlanningTimeSeries*, InventoryTimeSeries*, ConsignmentMovement*, 
    SalesReport?, Extrinsic*)>
<!ATTLIST ProductActivityDetails
	status (active|inactive|deleted)		#IMPLIED
>

<!--
ForecastDetails

cumulativeStartDate
    The start date at which the cumulative values for forecast and commit will be calculated. 
    If not provided the accumulation of the forecast for a part will start on the earliest date for which there is forecast data.
cumulativeEndDate
    The end date till which the cumulative values for forecast and commit will be calculated. 

-->
<!ELEMENT ForecastDetails EMPTY>
<!ATTLIST ForecastDetails
	cumulativeStartDate %date;       #IMPLIED
	cumulativeEndDate %date;       #IMPLIED
>

<!--
	Provides inventory data in time intervals.
	targetStock
		Quantity required to meet the demand, based on customer service levels.
	projectedStock
		Calculated stock quantity that reflects the demand and supply stock balance.
	safetyStock
		Quantity of stock required to mitigate risk of stockouts.
-->
<!ELEMENT InventoryTimeSeries (TimeSeriesDetails+)>
<!ATTLIST InventoryTimeSeries
type                 (targetStock | projectedStock | safetyStock)  #REQUIRED >

<!--
  Period
      	Item Sales start and end date

  Comments
	It allows to enter multiple comments

  SalesQuantity
	Quantity that was sold

  ReturnQuantity
	Quantity that was returned

  Total
	Line Item Amount

  PromotionVariantID
	Promotional Variant Number

-->
<!ELEMENT
  SalesReport (
        Period,        
        SalesQuantity,
        ReturnQuantity?,
        Total?,
        PromotionVariantID?,
	Comments*
)>

<!--
  salesDate
      It contains the sales date.
  linenumber
      Report Line Item Number
-->
<!ATTLIST SalesReport
    salesDate      	       %datetime.tz; #IMPLIED
    lineNumber    		%uint; #REQUIRED
>

<!--
  SalesQuantity
    Quantity that was sold.
-->
<!ELEMENT SalesQuantity (UnitOfMeasure)>

<!ATTLIST SalesQuantity
    quantity        %r8; #REQUIRED
>

<!-- TimeSeries is the Forecast information.
type
        A string value to identify the type of a forecast.  The value can be "orderForecast" or "demand".-->
<!ELEMENT TimeSeries (Forecast+)>
<!ATTLIST TimeSeries
    type                 (orderForecast | demand)  #REQUIRED >

<!-- 
    PlanningTimeSeries is planning information from buyers ERP system represented as keyfigures 
    to provide visibility of critical business information to suppliers and other partners.

    type
        A string value to identify the type time series.  The value can be as follows:
        grossdemand - Quantity that is considered as demand without taking inventory and receipts into consideration.
        netdemand - Quantity determined based on available inventory and receipts derived based on planning output. 
        supplyPlan - Quantity derived to meet the demand based on supply Planning.
        longtermforecast - Forecast quantity derived based on historical trends.
    constrainedforecast - Unconstrained forecast when limited by supply constraints results in constrained forecast.
        custom - Buyer specific business values could be represented by the custom keyfigure.
        Example :custom could be “NARegionalForecast”, when using custom, the buyer defined value will be provided in customType.
    customType : string to include buyer defined custom types	
-->
<!ELEMENT PlanningTimeSeries (TimeSeriesDetails+)>
<!ATTLIST PlanningTimeSeries
    type (supplyPlan | longtermforecast | constrainedforecast | grossdemand| netdemand | custom)  #REQUIRED 
    customType %string;   #IMPLIED >

<!-- ConsignmentMovement is the product movement information from the consignment inventory to the customer inventory 

    ProductMovementItemIDInfo
        provides a reference to the line item in a movement document
    InvoiceItemIDInfo
        line item of a CC Invoice created by the buyer against the movement item
    MovementQuantity
        the quantity moved in a consignment movement
    SubtotalAmount
        The invoice subtotal of the current item
    UnitPrice
        Represents the price on which the charges are applied
        e.g. standard price for item is 10, but after being for 30 days in the consignment inventory the price will increase to 12
-->
<!ELEMENT ConsignmentMovement (ProductMovementItemIDInfo, InvoiceItemIDInfo?, MovementQuantity, SubtotalAmount, UnitPrice?)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/Modules/Profile.mod#6 $
-->

<!--
    For more information about W3C XML signatures, refer to the
    following URL.  Portions of this DTD are derived from information
    contained therein.
    http://www.w3.org/TR/xmldsig-core/
-->

<!-- DTD for XML Signatures
    http://www.w3.org/2000/09/xmldsig#
    Joseph Reagle $last changed 20001215$

    http://www.w3.org/2000/09/xmldsig#
    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $

    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
    of Technology, Institut National de Recherche en Informatique et en
    Automatique, Keio University). All Rights Reserved.
    http://www.w3.org/Consortium/Legal/

    This document is governed by the W3C Software License [1] as described
    in the FAQ [2].

    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->

<!--

The following entity declarations enable external/flexible content in
the Signature content model.

#PCDATA emulates schema string; when combined with element types it
emulates schema's mixed content type.

%foo.ANY permits the user to include their own element types from
other namespaces, for example:
 <!ENTITY % KeyValue.ANY '| ecds:ECDSAKeyValue'>
 ...
 <!ELEMENT ecds:ECDSAKeyValue (#PCDATA)  >

-->

<!ENTITY % Object.ANY '|xades:QualifyingProperties|cXMLSignedInfo|Extrinsic'>
<!ENTITY % Method.ANY ''>
<!ENTITY % Transform.ANY ''>
<!ENTITY % SignatureProperty.ANY ''>
<!ENTITY % KeyInfo.ANY ''>
<!ENTITY % KeyValue.ANY ''>
<!ENTITY % PGPData.ANY ''>
<!ENTITY % X509Data.ANY ''>
<!ENTITY % SPKIData.ANY ''>



<!-- Start Core Signature declarations, these should NOT be altered -->

<!ELEMENT ds:Signature (ds:SignedInfo, ds:SignatureValue, ds:KeyInfo?, ds:Object*)  >
<!ATTLIST ds:Signature  
	xmlns:ds	CDATA	#FIXED 'http://www.w3.org/2000/09/xmldsig#'
	xmlns:xades	CDATA	#FIXED 'http://uri.etsi.org/01903/v1.3.2#'
	Id  		ID	#IMPLIED >

<!ELEMENT ds:SignatureValue (#PCDATA) >
<!ATTLIST ds:SignatureValue  
         Id  ID      #IMPLIED>

<!ELEMENT ds:SignedInfo (ds:CanonicalizationMethod, 
	ds:SignatureMethod,  ds:Reference+)  >
<!ATTLIST ds:SignedInfo  
	Id	 ID 	 #IMPLIED 
>

<!ELEMENT ds:CanonicalizationMethod (#PCDATA %Method.ANY;)* > 
<!ATTLIST ds:CanonicalizationMethod 
	Algorithm CDATA #REQUIRED > 

<!ELEMENT ds:SignatureMethod (#PCDATA|ds:HMACOutputLength %Method.ANY;)* >
<!ATTLIST ds:SignatureMethod 
	Algorithm CDATA #REQUIRED > 

<!ELEMENT ds:Reference (ds:Transforms?, ds:DigestMethod, ds:DigestValue)  >
<!ATTLIST ds:Reference
	Id	ID	#IMPLIED
	URI	CDATA	#IMPLIED
	Type	CDATA	#IMPLIED>


<!ELEMENT ds:Transforms (ds:Transform+)>

<!ELEMENT ds:Transform (#PCDATA|ds:XPath %Transform.ANY;)* >
<!ATTLIST ds:Transform 
	Algorithm    CDATA    #REQUIRED >

<!ELEMENT ds:XPath (#PCDATA) >

<!ELEMENT ds:DigestMethod (#PCDATA %Method.ANY;)* >
<!ATTLIST ds:DigestMethod  
	Algorithm		CDATA	#REQUIRED >

<!ELEMENT ds:DigestValue  (#PCDATA)  >

<!ELEMENT ds:KeyInfo	(#PCDATA|ds:KeyName|ds:KeyValue|ds:RetrievalMethod|
           ds:X509Data|ds:PGPData|ds:SPKIData|ds:MgmtData %KeyInfo.ANY;)* >
<!ATTLIST ds:KeyInfo
	Id	ID	 #IMPLIED >

<!-- Key Information -->

<!ELEMENT ds:KeyName (#PCDATA) >
<!ELEMENT ds:KeyValue (#PCDATA|ds:DSAKeyValue|ds:RSAKeyValue %KeyValue.ANY;)* >
<!ELEMENT ds:MgmtData (#PCDATA) >

<!ELEMENT ds:RetrievalMethod (ds:Transforms?) >
<!ATTLIST ds:RetrievalMethod
  URI	CDATA #REQUIRED 
  Type	CDATA #IMPLIED > 

<!-- X.509 Data -->

<!ELEMENT ds:X509Data ((ds:X509IssuerSerial | ds:X509SKI | ds:X509SubjectName |
                    ds:X509Certificate | ds:X509CRL )+ %X509Data.ANY;)>
<!ELEMENT ds:X509IssuerSerial (ds:X509IssuerName, ds:X509SerialNumber) >
<!ELEMENT ds:X509IssuerName (#PCDATA) >
<!ELEMENT ds:X509SubjectName (#PCDATA) >
<!ELEMENT ds:X509SerialNumber (#PCDATA) >
<!ELEMENT ds:X509SKI (#PCDATA) >
<!ELEMENT ds:X509Certificate (#PCDATA) >
<!ELEMENT ds:X509CRL (#PCDATA) >

<!-- PGPData -->

<!ELEMENT ds:PGPData ((ds:PGPKeyID, ds:PGPKeyPacket?) | (ds:PGPKeyPacket) %PGPData.ANY;) >
<!ELEMENT ds:PGPKeyPacket  (#PCDATA)  >
<!ELEMENT ds:PGPKeyID  (#PCDATA)  >

<!-- SPKI Data -->

<!ELEMENT ds:SPKIData (ds:SPKISexp %SPKIData.ANY;)  >
<!ELEMENT ds:SPKISexp  (#PCDATA)  >

<!-- Extensible Content -->

<!ELEMENT ds:Object (#PCDATA|ds:Signature|ds:SignatureProperties|ds:Manifest %Object.ANY;)* >
<!ATTLIST ds:Object  
	Id	ID	#IMPLIED
	MimeType	CDATA	#IMPLIED
	Encoding	CDATA	#IMPLIED >

<!ELEMENT ds:Manifest (ds:Reference+)  >
<!ATTLIST ds:Manifest  
	Id	ID	#IMPLIED >

<!ELEMENT ds:SignatureProperties (ds:SignatureProperty+)  >
<!ATTLIST ds:SignatureProperties  
	Id	ID	 #IMPLIED  >

<!ELEMENT ds:SignatureProperty (#PCDATA %SignatureProperty.ANY;)* >
<!ATTLIST ds:SignatureProperty  
	Target 	CDATA	 #REQUIRED
	Id	ID	 #IMPLIED  >

<!-- Algorithm Parameters -->

<!ELEMENT ds:HMACOutputLength (#PCDATA) >

<!ELEMENT ds:DSAKeyValue ((ds:P, ds:Q)?, ds:G?, ds:Y, ds:J?, (ds:Seed, ds:PgenCounter)?) >
<!ELEMENT ds:P (#PCDATA) >
<!ELEMENT ds:Q (#PCDATA) >
<!ELEMENT ds:G (#PCDATA) >
<!ELEMENT ds:Y (#PCDATA) >
<!ELEMENT ds:J (#PCDATA) >
<!ELEMENT ds:Seed (#PCDATA) >
<!ELEMENT ds:PgenCounter (#PCDATA) >

<!ELEMENT ds:RSAKeyValue (ds:Modulus, ds:Exponent) > 
<!ELEMENT ds:Modulus (#PCDATA) >
<!ELEMENT ds:Exponent (#PCDATA) >
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/Modules/Profile.mod#6 $
-->

<!--
    For more information about XAdES, refer to the following URL.
    Portions of this DTD are derived from information contained therein.
    http://uri.etsi.org/01903/v1.3.2#
-->

<!ENTITY % Any.ANY ''>
<!ENTITY % XMLTimeStamp.ANY ''>

<!-- Start Any -->

<!ELEMENT xades:Any (#PCDATA   %Any.ANY;)*>

<!-- End Any -->

<!-- Start ObjectIdentifier -->

<!ELEMENT xades:ObjectIdentifier (xades:Identifier, xades:Description?, 
xades:DocumentationReferences?)>
<!ELEMENT xades:Identifier (#PCDATA)>
<!ATTLIST xades:Identifier
	Qualifier (OIDAsURI | OIDAsURN) #IMPLIED
>
<!ELEMENT xades:Description (#PCDATA)>
<!ELEMENT xades:DocumentationReferences (xades:DocumentationReference)+>
<!ELEMENT xades:DocumentationReference (#PCDATA)>

<!-- End ObjectIdentifier -->

<!-- Start EncapsulatedPKIData -->

<!ELEMENT xades:EncapsulatedPKIData (#PCDATA)>
<!ATTLIST xades:EncapsulatedPKIData
	Id ID #IMPLIED
	Encoding CDATA #IMPLIED
>

<!-- End EncapsulatedPKIData -->

<!-- Start time-stamp container types -->

<!ELEMENT xades:Include EMPTY>
<!ATTLIST xades:Include
	URI CDATA #REQUIRED
	referencedData CDATA #IMPLIED
>

<!ELEMENT xades:ReferenceInfo (ds:DigestMethod, ds:DigestValue)>
<!ATTLIST xades:ReferenceInfo
	Id ID #IMPLIED
	URI CDATA #IMPLIED
>
<!ELEMENT xades:XAdESTimeStamp (xades:Include*, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:XAdESTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:OtherTimeStamp (xades:ReferenceInfo+, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp))>
<!ATTLIST xades:OtherTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:EncapsulatedTimeStamp (#PCDATA)>
<!ATTLIST xades:EncapsulatedTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:XMLTimeStamp (#PCDATA  %XMLTimeStamp.ANY; )*>

<!-- End time-stamp tokens container  -->

<!-- Start container types -->

<!-- Start QualifyingProperties -->

<!ELEMENT xades:QualifyingProperties (xades:SignedProperties?, xades:UnsignedProperties?)>
<!ATTLIST xades:QualifyingProperties
	Target CDATA #REQUIRED
	Id ID #IMPLIED
	xmlns:xades	CDATA	#FIXED 'http://uri.etsi.org/01903/v1.3.2#'
>

<!ELEMENT xades:SignedProperties (xades:SignedSignatureProperties, 
xades:SignedDataObjectProperties?)>
<!ATTLIST xades:SignedProperties
	Id ID #IMPLIED
>

<!ELEMENT xades:UnsignedProperties (xades:UnsignedSignatureProperties?, 
xades:UnsignedDataObjectProperties?)>
<!ATTLIST xades:UnsignedProperties
	Id ID #IMPLIED
>

<!-- End QualifyingProperties -->

<!-- Start SignedSignatureProperties, SignedDataObjectProperties, 
UnsignedSignatureProperties, UnsignedDataObjectProperties -->

<!ELEMENT xades:SignedSignatureProperties (xades:SigningTime?, xades:SigningCertificate?, 
xades:SignaturePolicyIdentifier?, xades:SignatureProductionPlace?, xades:SignerRole?)>
<!ATTLIST xades:SignedSignatureProperties
	Id ID #IMPLIED
>

<!ELEMENT xades:SignedDataObjectProperties (xades:DataObjectFormat*, 
xades:CommitmentTypeIndication*, xades:AllDataObjectsTimeStamp*, 
xades:IndividualDataObjectsTimeStamp*)>
<!ATTLIST xades:SignedDataObjectProperties
	Id ID #IMPLIED
>

<!ELEMENT xades:UnsignedSignatureProperties (xades:CounterSignature | xades:SignatureTimeStamp 
| xades:CompleteCertificateRefs | xades:CompleteRevocationRefs | xades:AttributeCertificateRefs
 | xades:AttributeRevocationRefs | (xades:SigAndRefsTimeStamp | xades:RefsOnlyTimeStamp) | 
xades:CertificateValues | xades:RevocationValues | xades:AttrAuthoritiesCertValues 
| xades:AttributeRevocationValues | xades:ArchiveTimeStamp)+>
<!ATTLIST xades:UnsignedSignatureProperties
	Id ID #IMPLIED
>

<!ELEMENT xades:UnsignedDataObjectProperties (xades:UnsignedDataObjectProperty*)>
<!ATTLIST xades:UnsignedDataObjectProperties
	Id ID #IMPLIED
>

<!ELEMENT xades:UnsignedDataObjectProperty (#PCDATA   %Any.ANY;)*>

<!-- End SignedSignatureProperties, SignedDataObjectProperties, 
UnsignedSignatureProperties, UnsignedDataObjectProperties -->

<!-- Start QualifyingPropertiesReference -->

<!ELEMENT xades:QualifyingPropertiesReference EMPTY>
<!ATTLIST xades:QualifyingPropertiesReference
	URI CDATA #REQUIRED
	Id ID #IMPLIED
>

<!-- End QualifyingPropertiesReference -->

<!-- End container types -->

<!-- Start SigningTime -->

<!ELEMENT xades:SigningTime (#PCDATA)>

<!-- End SigningTime -->

<!-- Start SigningCertificate -->

<!ELEMENT xades:SigningCertificate (xades:Cert+)>
<!ELEMENT xades:Cert (xades:CertDigest, xades:IssuerSerial)>
<!ATTLIST xades:Cert
	URI CDATA #IMPLIED
>
<!ELEMENT xades:CertDigest (ds:DigestMethod, ds:DigestValue)>
<!ELEMENT xades:IssuerSerial (ds:X509IssuerName, ds:X509SerialNumber)>
<!ELEMENT xades:X509IssuerName (#PCDATA)>
<!ELEMENT xades:X509SerialNumber (#PCDATA)>

<!-- End SigningCertificate -->

<!-- Start SignaturePolicyIdentifier -->

<!ELEMENT xades:SignaturePolicyIdentifier (xades:SignaturePolicyId | 
xades:SignaturePolicyImplied)>
<!ELEMENT xades:SignaturePolicyImplied ANY>
<!ELEMENT xades:SignaturePolicyId (xades:SigPolicyId, ds:Transforms?, xades:SigPolicyHash, 
xades:SigPolicyQualifiers?)>
<!ELEMENT xades:SigPolicyId (xades:Identifier, xades:Description?, xades:DocumentationReferences?)>
<!ELEMENT xades:SigPolicyHash (ds:DigestMethod, ds:DigestValue)>
<!ELEMENT xades:SigPolicyQualifiers (xades:SigPolicyQualifier+)>
<!ELEMENT xades:SigPolicyQualifier (#PCDATA|xades:SPURI %Any.ANY; )*>

<!-- End SignaturePolicyIdentifier -->

<!-- Start SPURI and SPUserNotice -->

<!ELEMENT xades:SPURI (#PCDATA)>
<!ELEMENT xades:SPUserNotice (xades:NoticeRef?, xades:ExplicitText?)>
<!ELEMENT xades:NoticeRef (xades:Organization, xades:NoticeNumbers)>
<!ELEMENT xades:ExplicitText (#PCDATA)>
<!ELEMENT xades:Organization (#PCDATA)>
<!ELEMENT xades:NoticeNumbers (xades:int*)>
<!ELEMENT xades:int (#PCDATA)>

<!-- End SPURI and SPUserNotice -->

<!-- Start CounterSignature -->

<!ELEMENT xades:CounterSignature (ds:Signature)>

<!-- End CounterSignature -->

<!-- Start DataObjectFormat -->

<!ELEMENT xades:DataObjectFormat (xades:Description?, xades:ObjectIdentifier?, xades:MimeType?, 
xades:Encoding?)>
<!ATTLIST xades:DataObjectFormat
	ObjectReference CDATA #REQUIRED
>
<!ELEMENT xades:MimeType (#PCDATA)>
<!ELEMENT xades:Encoding (#PCDATA)>

<!-- End DataObjectFormat -->

<!-- Start CommitmentTypeIndication -->

<!ELEMENT xades:CommitmentTypeIndication (xades:CommitmentTypeId, (xades:ObjectReference+ | 
xades:AllSignedDataObjects), xades:CommitmentTypeQualifiers?)>
<!ELEMENT xades:CommitmentTypeId (xades:Identifier, xades:Description?, 
xades:DocumentationReferences?)>
<!ELEMENT xades:ObjectReference (#PCDATA)>
<!ELEMENT xades:AllSignedDataObjects ANY>
<!ELEMENT xades:CommitmentTypeQualifiers (xades:CommitmentTypeQualifier*)>
<!ELEMENT xades:CommitmentTypeQualifier (#PCDATA %Any.ANY; )*>

<!-- End CommitmentTypeIndication -->

<!-- Start SignatureProductionPlace -->

<!ELEMENT xades:SignatureProductionPlace (xades:City?, xades:StateOrProvince?, xades:PostalCode?, 
xades:CountryName?)>
<!ELEMENT xades:City (#PCDATA)>
<!ELEMENT xades:StateOrProvince (#PCDATA)>
<!ELEMENT xades:PostalCode (#PCDATA)>
<!ELEMENT xades:CountryName (#PCDATA)>

<!-- End SignatureProductionPlace -->

<!-- Start SignerRole -->

<!ELEMENT xades:SignerRole (xades:ClaimedRoles?, xades:CertifiedRoles?)>
<!ELEMENT xades:ClaimedRoles (xades:ClaimedRole+)>
<!ELEMENT xades:CertifiedRoles (xades:CertifiedRole+)>
<!ELEMENT xades:ClaimedRole (#PCDATA %Any.ANY; )*>
<!ELEMENT xades:CertifiedRole (#PCDATA)>
<!ATTLIST xades:CertifiedRole
	Id ID #IMPLIED
	Encoding CDATA #IMPLIED
>

<!-- End SignerRole -->

<!-- Start AllDataObjectsTimeStamp, IndividualDataObjectsTimeStamp, 
SignatureTimeStamp -->

<!ELEMENT xades:AllDataObjectsTimeStamp (ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:AllDataObjectsTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:IndividualDataObjectsTimeStamp (xades:Include+, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:IndividualDataObjectsTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:SignatureTimeStamp (ds:CanonicalizationMethod?, (xades:EncapsulatedTimeStamp 
| xades:XMLTimeStamp)+)>
<!ATTLIST xades:SignatureTimeStamp
	Id ID #IMPLIED
>

<!-- End AllDataObjectsTimeStamp, IndividualDataObjectsTimeStamp, 
SignatureTimeStamp -->

<!-- Start CompleteCertificateRefs -->

<!ELEMENT xades:CompleteCertificateRefs (xades:CertRefs)>
<!ATTLIST xades:CompleteCertificateRefs
	Id ID #IMPLIED
>
<!ELEMENT xades:CertRefs (xades:Cert+)>

<!-- End CompleteCertificateRefs -->

<!-- Start AttributeCertificateRefs -->

<!ELEMENT xades:AttributeCertificateRefs (xades:CertRefs)>
<!ATTLIST xades:AttributeCertificateRefs
	Id ID #IMPLIED
>

<!-- End AttributeCertificateRefs -->

<!-- Start CompleteRevocationRefs -->

<!ELEMENT xades:CompleteRevocationRefs (xades:CRLRefs?, xades:OCSPRefs?, xades:OtherRefs?)>
<!ATTLIST xades:CompleteRevocationRefs
	Id ID #IMPLIED
>
<!ELEMENT xades:CRLRefs (xades:CRLRef+)>
<!ELEMENT xades:OCSPRefs (xades:OCSPRef+)>
<!ELEMENT xades:OtherRefs (xades:OtherRef+)>

<!ELEMENT xades:CRLRef (xades:DigestAlgAndValue, xades:CRLIdentifier?)>
<!ELEMENT xades:OCSPRef (xades:OCSPIdentifier, xades:DigestAlgAndValue?)>
<!ELEMENT xades:OtherRef (#PCDATA %Any.ANY; )*>

<!ELEMENT xades:DigestAlgAndValue (ds:DigestMethod, ds:DigestValue)>
<!ELEMENT xades:CRLIdentifier (xades:Issuer, xades:IssueTime, xades:Number?)>
<!ATTLIST xades:CRLIdentifier
	URI CDATA #IMPLIED
>
<!ELEMENT xades:OCSPIdentifier (xades:ResponderID, xades:ProducedAt)>
<!ATTLIST xades:OCSPIdentifier
	URI CDATA #IMPLIED
>

<!ELEMENT xades:Issuer (#PCDATA)>
<!ELEMENT xades:IssueTime (#PCDATA)>
<!ELEMENT xades:Number (#PCDATA)>

<!ELEMENT xades:ResponderID (xades:ByName | xades:ByKey)>
<!ELEMENT xades:ByName  (#PCDATA)>
<!ELEMENT xades:ByKey  (#PCDATA)>
<!ELEMENT xades:ProducedAt (#PCDATA)>

<!-- End CompleteRevocationRefs -->

<!-- Start AttributeRevocationRefs -->

<!ELEMENT xades:AttributeRevocationRefs (xades:CRLRefs?, xades:OCSPRefs?, xades:OtherRefs?)>
<!ATTLIST xades:AttributeRevocationRefs
	Id ID #IMPLIED
>

<!-- End AttributeRevocationRefs -->

<!-- Start SigAndRefsTimeStamp, RefsOnlyTimeStamp  -->

<!ELEMENT xades:SigAndRefsTimeStamp (xades:Include*, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:SigAndRefsTimeStamp
	Id ID #IMPLIED
>

<!ELEMENT xades:RefsOnlyTimeStamp (xades:Include*, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:RefsOnlyTimeStamp
	Id ID #IMPLIED
>

<!-- End SigAndRefsTimeStamp, RefsOnlyTimeStamp  -->

<!-- Start CertificateValues -->

<!ELEMENT xades:CertificateValues (xades:EncapsulatedX509Certificate | 
xades:OtherCertificate)*>
<!ATTLIST xades:CertificateValues
	Id ID #IMPLIED
>

<!ELEMENT xades:EncapsulatedX509Certificate (#PCDATA)>
<!ATTLIST xades:EncapsulatedX509Certificate
	Id ID #IMPLIED
	Encoding CDATA #IMPLIED
>
<!ELEMENT xades:OtherCertificate (#PCDATA %Any.ANY;)*>

<!ELEMENT xades:AttrAuthoritiesCertValues (xades:EncapsulatedX509Certificate | 
xades:OtherCertificate)*>
<!ATTLIST xades:AttrAuthoritiesCertValues
	Id ID #IMPLIED
>

<!-- Start RevocationValues -->

<!ELEMENT xades:RevocationValues (xades:CRLValues?, xades:OCSPValues?, xades:OtherValues?)>
<!ATTLIST xades:RevocationValues
	Id ID #IMPLIED
>

<!ELEMENT xades:CRLValues (xades:EncapsulatedCRLValue+)>
<!ELEMENT xades:OCSPValues (xades:EncapsulatedOCSPValue+)>
<!ELEMENT xades:OtherValues (xades:OtherValue+)>

<!ELEMENT xades:EncapsulatedCRLValue (#PCDATA)>
<!ATTLIST xades:EncapsulatedCRLValue
	Id ID #IMPLIED
	Encoding CDATA #IMPLIED
>
<!ELEMENT xades:EncapsulatedOCSPValue (#PCDATA)>
<!ATTLIST xades:EncapsulatedOCSPValue
	Id ID #IMPLIED
	Encoding CDATA #IMPLIED
>
<!ELEMENT xades:OtherValue (#PCDATA %Any.ANY;  )*>

<!-- End RevocationValues -->

<!ELEMENT xades:AttributeRevocationValues (xades:CRLValues?, xades:OCSPValues?, xades:OtherValues?)>
<!ATTLIST xades:AttributeRevocationValues
	Id ID #IMPLIED
>
<!-- Start ArchiveTimeStamp -->

<!ELEMENT xades:ArchiveTimeStamp (xades:Include*, ds:CanonicalizationMethod?, 
(xades:EncapsulatedTimeStamp | xades:XMLTimeStamp)+)>
<!ATTLIST xades:ArchiveTimeStamp
	Id ID #IMPLIED
>


<!-- End ArchiveTimeStamp -->
