<?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$
-->

<!--
    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.
-->
<!ELEMENT Name (#PCDATA)> <!-- string -->
<!--
	@attr xml:lang The language in which the name is written. 
-->
<!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.
-->
<!ELEMENT Extrinsic ANY>
<!-- 
	@attr name Name used to identify this extrinsic. 
-->
<!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.
-->
<!ELEMENT Description ( #PCDATA | ShortName )* > <!-- mixed: string and
                                                      ShortName -->
<!-- 
	@attr xml:lang The language in which the description is written.

    @attr type The qualifier of the description. 
-->
<!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.
-->
<!ELEMENT CountryCode (#PCDATA)> <!-- uint -->
<!-- 
	@attr isoCountryCode The ISO 3166 2-letter country code for the dial code in question.  
-->
<!ATTLIST CountryCode
    isoCountryCode  %isoCountryCode;  #REQUIRED
>

<!--
    The area code 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.
-->
<!ELEMENT Phone (TelephoneNumber)>
<!-- 
	@attr name Specifies an identifier which indicates the type of phone number. US examples would include 
		"work","home", and so on. 
-->
<!ATTLIST Phone
    name  %string;  #IMPLIED
>

<!--
    Fax number.
-->
<!ELEMENT Fax (TelephoneNumber | URL | Email)>
<!-- 
	@attr name Name given to the fax number. 
-->
<!ATTLIST Fax
    name  %string;  #IMPLIED
>

<!-- Addressing Elements -->
<!--
    A string that represents a URL.
-->
<!ELEMENT URL (#PCDATA)> <!-- URL -->
<!-- 
	@attr name Name given to the URL. 
-->
<!ATTLIST URL
    name  %string;  #IMPLIED
>

<!--
    An email address. Address must conform to RFC 821 (SMTP Standard).
-->
<!ELEMENT Email (#PCDATA)> <!-- string -->
<!-- 
	@attr name Name given to the email address.

    @attr preferredLang Optional language that the email owner prefers to receive emails in. Refer to the definition 
		of the xmlLangCode entity. 
-->
<!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.
-->
<!ELEMENT Contact (Name, PostalAddress*, Email*, Phone*, Fax*, URL*, IdReference*, Extrinsic*)>
<!-- 
	@attr 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.
        The from and to roles are reserved for future use.

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

    @attr addressIDDomain The qualifier for the addressId to specify the agency or organization. Examples are DUNS, ILN, and buyerLocationID.
-->
<!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's location.
-->
<!ELEMENT Street (#PCDATA)> <!-- string -->

<!--
    City is the name of the city in an Address's location.
-->
<!ELEMENT City (#PCDATA)> <!-- string -->
<!-- 
	@attr cityCode Optional code assigned by local/government agencies identifying a city region. 
-->
<!ATTLIST City
    cityCode  %string;  #IMPLIED
>

<!--
    State is an optional state identifier in the location for an Address.
-->
<!ELEMENT State (#PCDATA)> <!-- string -->
<!-- 
	@attr 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. 
-->
<!ATTLIST State
    isoStateCode  %isoStateCode;  #IMPLIED
>

<!--
    A series of letters or digits or both, sometimes including spaces or punctuation, included 
	in a postal address for the purpose of sorting mail. In the United States, postal code 
	is called "ZIP code."
-->
<!ELEMENT PostalCode (#PCDATA)> <!-- string -->

<!--
    Country is the name of the country in an Address's 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.
-->
<!ELEMENT Country (#PCDATA)> <!-- string -->
<!-- 
	@attr isoCountryCode The ISO 3166 2-letter country code for this country. 
-->
<!ATTLIST Country
    isoCountryCode  %isoCountryCode;  #REQUIRED
>

<!--
    Municipality specifies the name of the municipality in the location for an Address.
-->
<!ELEMENT Municipality (#PCDATA)> <!-- string -->
<!-- 
	@attr municipalityCode Optional code assigned by local/government agencies identifying a municipality region. 
-->
<!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*)>
<!-- 
	@attr name Name given to the postal address. 
-->
<!ATTLIST PostalAddress
    name  %string;  #IMPLIED
>

<!--
    Address is the association of a Contact and a Location.
-->
<!ELEMENT Address (Name, PostalAddress?, Email?, Phone?, Fax?, URL?)>
<!-- 
	@attr isoCountryCode The ISO 3166 2-letter country code for the country containing this location.

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

    @attr addressIDDomain It is the qualifier for the addressId to specify the agency or organization. 
		Examples are DUNS and ILN.
-->
<!ATTLIST Address
    isoCountryCode  %isoCountryCode;  #IMPLIED
    addressID       %string;          #IMPLIED
    addressIDDomain   %string;   #IMPLIED
>

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

	Contact: Specifies contact information for the document partners. Allowed 
		contact roles include fieldContractor, fieldEngineer, and requester.

	IdReference: Partner reference ID, supplier tax ID, and so on.
-->
<!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.
-->
<!ELEMENT Money (#PCDATA)> <!-- number -->
<!-- 
	@attr currency Specifies the currency in which amount is stated, must conform to ISO 4217 currency codes.

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

	@attr alternateCurrency Specifies the currency in which the alternateAmount is stated. Must conform to ISO 4217 currency codes. 
-->
<!ATTLIST Money
    currency           %isoCurrencyCode;  #REQUIRED
    alternateAmount    %number;           #IMPLIED
    alternateCurrency  %isoCurrencyCode;  #IMPLIED
>

<!--
	Optional textual child for communicating arbitrary comments or description along with the parent.

	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.
-->
<!ELEMENT Comments ( #PCDATA | Attachment )* > <!-- mixed: string and
                                                    opt. Attachment list -->
<!-- 
	@attr 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.)

	@attr type An optional type of the comments. Type can be used to make the comments structured with 
		respect to what they describe. 
-->
<!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.
-->
<!ELEMENT Attachment (URL)>
<!-- 
	@attr 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. 
-->
<!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.
-->
<!ELEMENT AttachmentReference (Name, Description, InternalID, URL?)>
<!-- 
	@attr length Length of the attachment in bytes.
        
    @attr version Specifies the version of the external source. Examples: 1.0, beta, V-2. 
-->           
<!ATTLIST AttachmentReference
    length  %uint;  #IMPLIED
    version     %string; #IMPLIED 
>

<!---
    Reference to a pricing condition cost term .

    Cost term can be of money or percentage type                
-->

<!ELEMENT CostTermValue (Money|Percentage)>

<!---
    Reference to a pricing condition type.

    This represents the pricing condition type. ConditionType can have default 
    cost term value, which will be used in cases where scales are not specified. 
    If the scale is specified, the cost term value provided in the scale will be used.
-->

<!ELEMENT ConditionType (CostTermValue?,Scales?)>
<!--
     @attr name Name of the condition type. Example: Price, Surcharge.
-->
<!ATTLIST ConditionType
    name  %string; #REQUIRED 
>

<!---
    This represents the volume scale and there can be more than one 
    cost term per scale. The scale type is specified in the Scales element.

    The value which is specified for a scale is always in the context of a scale type which is selected. 
 
    The attributes for a scale depends on the scale type. If the scale type is selected as "From", then
    the scale should have "from" value. If the scale type is "To" scale, then the scale should have the 
	value for "to" attribute.

    If the scale is of type "Graduated", then both the "from" and "to" values should be provided.

    Example 1: From scale
	%
	<Scale from='0'> 
	<Scale from='1000'>
	<Scale from='5000'>
	%
    In the above example, there are three scales: From 0, From 1000, and From 5000. 
    
    Example 2: To scale
	%
	<Scale to='100'> 
	<Scale to='1000'>
	<Scale to='5000'>
	%
    In the above example, there are three scales: To 100, To 1000, and To 5000. 

    Example 3: Graduated scale
	%
	<Scale from='0' to='100'>
	<Scale from='101' to='200'>
    %
	In the above example, there are two scales: From 0 To 100 and From 101 To 200.
-->
<!ELEMENT Scale (CostTermValue+)>
<!--
    @attr from This represents the lower bound value for the scale.
    @attr to   This represents the upper bound value for the scale.
-->
<!ATTLIST Scale
    from   %number; #IMPLIED 
    to     %number; #IMPLIED 
>

<!---
    Reference to a pricing condition scales vector.

    This represents the volume scales list for a given validity period.
-->
<!ELEMENT Scales (Scale+)>
<!--
    @attr scaleType This represents the scale type for the validity period. The value for this attribute can be
        "From", "To", or "Graduated". Please refer to the examples provided in scale element for more information.

    @attr scaleBasis This represents the scale basis.
-->
<!ATTLIST Scales
    scaleType  (From|To|Graduated) #REQUIRED
    scaleBasis %string; #FIXED 'quantity'
>

<!---
    Reference to a condition types list.               
-->
<!ELEMENT ConditionTypes (ConditionType+)>

<!---
    Reference to a pricing condition validity period.

    This represents the validity period of the price condition with start date and end date.
    The validity period can have list of condition types.
-->
<!ELEMENT ValidityPeriod (ConditionTypes)>
<!--
    @attr from Start date of the validity period.

    @attr to End date of the validity period.
-->
<!ATTLIST ValidityPeriod
    from      %datetime.tz;         #REQUIRED
    to        %datetime.tz;         #REQUIRED
>

<!---
    Reference to list of validity periods. The list should have 
    at least one validity period. 
-->
<!ELEMENT ValidityPeriods (ValidityPeriod+)>

<!---
    Reference to pricing condition object for a given line item.
    The cost elements are added to pricing conditions per validity period
    and scale. If any cost term like Discount, Surcharge is added to 
    pricing condition, then it will not be part of modifications.     
-->
<!ELEMENT PricingConditions (ValidityPeriods)>

<!--
    Price per unit of item.

    Money: Contains the final amount after applying Modifications.

	Modifications: Contains details of the allowances and charges applicable 
	at the line-item level.
    
	PricingConditions: Pricing condition that represents the cost elements with
		validity period and optional scales.
-->
<!ELEMENT UnitPrice (Money, Modifications?, PricingConditions?)>

<!--
    Reference to an earlier document (for example, OrderRequest). In a
    StatusUpdateRequest, this element identifies the purchase order to be
    updated.
-->
<!ELEMENT DocumentReference EMPTY>
<!-- 
	@attr payloadID A unique identifier for the document. Copied directly from the
        cXML element of the original document. 
-->
<!ATTLIST DocumentReference
    payloadID       %string;      #REQUIRED
>

<!--
	Contains a unique internal ID for a document.
-->
<!ELEMENT InternalID (#PCDATA)> <!-- string -->
<!--
	@attr domain A string indicating the type of internal ID.
-->
<!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.
==== -->

<!--
    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)>

<!--
    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)>

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

<!--
    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)>

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

<!--
	A value that is used by the originating application. This value depends on 
	what service the provider supplies.
-->
<!ELEMENT ReturnValue (#PCDATA)>

<!--
    Defines a time range. The start and end can be unbounded.
-->
<!ELEMENT TimeRange EMPTY>
<!-- 
	@attr startDate The starting date of the time range.

    @attr endDate The ending date of the range. 
-->
<!ATTLIST TimeRange
    startDate      %datetime.tz;         #IMPLIED
    endDate        %datetime.tz;         #IMPLIED
>

<!--
    Defines a period in time.
-->
<!ELEMENT Period EMPTY>
<!-- 
	@attr startDate The starting date of the period.

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

<!--
    Describes how the product is packaged or shipped. It must conform with UN/CEFACT 
	(Recommendation 20) Unit of Measure Common Codes.
-->
<!ELEMENT UnitOfMeasure (#PCDATA)> <!-- nmtoken -->


<!--
    Defines the quantity as quoted in the UnitPrice.
	
	UnitOfMeasure: The unit of measure for the quote.
	
    Description: The textual description of the quote.
-->
<!ELEMENT PriceBasisQuantity (UnitOfMeasure, Description?)>
<!-- 
    @attr quantity The quantity basis for the quote.

    @attr conversionFactor The conversion ratio from the unit of measure of the order to 
		the unit of measure of the PriceBasisQuantity. 
-->
<!ATTLIST PriceBasisQuantity
    quantity         %r8;    #REQUIRED
    conversionFactor %r8;    #REQUIRED
>

<!--
    Defines a reference to a term which is defined in another document.
-->
<!ELEMENT TermReference EMPTY>
<!-- 
	@attr termName The name of the ID attribute containing the term.

    @attr term The value of that attribute (that is, the term itself). 
-->
<!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.
-->
<!ELEMENT Rate (Total, UnitRate, Description?)>
<!--
    @attr quantity The quantity associated with the rate. For example, a 4-night stay at a hotel will
		have quantity set to 4 with UnitofMesure in UnitRate set to Day. 
-->
<!ATTLIST Rate
    quantity    %r8;    #REQUIRED
>

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

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

<!--
	Contains the quantity tolerance for a line item.
-->
<!ELEMENT QuantityTolerance (Percentage | Value)>

<!--
	Contains the price tolerance for a line item.
-->
<!ELEMENT PriceTolerance (Percentage | Money)>

<!--
    Defines a certain amount of days used to check if a concrete
    delivery date is within the tolerance regarding the requested
    delivery date.
-->
<!ELEMENT TimeTolerance EMPTY>
<!-- 
	@attr limit Amount of time in 'type' relative to the requested delivery date is it allowed to deliver.

    @attr type Specifies how the limit should be interpreted. 
-->
<!ATTLIST TimeTolerance
    limit %int; #REQUIRED
    type  (minutes | hours | days | weeks) "days"
>

<!-- 
	Upper tolerances define an upper limit 
-->
<!ELEMENT Upper (Tolerances)>
<!-- 
	Lower tolerances define a lower limit 
-->
<!ELEMENT Lower (Tolerances)>
<!--
	The amount of tax.
-->
<!ELEMENT TaxAmount (Money)>
<!--
	The amount that is taxable.
-->
<!ELEMENT TaxableAmount (Money)>

<!--
    One language-specific string for the location of tax,
    for example, London, Canada, California, and so on.
-->
<!ELEMENT TaxLocation (#PCDATA)>              <!-- string -->
<!-- 
	@attr xml:lang The language or locale in which the location of tax is written. 
-->
<!ATTLIST TaxLocation
   xml:lang              %xmlLangCode;         #REQUIRED
>

<!--
    TriangularTransactionLawReference indicates the relevant law as
    titled for the local jurisdiction in the scenario of a triangular
    transaction, for example, Triangulation, article 28c,E paragraph 3 
	of the 6th EU VAT Directive.
-->
<!ELEMENT TriangularTransactionLawReference (#PCDATA)>
<!-- 
	@attr xml:lang The language in which the law reference is written. 
-->
<!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.
-->
<!ELEMENT TaxExemption (ExemptReason?)>
<!-- 
	@attr exemptCode Specifies the code against which the tax is exempted. 
-->
<!ATTLIST TaxExemption
    exemptCode    %string;      #REQUIRED 
>

<!--
    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".
-->
<!ELEMENT  ExemptReason  (#PCDATA) >
<!-- 
    @attr xml:lang The language in which the exemption reason is written. 
-->				
<!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.

    TaxAdjustmentAmount: This is the adjustment amount for the tax for the specific tax 
		line (tax for a specific category and location) or in other words the adjustment
        amount corresponding to tax represented by this TaxDetail element and
        is optional. Currently it is ONLY supported for the PPR(PaymentProosalRequest)
        document and also ONLY applicable for the PPR document.
		
        Note: Also this is to be used instead of TaxAdjustmentDetail(now deprecated)
        element in the PPR document.

    Description: The textual description of the current type of tax.

    TriangularTransactionLawReference: The law reference for transactions where isTriangularTransaction 
		is True.
-->
<!ELEMENT TaxDetail (TaxableAmount?, TaxAmount, TaxLocation?, TaxAdjustmentAmount?, Description?,
                     TriangularTransactionLawReference?, TaxRegime?, TaxExemption?,
					 Extrinsic*)>
<!-- 
    @attr taxedElement An ID reference that uniquely identifies the item being taxed???

    @attr purpose The purpose of the tax, for example, tax (tax), custom duty, shippingTax,
       specialHandlingTax, and so on.

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

    @attr percentageRate The tax rate in number of percentage.

    @attr isVatRecoverable Set to "yes" if the entire invoice is VAT (Value Added Tax)-recoverable. Default is false.

    @attr taxPointDate Refers to the date on which VAT becomes due.

    @attr paymentDate Indicates the date when payment must be made.

    @attr isTriangularTransaction Set to "yes" to indicate that the transaction occurred between 
		three parties in three different countries, but the movement of goods did not follow the 
		invoicing route. Add a Contract element with role="subsequentBuyer" to identify the 
		subsequent buying organization in triangular transactions.

    @attr exemptDetail If the TaxAmount is zero, VAT or other regulations may require
		a reason why. Possible values:
		<ul>
		<li>zeroRated - The tax rate is zero.</li>
		<li>exempt - The item or items are exempt from taxation.</li>
		</ul>
	   
	@attr isWithholdingTax Set to "yes" if the tax is a withholding tax. 
	   
    @attr 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.

    @attr basePercentageRate The base tax rate in number of percentage. For some Tax categories (for example, ICMS for 
		Brazil) TaxAmount is calculated considering the basePercentageRate along with percentageRate.
		%
		TaxAmount = TaxableAmount * percentageRate * basePercentageRate
		$
		Used only in the Quote Messages.

    @attr isIncludedInPrice Set to "yes" (true) if the TaxAmount is included in the price. The default is "no" (false). 
		Used only in Quote messages.
-->
<!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-line-item 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 line item.

    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.

    TaxAdjustmentAmount: The adjustment amount for the total tax for the document 
		or in other words the adjustment amount corresponding to tax represented 
		by this Tax element and is optional (this is supposedly the sum of the 
		amounts in TaxAdjustmentAmount elements under the TaxDetail children of 
		this Tax element). Currently, this element is ONLY supported for the 
		PaymentProposalRequest document. It is used instead of the TaxAdjustment 
		element (now deprecated).

-->
<!ELEMENT Tax (Money, TaxAdjustmentAmount?, 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.    
-->
<!ELEMENT OriginalPrice (Money)>
<!-- 
    @attr type Type of price. Examples include MSRP, ListPrice, Actual, AverageSellingPrice,
      CalculationGross, BaseCharge, AverageWholesalePrice, ExportPrice, AlternatePrice,
      ContractPrice, and so on. 
-->
<!ATTLIST OriginalPrice
    type            %string;  #IMPLIED
>

<!--
    Stores any modification to the original price or shipping price of the item. Provides 
	an optional level attribute for cascading modifications. 
	
	AdditionalDeduction: Used only when allowances 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.
	
	ModificationDetail: The details of any information for the AdditionalDeduction or 
		AdditionalCost element.
-->
<!ELEMENT Modification (OriginalPrice?, (AdditionalDeduction | AdditionalCost), Tax?, ModificationDetail?)>
<!-- 
    @attr level Represents the level of modification, used 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$ ...
-->
<!ATTLIST Modification
    level            %uint;  #IMPLIED
>

<!--
    Contains details of the deductions available for the item. Used only when allowances are applicable.
-->
<!ELEMENT AdditionalDeduction (DeductionAmount | DeductionPercent | DeductedPrice)>
<!-- 
	@attr type Type of deduction (for example, discount). 
-->
<!ATTLIST AdditionalDeduction
    type            %string;  #IMPLIED
>

<!-- 
	Contains details of any information for the AdditionalDeduction or AdditionalCost element. 
-->
<!ELEMENT ModificationDetail (Description?, IdReference?, ParentID?, Extrinsic*)>
<!-- 
    @attr name The name of the modification, for example, "Allowance".
    
    @attr startDate The start date of the modification.

    @attr endDate The end date of the modification.

    @attr code The service code for the modification.

    @attr scope The scope for the modification, for example, ‘UnitPrice’, ‘LineItem’.

    @attr calculationType The calculationType for the modification, for example, ‘fixedAmount’, ‘quantity’, ‘percentage’.
-->
<!ATTLIST ModificationDetail
    name             %string;  #REQUIRED
    code             %string;  #IMPLIED
    startDate        %datetime.tz;  #IMPLIED
    endDate          %datetime.tz;  #IMPLIED
    scope            %string;  #IMPLIED
    calculationType  %string;  #IMPLIED
 >

<!--
	Contains the quantity value for a QuantityTolerance.
-->
<!ELEMENT Value EMPTY>
<!--
	@attr value Quantity value for a QuantityTolerance.
-->
<!ATTLIST Value
	value            %number;       #REQUIRED
>

<!--
	Contains the percentage value for a QuantityTolerance.
-->
<!ELEMENT Percentage EMPTY>
<!--
	@attr percent Percentage for a QuantityTolerance.
-->
<!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, and so on.
-->
<!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.
    
	Note: This is deprecated in the PaymentProposalRequest document. Please use
    TaxAdjustmentAmount element that is under TaxDetail element instead.
-->
<!ELEMENT TaxAdjustmentDetail (Money)>
<!-- 
	@attr category String describing the tax adjustment category.
	
    @attr region String describing the region where the tax adjustment occurred. 
-->
<!ATTLIST TaxAdjustmentDetail
    category    %string;        #REQUIRED
    region      %string;        #IMPLIED
>

<!--
    Defines TaxAdjustment given on the Total Tax, currently to be used with
    PPR(PaymentProposalRqeuest) document to specify the total adjustments given
    on the Tax for the payable.
	
    Note: This is deprecated in the PaymentProposalRequest document. Please use
    TaxAdjustmentAmount element that is under Tax element instead.

    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 tax adjustment either on the total tax or for a specific tax
    category and region, currently to be used with PPR(PaymentProposalRequest)
    document to specify the adjustments on tax for the payable.
    If it is included under the Tax element then it is used to specify the
    adjustment for total tax in the PPR(PaymentProposalRequest) document.
    If it is included under the TaxDetail element then it specifies the adjustment
    for tax for a specific tax category and region. 

    Money: Describes the adjustment for the tax(either for Tax or TaxDetail) 
		given on the payable.
-->
<!ELEMENT TaxAdjustmentAmount (Money)>

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

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

<!--
    Provides a clear reference to the line item in a Consignment Movement.
-->
<!ELEMENT ProductMovementItemIDInfo (IdReference*)>
<!-- 
	@attr movementLineNumber The line number of current line item, copied from movement document.

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

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


<!-- 
	Provides a clear reference to the line item in a InvoiceDetailRequest document.
-->
<!ELEMENT InvoiceItemIDInfo (IdReference*)>
<!-- 
	@attr invoiceLineNumber The line number of a line item, copied from InvoiceDetailRequest.

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

	@attr invoiceDate The invoice date. 
-->
<!ATTLIST InvoiceItemIDInfo
    invoiceLineNumber        %uint;              #REQUIRED
    invoiceID                %string;            #REQUIRED
    invoiceDate              %datetime.tz;       #IMPLIED
>

<!--
    Quantity of an item that was returned.
-->
<!ELEMENT ReturnQuantity (UnitOfMeasure)>
<!-- 
	@attr quantity Quantity returned. 
-->
<!ATTLIST ReturnQuantity
    quantity        %r8; #REQUIRED
>

<!--
    This a new limit is directly related with Contract/Catalog items. If this limit is in PO, then validation 
	against this will occur for all Contract items. This field is only visible to buyers.
-->
<!ELEMENT MaxContractAmount (Money)>

<!--
    This a new limit is directly related with ad hoc items. If this is limit is in PO, then validation 
	against this will occur for all ad hoc (non-Contract) items. This field is only visible to buyers.
-->
<!ELEMENT MaxAdhocAmount (Money)>
<!--
    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.069" >
<!--
    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. 
-->
<!ELEMENT Characteristic EMPTY>
<!-- 
	@attr domain Type of Characteristic. Examples: size, sizeCode, color, colorCode , quality, qualityCode, grade, gradeCode.

    @attr value Value for the domain.

	@attr code Code associated with a characteristic, such as a currency code or unit of measure. 
-->
<!ATTLIST Characteristic
	domain	%string;   #REQUIRED
	value  	%string;   #REQUIRED
	code 	%string;   #IMPLIED >
	
<!-- 
    DEPRECATED. Do not use this element.

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


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

    $Id$
-->

<!--
    Supplier of goods and services. Includes a list of SupplierIDs which
    identify the Supplier.
-->
<!ELEMENT Supplier (Name, Comments?, SupplierID+, SupplierLocation*)>
<!-- 
	@attr corporateURL URL to web site about the supplier.

    @attr storeFrontURL URL to web site where a user can shop or browse. 
-->
<!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.

-->
<!ELEMENT OtherOrderTarget ANY>
<!-- 
	@attr name Optional name for target. 
-->
<!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 (for example, (DUNS, 12345),
    (TaxID, 88888888)).
-->
<!ELEMENT SupplierID (#PCDATA)> <!-- string -->
<!-- 
	@attr domain The domain of the ID. 
-->
<!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.

    lean: This line type indicates no child line is expected for line.
-->
<!ENTITY % lineItemType '(composite | item | lean)'>

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

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

<!--
    Choice of type of a service line item. 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:
		<ul>
		<li>Purchase requisitions and RFQs in Purchasing (MM Services)</li>
		<li>Inquiries with BOS in Sales</li>
		</ul>
	
	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)'>


<!--
	Choice of alternativeTypes.

	No Alternative: This line type describes a service that cannot be performed in alternative ways.

	Basic Line: This line type describes a service that can be performed in alternative ways. 
		There are one or more alternative lines for each basic line. The value of a basic line is 
		included in the total value of the service specifications.

	Alternate Line: An alternative line describes a different way of performing a service or doing work 
		than that set out in the associated basic line.

		The value of an alternative line is not included in the total value of the service 
		specifications.
		
		Example:
		If flooring is to be renewed, you may want to enter one service line for parquetry 
		flooring and an alternative line for ceramic tiles.    
-->
<!ENTITY % alternativeType '(noAlternative | basicLine | alternativeLine)'>

<!--
    Type with which a service line item can be identified to its alternative item. 
-->
<!ELEMENT Alternative EMPTY>
<!--
	@attr alternativeType This represents the alternative type of a service line item. 

	@attr basicLineNumber When an alternative type is set as Alternate Line, the line number of the 
		Service Line which whose alternative type set as Basic Line will be set here. This enables 
		this service line item to identify for which service line item this is alternative to. 
-->
<!ATTLIST Alternative
	alternativeType  %alternativeType;  #REQUIRED
	basicLineNumber  %string;  #IMPLIED
> 

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

<!--
    Name of the item's manufacturer.
-->
<!ELEMENT ManufacturerName (#PCDATA)> <!-- string -->
<!-- 
	@attr 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.) 
-->
<!ATTLIST ManufacturerName
    xml:lang %xmlLangCode; #IMPLIED
>

<!--
    Classification is used to group items into similar categories.
-->
<!ELEMENT Classification (#PCDATA)> <!-- string -->
<!-- 
    @attr domain Name of classification. Groups items into similar categories. Typically lists the UNSPSC 
		(United Nations Standard Products and Services Code) commodity code for each selected item. 
		These codes are used by backend systems within buyer and supplier organizations for accounting 
		and report generation. For the list of UNSPSC codes, see www.unspsc.org. The domain attribute 
		can also be used to specify product hierarchy and commodity information used by a backend system.
		Domain can also be "MaterialGroup", which refers to a grouping of materials and services according 
		to their characteristics in SAP.

	@attr code Identifies the commodity by its designated code. 
-->
<!ATTLIST Classification
    domain  %string;  #REQUIRED
	code 	%string;  #IMPLIED
>

<!--
     Specifies the amount of time in days 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 traceability.

    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>
       ...
	%
-->
<!ELEMENT SupplierPartID (#PCDATA)> <!-- string -->
<!-- 
    @attr 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. 
-->     
<!ATTLIST SupplierPartID
	revisionID	%string;	#IMPLIED
>

<!--
	If SupplierPartID does not uniquely identify the item, the supplier should use SupplierPartAuxiliaryID to specify an "auxiliary" 
	key that identifies the part uniquely when combined with the SupplierID and SupplierPartID. For example, a supplier might use 
	the same SupplierPartID for an item, but have a different price for units of "EA" and "BOX". In this case, a reasonable 
	SupplierPartAuxiliaryID for the two items might be "EA" and "BOX."
	
	SupplierPartAuxiliaryID could also be used as a supplier cookie, enabling the supplier to refer to complex configuration or 
	part data. It could contain all the data necessary for the supplier to reconstruct what the item in question is in their 
	computer system (a basket or cookie of data that makes sense only to the supplier).
	
	SupplierPartAuxiliaryID can help a remote website transport complex configuration or bill-of-goods information to re-identify 
	the item when it is presented to the remote website in the future.
	
	If SupplierPartAuxiliaryID contains special characters (for example, if it contains additional XML elements not defined in the 
	cXML protocol), they must be escaped properly. Due to the necessity to pass SupplierPartAuxiliaryID information through 
	applications and back to the originating supplier, an internal subset containing any additional XML elements is insufficient.
-->
<!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 specific item detail information.

	OverallLimit: Holds 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+, OverallLimit?, ExpectedLimit?, MaxAmount?, MinAmount?, 
                             MaxContractAmount?, MaxAdhocAmount?, MaxQuantity?, MinQuantity?,
			                 UnitPrice?, UnitOfMeasure?, PriceBasisQuantity?,
			                 Classification*, Extrinsic*)>

<!--
    ItemDetailIndustry contains detailed information about an item for a specific industry.
-->
<!ELEMENT ItemDetailIndustry (ItemDetailRetail? )>
<!-- 
	@attr isConfigurableMaterial A value of yes indicates that this item is defined as a configurable 
		purchase and has material characteristics associated with it.  
-->
<!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.
	
	EuropeanWasteCatalogID: Specifies a unique ID for articles listed in the EU Waste 
		Catalog (EWC) if it requires special handling.
		
	Characteristic: Specifies detailed information about an item that can be used across 
		several different industries.
-->
<!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 id, and so on).
	
	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: Consists of the property to be valuated and the associated values.
-->
<!ELEMENT Batch (BuyerBatchID?, SupplierBatchID?, PropertyValuation*)>
<!-- 
    @attr productionDate Date on which when a batch of material or goods is produced.

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

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

    @attr shelfLife Duration that a product is expected to remain within its approved product specification 
		after production date. This attribute is used for information purposes only.

    @attr originCountryCode Country of origin for a batch of material or goods.

    @attr batchQuantity Quantity for a batch of material or goods.
-->
<!ATTLIST Batch
    productionDate      %datetime.tz;    	#IMPLIED
    expirationDate   	%datetime.tz;      	#IMPLIED
    inspectionDate      %datetime.tz;       #IMPLIED
    shelfLife           %duration;          #IMPLIED
    originCountryCode 	%isoCountryCode; 	#IMPLIED
    batchQuantity       %r8;                #IMPLIED
>

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

<!--
    References 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*)>

<!--
    References 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*)>

<!--
    Contains a group of values pertaining to a property.
	
    IdReference: ID reference is within the application context (for example, ID for a property). 
		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)>

<!--
    Contains values for valuating a property.
	
    Examples:
	<ul>
	<li>QuantitySpecification - valuating properties whose data types are in units, for example, 5 pieces, 7 kg.</li>
    <li>IntegerSpecification - valuating non-dimensional, integer properties, for example, codes, indexes, and sequential numbers.</li>
	<li>DateTimeSpecification - valuating date time properties, for example requirement date, production date, and expiration date.</li>
	</ul>
	
	Characteristic: Contains detailed information about a value that can be used for valuation of property
-->
<!ELEMENT PropertyValue (Characteristic*)>
<!-- 
	@attr name Name of PropertyValue.
-->
<!ATTLIST PropertyValue
	name          %string;       #IMPLIED>

<!--
	ControlKeys are used to override default business rules as configured in the network hub.
-->
<!ELEMENT ControlKeys (OCInstruction?, ASNInstruction?, InvoiceInstruction?, SESInstruction?)>

<!--
	Indicates whether an order confirmation is allowed for this order or line item, regardless of the default business 
	rules configured in the network hub.
	
	Lower: Specifies tolerances that define a lower limit.
	
	Upper: Specifies tolerances that define an upper limit.
-->
<!ELEMENT OCInstruction (Lower?, Upper?)>
<!--
	@attr value Value that indicates whether an order confirmation is allowed. Possible values:
		<ul>
		<li>allowed - Order confirmation is allowed.</li>
		<li>notAllowed - Order confirmation is not allowed.</li>
		<li>requiredBeforeASN - Order confirmation is required before a ship notice.</li>
		</ul>
-->
<!ATTLIST OCInstruction
	value     ( allowed | notAllowed | requiredBeforeASN )     #REQUIRED>

<!--
	Indicates whether a ship notice is allowed for this order or line item, regardless of the 
	default business rules configured in the network hub.
	
	Lower: Specifies tolerances that define a lower limit.
	
	Upper: Specifies tolerances that define an upper limit.
-->
<!ELEMENT ASNInstruction (Lower?, Upper?)>
<!--
	@attr value Value that indicates whether a ship notice is allowed. Possible values:
		<ul>
		<li>allowed - Ship notice is allowed.</li>
		<li>notAllowed - Ship notice is not allowed.</li>
		</ul>
-->
<!ATTLIST ASNInstruction
    value       (allowed | notAllowed)  #REQUIRED>

<!--
	Indicates whether an invoice is allowed for this order or line item, regardless of the default 
	business rules configured in the network hub.
	
	TemporaryPrice: Indicates if pricing information is temporary or final. It can be set at the 
		order header or item level. It has a required value attribute, which can be set to "yes" or 
		"no". If set to "yes" at the order item level, pricing for the item is considered temporary 
		and the supplier cannot invoice the line item. If set to "yes" 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.
	
	Lower: Specifies tolerances that define a lower limit.
	
	Upper: Specifies tolerances that define an upper limit.
-->
<!ELEMENT InvoiceInstruction (TemporaryPrice?, Lower?, Upper?)>
<!--
	@attr value Value that indicates whether an invoice is allowed. Possible values:
		<ul>
		<li>isERS - The order or line item is flagged for Evaluated Receipt Settlement, indicating that the 
			system will post an invoice for it automatically based on goods receipts.</li>
		<li>isNotERS - The order or line item is not flagged for Evaluated Receipt Settlement.</li>
		<li>allowed - Invoice is allowed.</li>
		<li>notAllowed - Invoice is not allowed.</li>
		</ul>

	@attr verificationType The only supported value is "goodsReceipt", which indicates that invoice verification 
		for this item is based on the goods receipt. The invoice item can then be matched up uniquely with the 
		goods receipt item. Goods-receipt-based invoice verification makes sense when you expect a delivery to 
		be made and posted in several parts.

	@attr unitPriceEditable Specifies whether a buyer or supplier is allowed to update the unit price while 
		creating an invoice. Possible values:
		<ul>
		<li>yes - Buyer or supplier is allowed to edit unit price. The new price must be within price tolerance.</li>
		<li>no - The unit price is not editable regardless of transaction rules defined in the network hub.</li>
		</ul>

		If the unitPriceEditable attribute is not present, the system honors the default transaction rules 
		present in the network hub.
-->
<!ATTLIST InvoiceInstruction
    value       (isERS | isNotERS | allowed | notAllowed)  #IMPLIED
    verificationType (goodsReceipt)                        #IMPLIED
    unitPriceEditable (yes | no) 			   #IMPLIED>

<!--
	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>
<!-- 
	@attr value If set to "yes" at the order item level, pricing for the item is considered temporary and the 
		supplier cannot invoice the line item. If set to "yes" 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. 
-->
<!ATTLIST TemporaryPrice value (yes | no) #REQUIRED
>

<!--
	Indicates whether a service sheet is allowed for this order or line item, regardless of the default business 
	rules configured in the network hub.

	Lower: Specifies tolerances that define a lower limit.
	
	Upper: Specifies tolerances that define an upper limit.
-->
<!ELEMENT SESInstruction (Lower?, Upper?)>
<!--
	@attr value Value that indicates whether a service sheet is allowed. Possible values:
		<ul>
		<li>allowed - Service sheet is allowed.</li>
		<li>notAllowed - Service sheet is not allowed.</li>
		</ul>

	@attr unitPriceEditable Specifies whether a buyer or supplier is allowed to update the unit 
		price while creating a service sheet. Possible values:
		<ul>
		<li>yes - Buyer or supplier is allowed to edit unit price. The new price must be within price tolerance.</li>
		<li>no - The unit price is not editable regardless of transaction rules defined in the network hub.</li>
		</ul>

		If the unitPriceEditable attribute is not present, the system honors the default transaction rules present 
		in the network hub.
-->
<!ATTLIST SESInstruction
    value       (allowed | notAllowed)  #REQUIRED
    unitPriceEditable (yes | no)  	#IMPLIED>

<!--
    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&#064;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&#064;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:
	<ul>
	<li>UNDG - United Nations Dangerous Goods</li>
    <li>IMDG - International Marine Organization Dangerous Goods</li>
    <li>NAHG - North American Hazardous Goods</li>
	</ul>
-->
<!ELEMENT Hazard ((Description+, Classification*) | Classification+)>

<!--
	Number of days the buyer schedules for the inspection of goods after receiving them.
-->
<!ELEMENT PlannedAcceptanceDays  (#PCDATA)> <!-- number -->

<!--
    Defines one or more authorization labels for the document.
    
    A authorization label identifies a document as part of a certain, user-defined, classification
    but doesn't by itself grant or deny access to a user. Instead, it's up to the application
    to decide if a user should or shouldn't have access based on this info.
    
    Each IdReference means a different domain. No duplicate domains are allowed. Multiple
    values within the same domain must appear as comma-separated values in the same element.
    
    Examples of valid domains are:
    <li>sip : In Aerospace and defense industries, SIP labels or SIP tags most commonly refer to durable, unique identification labels used for asset tracking and compliance with military standards. They are essential for efficient asset management, regulatory compliance, and operational readiness.<li>
    <li>program: A program in the aerospace and defense industry is a coordinated set of related projects, activities, and resources managed together to achieve a significant, strategic outcome—typically the development, acquisition, or sustainment of complex systems such as aircraft, spacecraft, missiles, satellites, or defense platform. </li>
    <li>contract: A prime contract in aerospace and defense is a direct agreement between a company and a government agency for the delivery of major defense or aerospace products and services. The prime contractor is fully responsible for contract execution and compliance, often coordinating a network of subcontractors to fulfill the contract’s requirements. </li>
    <li>documentVisibility: This domain is used to specify the visibility of the documents.</li>
    for documentVisibility:
    	- identifier="citizen": Document should only be available to users that are US citizens.
		- identifier="US-Resident": Document should only be available to users that are lawful permanent residents (i.e. Green Card holders).
-->
<!ELEMENT AuthorizationLabels (IdReference+)>

<!--
   The domain of the authorization label. This is a unique identifier for the
   domain of the label. The value of this attribute must be unique within the
   document.

   DPAS: Header-level DPAS-rating info for this document, if applicable.
   AuthorizationLabels: ABAC labels for configuring access to this document.
-->
<!ELEMENT AerospaceAndDefense (AuthorizationLabels?, DPAS?)>

<!--
    @attr acknowledgementRequired    The attribute ‘acknowledgementRequired’ allows orders to send the new flag explicitly. This new attribute is relevant for Orders only.
	Acknowledgement is a process to ‘Accept’ or ‘Reject’ the terms and conditions of the Defense Procurement Order. This attribute is required for DPAS-rated orders. However, it is optional for non-DPAS-rated orders.
	The ‘acknowledgementRequired’ attribute’s default value is "yes".
	If the value is set to "yes", the order acknowledgement status will be set to "ActionRequired".
	If the value is set to "no", the order acknowledgement status will be set to "NotRequired".
-->
<!ATTLIST AerospaceAndDefense
    acknowledgementRequired	(yes | no)	#IMPLIED
>

<!--
    Indicates that the order is DPAS-rated. This requires a special handling
    to comply with the applicable law.

    This element is only applicable in the US.
-->
<!ELEMENT DPAS EMPTY>
<!--
    @attr rating    The DPAS rating, such as DO or DX. Even more specific ratings
        can be put here.
    @attr contract  The contract number related with this DPAS-rated order.
        Shouldn't be present for header-level.
    @attr quantity  The allocation quantity, for line-level or lower information.
        Shouldn't be present for header-level.
-->
<!ATTLIST DPAS
    rating      %string;    #REQUIRED
    contract    %string;    #IMPLIED
    quantity    %r8;        #IMPLIED
>

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

    $Id$
-->

<!--
    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.
-->
<!ELEMENT TravelDetail ((AirDetail | CarRentalDetail | HotelDetail | RailDetail),
                          PolicyViolation*,
                          Comments?,
                          TermsAndConditions?)>
<!--
	@attr 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.

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

	@attr 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.
-->
<!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
        cancellation 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).
-->
<!ELEMENT AirLeg (Vendor,
                  AirLegOrigin,
                  AirLegDestination,
                  BookingClassCode?,
                  Rate?,
                  Meal*)>
<!--
    @attr travelSegment Textual information to identify this travel segment. This information is specific to the Travel Booking Provider.

    @attr departureTime Departure date and time for this air leg.

    @attr arrivalTime Arrival date and time for this air leg.

    @attr flightNumber Flight number for this air leg.

    @attr seatNumber Seat number for this air leg.

    @attr seatType Seat type.

    @attr upgrade Set to "yes" to indicate the ticket is an upgrade.

    @attr 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.

    @attr equipment The plane equipment information for this air leg.
-->
<!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 three-letter IATA airport code.
	
    Address: Physical address of the airport.
-->
<!ELEMENT Airport (Address?)>
<!--
	@attr airportCode The three-letter IATA airport code.
-->
<!ATTLIST Airport airportCode %string; #REQUIRED>

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

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

    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: Four-letter code for car.
		<ul>
		<li>1st Letter - M (Mini), E (Economy), C (Compact), S (Standard),
			I (Intermediate), F (Full size), P (Premium), L (Luxury)
            V (MiniVan), X (Special)</li>
        <li>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)</li>
        <li>3rd Letter - A (Automatic), M (Manual)</li>
        <li>4th Letter - R (A/c), N (No A/C)</li>
		</ul>

    CarRentalFee: Multiple 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.
-->
<!ELEMENT CarRentalDetail (Vendor,
                           CarRentalPickup,
                           CarRentalDropoff,
                           BookingClassCode?,
                           CarRentalFee+,
                           LimitedMileage?,
                           AvailablePrice*)>
<!--
	@attr travelSegment Textual information to identify this travel segment. This information is 
		specific to the Travel Booking Provider.

	@attr pickupTime The intended pickup date and time.

	@attr dropoffTime The intended drop off date and time. 
-->
<!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.
-->
<!ELEMENT LimitedMileage (UnitOfMeasure)>
<!-- 
	@attr quantity The mileage limit amount.
-->
<!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.
-->
<!ELEMENT CarRentalFee (Total, Rate*)>
<!--
	@attr type Type of rate. Possible values:
		<ul>
		<li>baseRate - Base rental rate.</li>
		<li>additionalDriver - Additional driver fee.</li>
		<li>airportAccessFee - Airport Access fee.</li>
		<li>dropOffCharge - Drop off charge.</li>
		<li>vehicleLicensingFee - Vehicle licensing fee.</li>
		<li>touristTax - Tourist tax.</li>
		<li>prepaidGasoline - Prepaid gasoline charge.</li>
		<li>navigationSystem - Navigation system.</li>
		<li>childSeat - Child seat charge.</li>
		<li>luggageRack - Luggage rack charge.</li>
		<li>collisionDamageInsurance - Collision damage insurance.</li>
		<li>liabilityInsurance - Liability insurance.</li>
		<li>mobilePhone - Mobile phone base charge.</li>
		<li>other - Other charges.</li>
		</ul>
-->
<!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.
-->
<!ELEMENT HotelDetail (Vendor,
                       Address,
                       RoomType,
                       BookingClassCode?,
                       Meal*,
                       Rate*,
                       AvailablePrice*)>
<!--
	@attr travelSegment Textual information to identify this travel segment. This information is specific 
		to the Travel Booking Provider.

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

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

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

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

	@attr earlyCheckinAllowed Set to "yes" to indicate that early checkout is allowed.

	@attr lateCheckoutAllowed Set to "yes" to indicate that late checkout is allowed.
-->
<!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.
-->
<!ELEMENT RoomType (Description?, Amenities*)>
<!--
	@attr smoking Set to "yes" or "no" to indicate whether it is a smoking a non-smoking room.

	@attr numberOfBed The number of beds in this room.

	@attr bedType The bed type in this room.
-->
<!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.

    RailLeg: 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).
-->
<!ELEMENT RailLeg (Vendor,
                   RailLegOrigin,
                   RailLegDestination,
                   BookingClassCode?,
                   Rate?,
                   Meal*)>
<!--
	@attr travelSegment Textual information to identify this travel segment. This information is specific 
		to the Travel Booking Provider.

	@attr departureTime Date and time of departure at the originating location.

	@attr arrivalTime Date and time of arrival at the destination location.

	@attr trainNumber Train number for this rail leg.

	@attr seatNumber Seat number.

	@attr carType Type of the rail car.
-->
<!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.
-->
<!ELEMENT TripType EMPTY>
<!-- 
	@attr type Type of trip (enumeration). Possible values:
		<ul>
		<li>round - A round trip.</li>
		<li>oneWay - A one way trip.</li>
		<li>multiLeg - A multi leg or open jaw trip.</li>
		</ul>
-->
<!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 (for example,
        (DUNS, 12345), (TaxID, 88888888)).

        Note: Multiple SupplierID elements can be specified. This is so
        that Travel Booking Provider can have a single implementation
        that works with different Buyer implementations that use
        a different SupplierID domain.
-->

<!ELEMENT Vendor (Address, SupplierID*)>
<!--
	@attr preferred Set to "yes" or "no" to indicate whether this vendor is a preferred vendor.
-->
<!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.
-->
<!ELEMENT PolicyViolation (Description,
                           PolicyViolationJustification,
                           Comments?)>
<!--
	@attr level Violation level. Possible values:
		<ul>
		<li>warning - a non serious violation.</li>
		<li>violation - a serious violation of company policy.</li>
		</ul>
-->
<!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.
-->
<!ELEMENT AvailablePrice (Money, Description?)>
<!--
	@attr type Type of available price (enumeration). Possible values:
		<ul>
		<li>lowest - The lowest price possible regardless of the traveling policies.</li>
		<li>lowestCompliant - The lowest price that still complies with the travel policies.</li>
		<li>highestCompliant - The highest price that still complies with the travel policies.</li>
		<li>highest - The highest price possible regardless of the travel policies.</li>
		<li>other - Other, specify in the description.</li>
		</ul>
-->
<!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.
-->
<!ELEMENT BookingClassCode (Description?)>
<!--
	@attr domain The domain for this code, for example, IATA.

	@attr code An industry standard code, or per agreement of buyer-travel booking provider pair.
-->
<!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.
-->
<!ELEMENT Place (Address?)>
<!--
	@attr 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.
		
	@attr code Indicates the code the may represent the place. For example, airport can have an airport code.
-->
<!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$
-->

<!--
    For more information about these elements/entities, see the 
    cXML Reference Guide and related documents.
-->
<!-- 
	Detailed per-unit asset information for a line item.
	 
    Extrinsic: Additional per-unit asset information.
-->
<!ELEMENT AssetInfo (Extrinsic*)>
<!--
	@attr isReferencedAsset Indicates whether the asset info is for a referenced asset associated with the item in the document.
	
	@attr tagNumber Asset tag number for the unit.

	@attr serialNumber Manufacturer's serial number for the unit.

	@attr location Location of the unit.
	
	@attr equipmentId Equipment ID of the unit.
-->
<!ATTLIST AssetInfo
    isReferencedAsset  (no)  #IMPLIED
	tagNumber %string; #IMPLIED
	serialNumber %string; #IMPLIED
	location %string; #IMPLIED
	equipmentId %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.
	
	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.

	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 ShipTo (Address, CarrierIdentifier*, TransportInformation*, IdReference*)>

<!--
The BusinessPartner for an item.

Address: Provides a description of the business party. Follow these instructions for each role:
	<ul>
	<li>soldTo: The domain attribute of the element IdReference should be set to "buyerAccountID", the identifier 
		to the sold to party ID. The addressIDDomain should be set to "buyerAccountID". The addressID should be 
		set to the sold to party ID. Use the name for the description.</li>
	<li>shipFrom: The addressIDDomain should be set to "shipFromAddressID". The addressID should be set to the 
		ship from party ID. Use the name for the description.</li>
	<li>orderingAddress: The addressIDDomain should be set to "supplierCorporate". The addressID should be set 
		to the ordering address party ID. Use the name for the description.</li>
	</ul>

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 BusinessPartner (Address, IdReference*)>

<!--
    @attr type Identifies the type of business partner. Only possible value is organization.
    @attr role Indicates the role the partner plays in the procurement process.
          Possible values are soldTo, shipFrom, orderingAddress, or logistics.
-->
<!ATTLIST BusinessPartner
type             (organization)                         			#REQUIRED
role             (soldTo | shipFrom | orderingAddress | logistics)  #REQUIRED
>

<!--
    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 line item.

    The Modifications element (if present) represents any changes to
    the shipping cost.
-->
<!ELEMENT Shipping (Money, Description, Modifications?)>
<!--
	@attr trackingDomain Represents the logistics supplier, for example, "FedEx", "UPS", and so on.

	@attr trackingId An optional element value that represents the logistics supplier tracking number.

	@attr tracking Deprecated. Do Not Use.
-->
<!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.
-->
<!ELEMENT PaymentTerms (PaymentTerm*, Description?, Extrinsic*)>
<!--
	@attr paymentTermCode This is the payment term code defined by buyers in ERP.
-->
<!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).
		
    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*)>
<!--
	@attr payInNumberOfDays The number of days after invoice effective date for the invoice to be paid.
-->
<!ATTLIST PaymentTerm
    payInNumberOfDays        %uint;         #REQUIRED
>

<!--
    The list of valid payment types.
-->
<!ENTITY % cxml.payment  "PCard">


<!--
    The list of valid payment types.
-->
<!ENTITY % cxml.payment  "PaymentToken">


<!--
	Describes the payment instrument used to pay for the items requested. The Payment element 
	contains a PCard element, which encodes a standard purchasing card into the cXML document.
-->
<!ELEMENT Payment (%cxml.payment;)>

<!--
    Defines an accounting segment. Segment is an older, deprecated way to
    transport this information.
-->
<!ELEMENT Segment EMPTY>
<!--
	@attr type The accounting type of this segment.

	@attr id The unique key of this Segment against the type.

	@attr description Textual description of the Segment. For human readability.
-->
<!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.
-->
<!ELEMENT AccountingSegment ( Name, Description )>
<!--
	@attr id The unique key of this Segment against the type.
-->
<!ATTLIST AccountingSegment
    id           %string;  #REQUIRED
>

<!--
    Accounting entity.
-->
<!ENTITY % cxml.accounting  "( Segment+ | AccountingSegment+ )">
<!--
    An accounting object. Use of the Segment element here is deprecated.
-->
<!ELEMENT Accounting (%cxml.accounting;)>
<!--
	@attr name The name of the object containing the specified accounting segments.
-->
<!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.
	
    ScheduleLine: Schedule Line(s) listed for the specific line item.
    
    ItemOutIndustry: Industry specific item information.
	
    Packaging: Specify the packaging information for a line item. 
	
    Batch: Batch information of goods or material produced in a single manufacturing run. 
		The information includes ID, characteristic, date, and so on.
-->
<!ELEMENT ItemOut (ItemID, Path?, (ItemDetail|BlanketItemDetail)?, (SupplierID | SupplierList)?, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Distribution*, Contact*, TermsOfDelivery?, Comments*, Indicator*, Tolerances?, ControlKeys?,
				   ScheduleLine*,(MasterAgreementReference | MasterAgreementIDInfo)?,  ItemOutIndustry?, Packaging*, ReleaseInfo?,  Batch?)>
<!--
	@attr 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.

	@attr lineNumber Position (counting from 1) of this item in an order. Used to maintain a reference between items in 
		create and update OrderRequest documents.

	@attr 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.

	@attr requestedDeliveryDate The date this item was requested for delivery.

	@attr isAdHoc Indicates the item does not exist in the reference document or contract master agreement.

	@attr agreementItemNumber The corresponding Item Number of the Item in the Master Agreement if this is a "release" order item.

	@attr parentLineNumber lineNumber of the parent line item in the order.

	@attr itemType Specifies the type of item. Possible values:
		<ul>
		<li>composite - Identifies an item group.</li>
		<li>item - Identifies an independent line item.</li>
		<li>lean - Indicates that no child item is expected for the line.</li>
		</ul>

	@attr requiresServiceEntry This is a flag to indicate if a service entry request is required for this item.

	@attr confirmationDueDate Specifies the date by which the supplier has to respond with a Confirmation to the Purchase Order.

	@attr compositeItemType Specify type of parent line item(lot/box).

	@attr itemClassification Specifies whether the current line item is material or service. Valid values are material and service.

	@attr itemCategory It is for defining how a component or material is procured. Possible values are:
		<ul>
		<li>materialUnknown - Refers to procuring a material without specifying the material number.</li>
		<li>text - Refers to procuring a free-form text item.</li>
		<li>stockTransfer - Refers to transfer of stock from one plant to another.</li>
		<li>materialGroup - Refers to procuring a material without specifying the value or quantity.</li>
		<li>subcontract - Refers to process of procuring a material by providing component information that makes the finished product.</li>
		<li>consignment - Refers to process of managing a material through a special process where the payment to supplier is withheld 
			until the material or service is consumed by the buyer.</li>
		<li>thirdParty - Refers to vendor from which a material is ordered.</li>
		<li>limit - Indicates that there is an expected limit for unplanned services or material covered by this item.</li>
		</ul>

	@attr subcontractingType The buyer's ERP system determines the subcontracting type based on the material provision indicator 
		determined to support the regular subcontracting, Refurbishments or Replacements. Possible values:
		<ul>
		<li>regular - Standard subcontracting scenario.</li>
		<li>refurbWithoutchange - For refurbishment without unchanged material.</li>
		<li>refurbWithChange - For refurbishment with changed material.</li>
		<li>replacement - For replacement of the materials.</li>
		</ul>

     @attr stockTransferType The buyer's ERP system sends the following stock transfer types based on the stock transport order or stock transport release.
	    Possible values:
		<ul>
        <li>intra - Refers to transfer of stock from one plant to another plant with in the same Company code.</li>
        <li>inter - Refers to transfer of stock from one plant to another plant  in different company codes.</li>
		</ul>

	@attr requestedShipmentDate The ship date requested by the buyer for the item

	@attr 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.

	@attr returnAuthorizationNumber Return Authorization Number information for a line item.

	@attr 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.
	
	@attr unlimitedDelivery Set to yes to indicate if the line item supports unlimited quantity deliveries. 
	    Corresponding unlimited delivery tolerance is flagged on the ERP.
		
	@attr isItemChanged Indicate if item has changed.

	@attr isKanban The Kanban Indicator indicates the source of the purchase order item, which is, in case if the Kanban Indicator
        is flagged in the purchase order, the Kanban process. If this is the case the buying company wants to indicate the supplier
        that the Kanban related POs require an in time and 100 % delivery quality.
        
    @attr stoDelivery The delivery options possible for stock transport order item.
        <ul>
        <li>full (default) - Only full delivery allowed for the order. This is specific to stock transport order or stock transport release.</li>
        <li>partial - Partial delivery allowed for the order. This is specific to stock transport order or stock transport release.</li>
        </ul>

    @attr stoOrderCombination When the attribute itemCategory has value "stockTransfer" and the attribute stoOrderCombination is set to "yes", 
		then it is possible to combine items from different stock transport orders with the flag set during ship notice creation. 
		A corresponding flag for order combination is set in the buyer's ERP. This setting is relevant for 
		stock transport orders or stock transport releases.

    @attr stoFinalDelivery When the attribute itemCategory has value 'stockTransfer' and the attribute stoFinalDelivery is set to 'yes',
	    then further ship notice creation is not possible. This setting is relevant for stock transport orders or stock transport releases. 

	@attr operation Defines the action associated with the line item. There is only one possible value:
	<ul>
		<li>delete - Removes the line item.</li>
		<li>block - Blocks the line item.</li>
	</ul>
	
-->
<!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
	itemClassification     %serviceItemType;	#IMPLIED
    itemCategory           (materialUnknown | text | stockTransfer | materialGroup | subcontract | consignment | thirdParty | limit )       #IMPLIED
    subcontractingType (regular | refurbWithoutChange | refurbWithChange | replacement) #IMPLIED
	stockTransferType      (intra | inter)  #IMPLIED
	requestedShipmentDate  %datetime.tz;  #IMPLIED
    isReturn               (yes)          #IMPLIED
    returnAuthorizationNumber %string;    #IMPLIED
    isDeliveryCompleted    (yes)          #IMPLIED
	unlimitedDelivery      (yes)          #IMPLIED   
	isItemChanged          (yes)          #IMPLIED
	isKanban               (yes)          #IMPLIED
    stoDelivery        	   (full | partial) #IMPLIED
    stoOrderCombination    (yes)          #IMPLIED
    stoFinalDelivery       (yes)          #IMPLIED
    operation              (delete | block) #IMPLIED
>

<!--
   Contains information about the indicator of a line item and if it is a warning or an error.
-->
<!ELEMENT Indicator (#PCDATA)> <!-- string -->
<!-- 
    @attr type Name given to indicator. 

    @attr level Defines if the indicator is a warning or error message. 
-->
<!ATTLIST Indicator
    type    %string;         #IMPLIED
    level   (warning | error)   #IMPLIED
>

<!--
    The representation of the release information of a line item.
-->
<!ELEMENT ReleaseInfo (UnitOfMeasure, ShipNoticeReleaseInfo?, Extrinsic*)>
<!--
	@attr releaseType A string value to identify the type of release. Possible values are "jit" (Just-In-Time)
		or "forecast".

	@attr 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

	@attr releaseNumber A string value to identify the release.

	@attr productionGoAheadEndDate Date denoting the end of the production go-ahead period

	@attr materialGoAheadEndDate Date denoting the end of the material go-ahead period (go-ahead for 
		purchase of input materials)
-->
<!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. 
-->
<!ELEMENT ShipNoticeReleaseInfo ((ShipNoticeReference|ShipNoticeIDInfo), UnitOfMeasure)>
<!--
	@attr receivedQuantity Quantity received by the buyer for the referenced ship notice.
-->
<!ATTLIST ShipNoticeReleaseInfo
    receivedQuantity            %r8;              #REQUIRED
>

<!--
    The representation of a line item as it needs to be for sending to a
    buyer.
    Period: The period during which the service item can be performed.
-->
<!ELEMENT ItemIn (ItemID, Path?, ItemDetail, (SupplierID | SupplierList)?,
                  ShipTo?, Shipping?, Tax?, SpendDetail?, Distribution*,
                  Contact*, Comments?, ScheduleLine*, BillTo?, Batch?, Period?,
                  DateInfo*, Extrinsic*)>
<!--
	@attr quantity How many items are desired.

	@attr 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.

	@attr 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.

	@attr lineNumber Position (counting from 1) of this item in an order. Used to maintain a reference between items 
		in create and update OrderRequest documents.

	@attr parentLineNumber Position of the parent line item. Used to create a nesting structure for line items.

	@attr itemType Specifies the type of item. Possible values:
		<ul>
		<li>composite - Identifies an item group.</li>
		<li>item - Identifies an independent line item.</li>
		<li>lean - Indicates that no child item is expected for the line.</li>
		</ul>

	@attr compositeItemType Specify type of parent line item(lot/box).

	@attr itemClassification Specifies whether the current line item is material or service. Valid values are 
		material and service.

	@attr itemCategory Defines how a component or material is procured. Possible values are:
		<ul>
		<li>materialUnknown - Refers to procuring a material without specifying the material number.</li>
		<li>text - Refers to procuring a free-form text item.</li>
		<li>stockTransfer - Refers to transfer of stock from one plant to another.</li>
		<li>materialGroup - Refers to procuring a material without specifying the value or quantity.</li>
		<li>subcontract - Refers to process of procuring a material by providing component information that makes the 
			finished product.</li>
		<li>consignment - Refers to process of managing a material through a special process where the payment to supplier 
			is withheld until the material or service is consumed by the buyer.</li>
		<li>thirdParty - Refers to vendor from which a material is ordered.</li>
		<li>limit - Indicates that there is an expected limit for unplanned services or material covered by this item.</li>
		</ul>
-->
<!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
    itemCategory           (materialUnknown | text | stockTransfer | materialGroup | subcontract | consignment | thirdParty | limit )       #IMPLIED
>

<!--
	Defines SubcontractingComponent information.
	
	ComponentID: An identifier for a subcontracting component within the procurement process

	UnitOfMeasure: Unit of measure code.

	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, and so on)

	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, and so on.)

	SubcontractingComponentIndustry: Contains industry-specific information for SubcontractingComponent.
-->
<!ELEMENT SubcontractingComponent (ComponentID, UnitOfMeasure, Description?, Product?, ProductRevisionID?, Batch?, SubcontractingComponentIndustry?)>
<!--
	@attr quantity Quantity of the subcontracting component required to produce the finished goods in a unit of measurement.

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

	@attr materialProvisionIndicator The material provision indicator (MPI) is used to identify the subcontracting 
		type of a part for the components.
-->
<!ATTLIST SubcontractingComponent
	quantity          	%r8;           		#REQUIRED
	requirementDate  	%datetime.tz;  		#IMPLIED
	materialProvisionIndicator (reworkTo | reworkFrom | regular) #IMPLIED
>

<!--
    Defines Schedule Line information.
	
    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

    ScheduleLineIndustry: Contains industry-specific information for the schedule line.
-->
<!ELEMENT ScheduleLine (UnitOfMeasure, ScheduleLineReleaseInfo?, SubcontractingComponent*, ShipTo?, ScheduleLineIndustry?, Extrinsic*)>
<!--
	@attr quantity Quantity of items to be shipped for this schedule line. 

	@attr requestedDeliveryDate Date that the specified quantity is expected to be delivered. 

	@attr lineNumber Line identifier for a specific schedule line.

	@attr deliveryWindow Duration of time in which the quantity is expected to be delivered.

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

	@attr originalRequestedDeliveryDate The Original Date that the specified quantity is expected to be delivered. 
		This Date is not subject to changes
	
	@attr type Defines the schedule line type when the OrderRequest is a Schedule Agreement Release. Informative only. Possible values:
	<ul>
	<li>backlog - means that the schedule line has a delivery date that lies in the past.</li>
	<li>immediate - means that the schedule line has the delivery date 'today'.</li>
	<li>forecast - means that the schedule line has a delivery date in the future.</li>
	</ul>
-->
<!ATTLIST ScheduleLine
    quantity               %r8;           #REQUIRED
    requestedDeliveryDate  %datetime.tz;  #REQUIRED
	lineNumber  		   %uint;  		  #IMPLIED
	deliveryWindow         %duration;     #IMPLIED
	requestedShipmentDate  %datetime.tz;  #IMPLIED
	originalRequestedDeliveryDate    %datetime.tz;  #IMPLIED
	type                   (backlog | immediate | forecast) #IMPLIED
>

<!--   
    Schedule line industry-specific information. 
    
    ScheduleLineAerospaceAndDefense: schedule line-level Aerospace & Defense industry information, if applicable.

-->
<!ELEMENT ScheduleLineIndustry (ScheduleLineAerospaceAndDefense?)>

<!--
    Aerospace and Defense industry item information

    DPAS: Detailed allocation information of this schedule line in a DPAS-rated order.
          This includes: rating, contract, and quantity information for this schedule line.
-->
<!ELEMENT ScheduleLineAerospaceAndDefense (DPAS*)>
<!--
    @attr dpasRating    Top-level DPAS rating for this schedule line
-->
<!ATTLIST ScheduleLineAerospaceAndDefense
    dpasRating  (DO | DX)       #IMPLIED
>

<!--
    Defines release information on schedule line.
-->
<!ELEMENT ScheduleLineReleaseInfo (UnitOfMeasure)>
<!--
	@attr commitmentCode String value to identify the type of the delivery. Possible values:
		<ul>
		<li>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.</li>
		<li>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.</li>
		<li>forecast - Informational. Customer can change the schedule line without incurring any liabilities with the 
			vendor.</li>
		</ul>

	@attr cumulativeScheduledQuantity Total quantity to be shipped for a particular line item up through the schedule line.

	@attr 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.
-->
<!ATTLIST ScheduleLineReleaseInfo
    commitmentCode              (firm | tradeoff | forecast)  #REQUIRED
    cumulativeScheduledQuantity %r8;                          #REQUIRED
    receivedQuantity %r8;                                     #IMPLIED 
>

<!--
    StatusUpdate for Confirmation (type=RequestToPay) request.
-->
<!ELEMENT PaymentStatus (PCard, Total, Shipping?, Tax?, Extrinsic*)>
<!--
	@attr orderID Identifies the referenced order. It is copied from the ConfirmationRequest or the OrderRequest.

	@attr transactionTimestamp Time when the XMLPay transaction was submitted.

	@attr type Specifies the type of PCard transaction (enumeration). Possible values:
		<ul>
		<li>Authorization - Authorizes the PCard. No charge is made. There is one authorization per order.</li>
		<li>Settlement - Transfers the funds secured by a previous authorization transaction.</li>
		<li>Sale - Initiates a charge to the PCard.</li>
		<li>Credit - Initiates a credit against the original charge. Compensates for an order that did not meet 
			buyer expectations, to make adjustments to an account that was overcharged, or to credit an 
			account for items returned by a buyer.</li>
		</ul>

	@attr transactionID An identifier assigned to the transaction by the payment processing gateway.

	@attr authorizationID The authorization code for the transaction provided by the bank.

	@attr isFailed Set to "yes" to indicate a failed transaction.
-->
<!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.
-->
<!ELEMENT InvoiceStatus (InvoiceIDInfo?, PartialAmount?, Comments*)>
<!--
	@attr type Type of the invoice status (enumeration). Possible values: 
		<ul>
		<li>processing - The invoice is received and being processed.</li>
		<li>canceled - The invoice has been canceled.</li>
		<li>reconciled - The invoice is reconciled.</li> 
		<li>rejected - The invoice is rejected.</li>
		<li>paying - The invoice is being paid.</li> 
		<li>paid - The InvoiceDetail request is paid.</li>
		</ul>
	@attr paymentNetDueDate The Date after which the invoice has to be paid without any discount.
-->
<!ATTLIST InvoiceStatus
	type	(processing | canceled | reconciled | rejected | paying | paid) #REQUIRED
	paymentNetDueDate  		  %datetime.tz;  #IMPLIED
>
	
<!-- 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.
	
    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 up to 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.
    
	LegalEntity and OrganizationalUnit: Intended to include
		the company code and purchasing organization, respectively.
	
    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.

    DocumentReference: Only needed 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, BusinessPartner*, LegalEntity?,
                              OrganizationalUnit*, Shipping?, Tax?,
                              Payment?, PaymentTerm*, Contact*, Comments*, Followup?, ControlKeys?,
                              DocumentReference?, SupplierOrderInfo?,  TermsOfDelivery?,
                              DeliveryPeriod?, IdReference*, OrderRequestHeaderIndustry?, Extrinsic*)>
<!--
	@attr orderID The buyer system orderID for this request. This is an internal Buyer unique number.

	@attr 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...).

	@attr 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.

	@attr orderDate The date and time the order request was created.

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

	@attr 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.

	@attr 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"?).

	@attr orderType A "release" order type indicates that this is a Release Order from an existing Master Agreement/Contract. 
		Default is regular. Type "blanket" indicate that this order is a Blanket Order. Type "stockTransport" indicates
		that this order is a stock transport order. Type "stockTransportRelease" indicates that this order is a stock transport 
		schedule agreement release (SAR).

	@attr releaseRequired Set to "yes" if the blanket order allows released. Currently used only if orderType is "blanket".

	@attr 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.

	@attr expirationDate Date the order is no longer available. If not defined, end date is open ended. Currently only 
		used with blanket orders.

	@attr 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.

	@attr agreementPayloadID Optional PayloadID for the corresponding Master Agreement.

	@attr 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.

	@attr parentAgreementPayloadID Optional PayloadID for the corresponding Master Agreement.

	@attr pickUpDate Specifies the date when the goods can be/will be provided for picking up and delivery

	@attr requestedDeliveryDate The requested delivery date reflects the time when the buyer is willing to receive the goods.
    
    @attr isSTOOutbound Set to "yes" to indicate that this OrderRequest is used to send the stock to the supplier. 
		The goods are sent from the buyer plant to the supplier plant. This is currently relevant only for the stock transport order scenario.
-->
<!ATTLIST OrderRequestHeader
    orderID    %string;        #REQUIRED
    orderDate  %datetime.tz;   #REQUIRED
    orderType  (release| regular | blanket | stockTransport | stockTransportRelease) "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
    isSTOOutbound  	(yes)      #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.

   Note: Use "Contact" element to supply any additional Address or Location information.
-->
<!ELEMENT  MasterAgreementRequestHeader (MaxAmount?, MinAmount?, 
					 MaxReleaseAmount?, MinReleaseAmount?, 
					 Contact*,Comments?, DocumentReference?,  Extrinsic*)> 
<!--
	@attr agreementID The buyer system agreementID for this request. the Master Agreement Number in Buyer.

	@attr agreementDate The date and time the agreement request was created. This is different from the 
		effective and expiry date of the agreement.

	@attr type Identifies the type of agreement (enumeration). Possible values:
		<ul>
		<li>value (default) - Value-based agreement.</li>
		<li>quantity - Quantity-based agreement.</li>
		</ul>

	@attr effectiveDate Date the Master Agreement is available for ordering/releases.

	@attr expirationDate Date the Master Agreement is no longer available.

	@attr parentAgreementPayloadID PayloadID for the corresponding parent document that this agreement is derived from.

	@attr operation Type of operation to perform (enumeration). Possible values:
		<ul>
		<li>delete - Cancels an existing Master Agreement, the assumption here is that the 
			delete request will be an exact replica of the original request.</li>
		<li>new - Identifies a new MasterAgreement transaction.</li>
		<li>update - Identifies an update to an existing transaction. The DocumentReference 
			attribute should be used to indicate the Original Document information.</li>
		</ul>
-->
<!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.

    Notes:
		<ul>
		<li>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.</li>
		<li>The quantity attribute in the ItemOut tag should be set to one and ignored at 
			the Master Agreement implementation processing stage.</li>
		<li>The MaxReleaseAmount/Quantity and MinReleaseAmount/Quantity at an item level 
			indicate the ItemLevel amounts and quantities per release.</li>
		</ul>
-->
<!ELEMENT AgreementItemOut (MaxAmount?, MinAmount?, MaxReleaseAmount?, MinReleaseAmount?, ItemOut)>
<!--
    @attr maxQuantity Maximum quantity for this particular line item.
	
    @attr minQuantity Minimum quantity for this particular line item.
	
    @attr maxReleaseQuantity Maximum quantity per release for this particular line item.
	
    @attr minReleaseQuantity Minimum quantity per release for this particular line item.
-->
<!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 -->

<!-- 
	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 a purchase requisition. This is the data that is sent from the buyer
    to another buyer system.
-->
<!ELEMENT PurchaseRequisitionRequest (PurchaseRequisition)>

<!-- 
	Contains details of a purchase requisition.
	
	PurchaseRequistionHeader: Header element for the purchase requisition.
	
	ItemIn: Represents an item added from a shopping basket to a requisition 
		in the procurement application.
-->
<!ELEMENT PurchaseRequisition (PurchaseRequisitionHeader, ItemIn*)>

<!--
    Header of a purchase requisition. 
       
    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*)>
<!--
    @attr requisitionID The buyer system requisitionID for this request. This is an internal
        Buyer unique number.

    @attr requisitionDate The date and time the Requisition request was created.

    @attr type The type of the requisition request (enumeration). Defaults to "new".

    @attr 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, and so on).
-->
<!ATTLIST PurchaseRequisitionHeader
   requisitionID %string;        #IMPLIED
   requisitionDate %datetime.tz;   #IMPLIED
   type       (new | update | delete)  "new"
   requisitionVersion %number;      #IMPLIED
>

<!--
	To initiate a PunchOut session, the user selects the supplier's PunchOut item. The procurement application generates a
	PunchOutSetupRequest document and sends it to a network hub, which forwards it to the supplier's PunchOut website.
-->
<!ELEMENT PunchOutSetupRequest (BuyerCookie, Extrinsic*, BrowserFormPost?,
                                Contact*, SupplierSetup?, ShipTo?,
                                SelectedItem?, ItemOut*)>
<!--
	@attr operation Specifies the type of session the buyer initiates (enumeration). Possible values:
		<ul>
		<li>create - Generate new shopping carts, which correspond to new purchase requisitions.</li>
		<li>inspect - Reopen previously created shopping carts or RFQs for viewing only. The procurement 
			application sends line-item data as part of the PunchOutSetupRequest. However, after 
			re-instantiating the shopping cart, the PunchOut website does not allow modification 
			of its contents.</li>
		<li>edit - Reopen previously created shopping carts or RFQs for modification. The procurement 
			application sends line-item data as part of the PunchOutSetupRequest. The PunchOut website 
			can use this data to re-instantiate the shopping cart created during the original session.</li>
		<li>source - Generate a RFQ for a sourcing application.</li>
		</ul>
-->
<!ATTLIST PunchOutSetupRequest
    operation  (create | inspect | edit | source)  #REQUIRED
>

<!--
	Transmits information that is opaque to the remote website, but it must be returned to the originator for all subsequent 
	PunchOut operations. This element allows the procurement application to match multiple outstanding PunchOut requests. 
	BuyerCookie is unique per PunchOut session.
-->
<!ELEMENT BuyerCookie ANY> <!-- any valid XML data -->

<!--
	Allows suppliers to specify PunchOut for an entire store or any subset of product offerings. Suppliers can create their 
	catalogs so that SelectedItem leads to store-, aisle-, or product-level PunchOut. Procurement applications can include 
	the SelectedItem element in PunchOutSetupRequest documents, and PunchOut sites can use it to determine which products to 
	display to users. The more specific the item is in the catalog, the less searching users have to do at the supplier's 
	website. If there is no SelectedItem, suppliers should present their entire (store-level) product offerings.
-->
<!ELEMENT SelectedItem (ItemID)>

<!--
	Specifies the URL to which to post the PunchOutSetupRequest. This element is not needed if the network hub 
	knows the supplier’s PunchOut URL.
-->
<!ELEMENT SupplierSetup (URL)>

<!--
	After receiving a PunchOutSetupRequest, the supplier’s website sends a PunchOutSetupResponse. The PunchOutSetupResponse 
	document serves two functions:
	<ul>
	<li>It indicates that the PunchOutSetupRequest was successful.</li>
	<li>It provides the procurement application with a redirect URL to the supplier’s Start Page.</li>
	</ul>
-->
<!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.
-->
<!ELEMENT PunchOutOrderMessageHeader (SourcingStatus?, Total, ShipTo?, Shipping?, Tax?, SupplierOrderInfo?)>
<!--
     @attr 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.

     @attr quoteStatus "pending"  - Identifies that the transaction is still pending
	  "final" - Identifies that the transaction is complete
-->
<!ATTLIST PunchOutOrderMessageHeader
    operationAllowed  (create | inspect | edit)  #REQUIRED
    quoteStatus (pending|final) "final"
>

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

<!--
    cXML statuses
-->
<!ENTITY % cxml.statuses  "(PaymentStatus |
			    SourcingStatus | InvoiceStatus | DocumentStatus | IntegrationStatus)">

<!--
    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.
	
	Status: Status of the Response or Message.
-->
<!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.
-->
<!ELEMENT DocumentStatus (DocumentInfo?, ItemStatus*, Comments*)>
<!--
    @attr type Type of the document status. The possible values depend on the network hub and the type of document being updated.
-->
<!ATTLIST DocumentStatus
        type              %string;               #REQUIRED
        >

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

  ReferenceDocumentInfo: Contains details of referenced document.
		
  Comments: May be used to have a more user readable description of the code.
-->
<!ELEMENT ItemStatus (ReferenceDocumentInfo, Comments*)>
<!--
	@attr type Specifies which kind of status that item should have. Possible values are:
		<ul>
		<li>rejected - The item was not accepted.</li>
		<li>accepted - Original ConfirmationItem is accepted as it was sent.</li>
		</ul>

  @attr code Optional code from the backend ERP system.
  
  @attr parentLineNumber Represents the line number of its parent line number to identify this 
		item's hierarchical parent item in a response message. 
-->
<!ATTLIST ItemStatus
	type        %string;  #REQUIRED
	code        %string;  #IMPLIED
	parentLineNumber       %uint;         #IMPLIED
>

<!--
    Defines the ID of a document known to the system.
-->
<!ELEMENT DocumentInfo EMPTY>
<!--
    @attr documentID The id of a document known to the system.

    @attr documentType The document type.

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

<!--
    A hint to the way to follow up on a QuoteMessage or ContractRequest. 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" or "value".
    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.
-->
<!ELEMENT FollowUpDocument EMPTY>
<!--
    @attr type Follow up type such as "Contract", "Scheduling Agreement", and so on.

    @attr category Follow up category such as "WK", "value", and so on.
-->
<!ATTLIST FollowUpDocument
    type          %string;  #IMPLIED
    category      %string;  #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)>

<!--
    @attr processingMode Specifies whether the cXML document is meant for processing, 
		information only, or copy:
	<ul>
    <li>info - The cXML document is for information only.</li>
    <li>process - The recipient of the cXML document should process the document.</li>
    <li>copy - The cXML document is a copy as a result of Path element with copy type 
		in the source document.</li>
	</ul>
-->
<!ATTLIST CopyRequest
    processingMode (info | process | copy)  #IMPLIED>

<!--
    Status for a pre-existing sourcing transaction. The textual content indicates
    the display information. 
-->
<!ELEMENT SourcingStatus (#PCDATA)>
<!--
    @attr action Defines the context of this message based on the value. Possible values:
		<ul>
		<li>approve - Approve the pending transaction.</li>
		<li>deny - Deny pending transaction.</li>
		<li>cancel - Cancel any preexisting transaction.</li>
		</ul>
	
	@attr xml:lang The locale used for all free text sent within this document. The receiver 
		should reply or display information in the same or a similar locale.
-->
<!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.
-->
<!ELEMENT IntegrationStatus (IntegrationMessage?)>
<!--
	@attr documentStatus Indicates document status (enumeration). Possible values:
		<ul>
		<li>deliverySuccessful - The document was successfully delivered to the customer (but 
			no processing confirmation has been issued yet).</li>
		<li>deliveryDelayed - The document is experiencing delays while trying to reach the 
			customer.</li>
		<li>deliveryFailed - The document could not be sent to the customer due to a failure 
			between the gateway and the customer.</li>
		<li>deliveryReady - When sending to the buyer, the document has been queued and is 
			ready for pick-up.</li>
		<li>customerConfirmed - The customer has confirmed that the document has been processed 
			successfully.</li>
		<li>customerReceived - The customer has confirmed that the document has been received 
			successfully.</li>
		<li>customerFailed - The customer has received the document and is reporting a failure 
			in the content.</li>
		</ul>
-->
<!ATTLIST IntegrationStatus
	documentStatus     (deliverySuccessful | deliveryDelayed | deliveryFailed | deliveryReady
	| customerConfirmed | customerReceived | customerFailed)        #REQUIRED>

<!--
	IntegrationMessage indicates the type/result of the message used by
	external parties.	
-->
<!ELEMENT IntegrationMessage (#PCDATA)>
<!--
	@attr isSuccessful Indicates whether the message result is successful or not.
	
	@attr type Indicates the message type, for example, 997/824/MDN.
-->
<!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&#064;role attribute value) must not appear more than once within a
    Route element.
-->
<!ELEMENT Route (#PCDATA | Contact)* >
<!--
    @attr method Qualifier identifying the transportation type code:
		<ul>
		<li>ship - transportation by boat (ocean).</li>
		<li>rail - transportation by rail</li>
		<li>motor - transportation by land motor craft (common carrier)</li>
		<li>air - transportation by flight</li>
		<li>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</li>
		<li>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.)</li>
		<li>fixedTransport - This code applies to installations for continuous
			transport such as pipelines, ropeways and electric power lines.</li>
		<li>inlandWater - This code is used only in such cases where the
			application of waterborne transport is reported separately
			than maritime transport.</li>
		<li>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.</li>
		<li>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.</li>
		</ul>
	
	@attr 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:
		<ul>
		<li>cargoVessel - Vessel designed to carry general cargo.</li>
		<li>unitCarrier - Vessel designed to carry unit loads.</li>
		<li>bulkCarrier - Vessel designed to carry bulk cargo.</li>
		<li>tanker - Vessel solely equipped with tanks to carry cargo.</li>
		<li>liquefiedGasTanker - Tanker designed to carry liquefied gas.</li>
		<li>otherSpecialTanker - Tanker designed to carry other special liquids.</li>
		<li>cargoAndPassengerVessel - Vessel designed to carry cargo and passengers.</li>
		<li>otherVessel - Sea-going vessel, not otherwise specified.</li>
		<li>fishingBoat - Vessel designed for fishing.</li>
		<li>floatingStructure - Any floating structure.</li>
		</ul>
		
		When the value of method is "rail", the possible values of means are:
		<ul>
		<li>train - One or more rail wagons pulled or pushed by one or more
				locomotive units, or self-propelled, that move over rail tracks.</li>
		<li>freightTrain - Train for carrying freight.</li>
		</ul>
		
		When the value of method is "motor", the possible values of means are:
		<ul>
		<li>truck - Automotive vehicle designed for hauling loads.</li>
		<li>tractor - Automotive vehicle with an engine designed for pulling.</li>
		<li>van - Closed automotive vehicle designed for carrying freight.</li>
		<li>carCarrier - Automotive vehicle designed for carrying motorcars.</li>
		<li>shovelLoader - Automotive vehicle designed for shoveling sand and other bulk material.</li>
		<li>straddleCarrier - Automotive vehicle designed for lifting and transporting containers.</li>
		<li>mobileCrane - Automotive vehicle with cargo crane.</li>
		<li>bus - Automotive vehicle designed for carrying more than 8 passengers including the
				driver.</li>
		<li>car - Automotive vehicle designed to carry a small number of passengers.</li>
		<li>taxi - Automotive vehicle licensed to ply for hire.</li>
		</ul>
		
		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:
		<ul>
		<li>unknown - Fixed transport installation of unknown type.</li>
		<li>pipeline - A line of one or more pipes for continuous transport of
				liquid or gas commodity.</li>
		<li>powerline - A line of one or more cables or wires for continuous
				transport of electricity.</li>
		</ul>
				
		When the value of method is "inlandWater", the possible values of means are:
		<ul>
		<li>unknownVessel - Vessel of unknown type.</li>
		<li>motorFreighter - Motorized vessel designed for carrying general cargo.</li>
		<li>motorTanker - Motorized vessel designed for carrying liquid cargo.</li>
		<li>containerVessel - Vessel designed for carrying containers.</li>
		<li>gasTanker - Vessel with tanks designed for carrying gas</li>
		<li>tug - Vessel designed to push or pull another vessel.</li>
		<li>barge - Lighter designed for carrying general cargo.</li>
		<li>pushTow - Vessel designed for pushing/towing, facilitating the movement
				of one or more cargo barges.</li>
		<li>fishingBoat - Vessel designed for fishing.</li>
		<li>bunkerShip - Vessel designed for carrying and delivering bunkers.</li>
		</ul>

		When the value of method is either "mail" or "unknown", there are no
		specific values of means defined.
		
    @attr startDate The date and time this shipment started this part of the trip.
        Required in all Route elements after the first.

    @attr 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.
-->
<!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.
    
    #PCDATA:  Free text description of means of transportation. The text desription must be
        provided if the value "Other" is specified.
-->
<!ELEMENT TransportTerms (#PCDATA)>
<!--
    @attr value The terms of transportation. Typically this may be "Free-Carrier", "CostAndFreight", "DeliveredAtFrontier", 
		and so on, or an option to specify a free text. If the value of this attribute is specified as "other", specifying
        a description is required.
-->
<!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 required for 
    specifying terms of delivery.

    #PCDATA: Free text description of shipping payment method. The text description must be
        provided if the value "Other" is specified.
-->
<!ELEMENT ShippingPaymentMethod (#PCDATA)>
<!--
    @attr value The shipping payment method used for the order. Possible values:
        Account, AdvanceCollect, AdvancePrepaid, Other, and so on.
-->
<!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.
    
    #PCDATA: Free text description of terms of delivery code. The text description must be
        provided if the value "Other" is specified.
-->
<!ELEMENT TermsOfDeliveryCode (#PCDATA)>
<!--
    @attr 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 required. Possible values include the following -
        PriceCondition, DespatchCondition, PriceandDespatchCondition, CollectedByCustomer, 
        TransportCondition, DeliveryCondition, Other, and so on.
-->
<!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, and so on.

    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:
		<ul>
        <li>Type "Transport" - Additional description of the transport. Examples include:
            "Delivered To Site / Stores", "OVERNIGHT FIRST CLASS", "To Be Collected by Courier",
			and so on.</li>
		<li>Type "TermsOfDelivery" - Additional delivery instructions can be provided along with
            the other terms.</li>
		</ul>
-->
<!ELEMENT TermsOfDelivery (TermsOfDeliveryCode, ShippingPaymentMethod, TransportTerms?, Address?, Comments*)>

<!--
	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)>
<!--
	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)>
<!--
	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 permanent 
	(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 permanent (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:
		<ul>
		<li>salesOrder - Refers to sales order triggering the PO.</li>
		<li>customerOrder - Refers to the customer order maintained in sales order.</li>
		<li>freightOrder - Refers to order for transportation.</li>
		<li>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.</li>
		<li>purchaseOrder - Refers to Orders used to replenish based on Supplier Managed Inventory process.</li>
		</ul>
	
	DocumentReference: Reference to an earlier document (for example, OrderRequest). 

	DateInfo: Information of date associated with the document/item. Following are the possible dates:
		<ul>
		<li>expectecDeliveryDate - Refers to the expected delivery date for the material to be received at the 
			partner location.
		<li>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.</li>
		<li>productionStartDate - Refers to the production start date.</li>
		<li>productionFinishDate - Refers to the production finish date.</li>
		</ul>

	Contact: It is used for contact information for the referenced document
-->
<!ELEMENT ReferenceDocumentInfo ((DocumentInfo | DocumentReference)?, DateInfo*, Contact*, Extrinsic*)>
<!--
	@attr lineNumber Line number of an item in the referenced document.

    @attr scheduleLineNumber Schedule line number of a schedule item in the referenced lineNumber, if this 
		attribute has a value, the lineNumber attribute is required. 

	@attr status Status used to refer to the referenced document.
-->
<!ATTLIST ReferenceDocumentInfo
	lineNumber          %uint;      #IMPLIED
    scheduleLineNumber  %uint;      #IMPLIED
	status (created | released | open | completed | closed | cancelled )     #IMPLIED                       
>

<!--
	Contains date information.
-->
<!ELEMENT DateInfo (Extrinsic*)>
<!--
	@attr type Date type. Possible values:
		<ul>
		<li>expectedShipmentDate - The expected ship date for the material is
			used to determine when the supplier is expected to ship the material
			from their location.</li>
		<li>productionStartDate - The production start date.</li>
		<li>productionFinishDate - The production finish date.</li>
		<li>requestedPickUpDate - The pick up date as requested by the party
			arranging the transport.</li>
		<li>expectedPickUpDate - The date when the logistic provider expects to
			pick up the materials.</li>
		<li>actualPickUpDate - The actual pick up date, as it has occurred.</li>		
		<li>requestedDeliveryDate - The delivery date as requested by the party
			arranging the transport.</li>
		<li>expectedDeliveryDate - The expected delivery date for the material
			to be received at the partner location.</li>
		<li>actualDeliveryDate - The actual delivery date of the goods..</li>
		<li>confirmedDeliveryDate - The delivery date that has been confirmed
			to be delivered by the seller.</li>
		<li>confirmedShipmentDate - The shipment date that has been confirmed by
			to be shipped by seller.</li>
		</ul>
	
	@attr date Date value.
-->
<!ATTLIST DateInfo
	type	(expectedShipmentDate | productionStartDate | productionFinishDate |
				requestedPickUpDate | expectedPickUpDate | actualPickUpDate | 
				requestedDeliveryDate | expectedDeliveryDate | actualDeliveryDate |
				confirmedShipmentDate | confirmedDeliveryDate)	#REQUIRED
	date	%datetime.tz;				#REQUIRED
>

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

	Description: Description for priority (such as very high, high, medium, medium low, low).
-->
<!ELEMENT Priority (Description?)>
<!--
	@attr level There are 5 levels (1, 2, 3, 4, 5). Level 1 has the highest priority. Level 5 has the lowest priority.
	 
	@attr 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.
	
	@attr inventory_level Inventory level shows the \% inventory (buffer) level with respect to target. 
		Possible values: 0.0\% - 100.0\%.
-->
<!ATTLIST Priority
  level           ( 1 | 2 | 3 | 4 | 5  )  #REQUIRED
  sequence        %ui8;                   #IMPLIED
  inventory_level %r8;                    #IMPLIED
>

<!--
	Contains information about a document managed in an external system, such as an ERP. It can be sent with an 
	order to distinguish different business transactions uniquely.

    For example,
	%
    <ExternalDocumentType documentType="ZNB">
        <Description xml:lang="en">Standard Purchase Order</Description>
    </ExternalDocumentType>
	%
-->
<!ELEMENT ExternalDocumentType (Description?)>
<!--
	@attr documentType Specifies the document type from the external system.
-->
<!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

    QualityInfo: The representation of the quality information for the entire OrderRequest.
	
	AssetInfo: Provides detailed per-unit asset information for a line item.
	
	LifeSciences: Provides life sciences industry specific detail.
	
	DPAS: Header-level DPAS-rating info for this order, if applicable.
	
	AuthorizationLabels: ABAC labels for configuring access to this document.

	AerospaceAndDefense: Provides Aerospace and Defense industry information for the entire OrderRequest.
-->
<!ELEMENT OrderRequestHeaderIndustry (ReferenceDocumentInfo*, Priority?, ExternalDocumentType?, QualityInfo?, AssetInfo*, LifeSciences?, DPAS?, AuthorizationLabels?, AerospaceAndDefense?)>
<!--  
    @attr industryType is used to identify the industry for which the document is being sent.
    <ul>
    	<li>lifeSciences</li>
    	<li>aerospaceAndDefense</li>
    </ul>	
-->
<!ATTLIST OrderRequestHeaderIndustry
    industryType	 (lifeSciences | aerospaceAndDefense)	#IMPLIED
>

<!--

	Life sciences industry header information.

-->

<!ELEMENT LifeSciences EMPTY >

<!--
	@attr orderCategory To specify different order categories for clinical trials. Following are possible order categories:
	<ul>
		<li>clinicalFinishedGoodsOrder – Order for clinical finished goods</li>
		<li>labelPrintingOrder – Order for label printing</li>
		<li>reworkOrder – Order for rework</li>
		<li>shelfLifeExtensionRelabelOrder – Order for shelf-life extension relabeling</li>
		<li>additionalLabelPrintingOrder – Order for printing additional labels</li>
	</ul>
-->

<!ATTLIST LifeSciences

orderCategory ( clinicalFinishedGoodsOrder | labelPrintingOrder | reworkOrder | shelfLifeExtensionRelabelOrder | additionalLabelPrintingOrder ) #IMPLIED

>

<!--   
	Industry specific item information. 
	
	ReferenceDocumentInfo: 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.
    
    SerialNumberInfo: The representation of the required serial number information of a line item.
	
	AssetInfo: Provides detailed per-unit asset information for a line item.
    
    PackagingDistribution: Provides packaging distribution information between stores.
    
    ItemOutAerospaceAndDefense: Item-level Aerospace & Defense industry information, if applicable.
-->
<!ELEMENT ItemOutIndustry (ItemOutRetail?, ReferenceDocumentInfo*, Priority?, QualityInfo?, SerialNumberInfo?, BatchInfo?, 
AssetInfo*, PackagingDistribution*, ItemOutLifeSciences?, ItemOutAerospaceAndDefense?)>
<!--
	@attr planningType To specify different production planning strategies. Following are possible strategies:
	<ul>
	<li>MTO - Make to Order</li>
	<li>MTS - Make to Stock</li>
	<li>ATO - Assemble to Order</li>
	<li>CTO - Configure to Order</li>
	</ul>
	
	@attr requiresRealTimeConsumption Set to "yes" to indicate that a real time consumption is required for this item. 
    
    @attr isHUMandatory Set to "yes" to indicate that a handling unit is required for this item. A handling unit is 
		a physical unit consisting of packaging materials (load carriers/packing material) and the goods contained 
		on or in it.
-->
<!ATTLIST ItemOutIndustry
    planningType	 ( MTO | MTS | ATO | CTO )	#IMPLIED
    requiresRealTimeConsumption   (yes)         #IMPLIED
    isHUMandatory                 (yes)		    #IMPLIED
>

<!--
    Aerospace and Defense industry item information

    DPAS: Detailed allocation information of this line item in a DPAS-rated order.
          This includes: rating, contract, and quantity information for this line item.
 -->
<!ELEMENT ItemOutAerospaceAndDefense (DPAS*)>
<!--
    @attr dpasRating    Top-level DPAS rating for this item
-->
<!ATTLIST ItemOutAerospaceAndDefense
    dpasRating  (DO | DX)       #IMPLIED
>


<!--  
	Retail 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&#064;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.
	
	AssetInfo: The list of asset information of the packaging.

	PackagingIndustry: An element for industry relevant information.
    
    StoreCode: The code of the store assigned for this packaging.
-->
<!ELEMENT Packaging (((PackagingCode+, Dimension*) | Dimension+), Description?, 
				PackagingLevelCode?, PackageTypeCodeIdentifierCode?, ShippingContainerSerialCode?, 
                ShippingContainerSerialCodeReference?,
				PackageID?, ShippingMark*, OrderedQuantity?, DispatchQuantity?, 
				FreeGoodsQuantity?, QuantityVarianceNote?, BestBeforeDate?, AssetInfo*, PackagingIndustry?, StoreCode?, 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).
-->
<!ELEMENT PackagingCode (#PCDATA)>             <!-- string -->
<!--
    @attr xml:lang The language or locale in which the PackagingCode content (the
        value of the code) is written.
-->
<!ATTLIST PackagingCode
    xml:lang             %xmlLangCode;         #REQUIRED
>

<!--
    A single dimension for the packaging. It also can be used to define item dimensions.
-->
<!ELEMENT Dimension (UnitOfMeasure)>
<!--
    @attr quantity Size in this dimension. Expressed in the units given in the UnitOfMeasure element.

    @attr type Type of dimension. Possible values:
        <ul>
		<li>length - The length of the packaging or item.</li>
        <li>width - The width of the packaging or item.</li>
        <li>height - The height of the packaging or item.</li>
        <li>weight - The weight  or net weight of the packaging or item.</li>
        <li>volume - The volume or net volume of the packaging or item.</li>
        <li>stackHeight - The stack height of packaging. This indicates total height of the stacked packages.</li> 
        <li>grossWeight - The gross weight is the total weight including packaging.</li>
        <li>grossVolume - The gross volume is the total volume including packaging. </li>
        <li>unitGrossWeight - The unit gross weight of the item.</li>
        <li>unitNetWeight - The unit net weight of the item.</li>
		</ul>
-->
<!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)>

<!-- 
	Provides 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)>

<!--
	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?)>

<!-- 
	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)>


<!-- 
	Specifies the number of items/products for a given line item in a purchase order. 
-->
<!ELEMENT OrderedQuantity (UnitOfMeasure?) >
<!--
	@attr quantity The number of items ordered.
-->
<!ATTLIST OrderedQuantity
    quantity	%r8;	#IMPLIED>

<!-- 
	Specifies the delivered quantity (compared to the ordered quantity). This is useful in 
	determining the correctness of any shipment. 
-->
<!ELEMENT DispatchQuantity (UnitOfMeasure?)  >
<!--
	@attr quantity The number of items delivered.
-->
<!ATTLIST DispatchQuantity
    quantity        %r8;       #IMPLIED>

<!--  
	Specifies the quantity that will be delivered without any cost to the buyer. For example, 
	samples, redemptions, promotions, fill-ups, and so on. These do not appear on the commercial 
	invoice or marked with value 0.00.  
-->
<!ELEMENT FreeGoodsQuantity (UnitOfMeasure?)  >
<!--
	@attr quantity The number of free items.
-->
<!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, and so on.
-->
<!ELEMENT BestBeforeDate EMPTY>
<!--
	@attr date Best before date.
-->
<!ATTLIST BestBeforeDate
      date         %datetime.tz;    #REQUIRED>
      
<!-- 
	The expiry date  can be used to indicate expiry date for all goods related to food, drugs, 
	chemicals, and so on. 
-->
<!ELEMENT ExpiryDate EMPTY>
<!-- 
	@attr date Expiration date.
-->
<!ATTLIST ExpiryDate
      date         %datetime.tz;    #REQUIRED>

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

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

    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".
 
    CertificateInfo: Use this element to send a certificate information, here you can declare a certificate as 
		optional or required. Each element supports one certificate. 
-->
<!ELEMENT QualityInfo (IdReference* | CertificateInfo*)>
<!--
    @attr requiresQualityProcess A value of yes indicates that this item requires quality process.
-->
<!ATTLIST QualityInfo
	requiresQualityProcess         (yes)          #IMPLIED
>

<!--
    Control whether the batch information is required or not for an item when Supplier
	creates an order response.
-->
<!ELEMENT BatchInfo EMPTY >
<!--
    @attr requiresBatch A value of "yes" indicates that this item requires Batch number to be provided by 
		the supplier in Batch element in ShipNoticeItem/ConfirmationStatus element of the corresponding 
		ShipNoticeRequest/ConfirmationRequest documents.     
-->
<!ATTLIST BatchInfo
	requiresBatch        (yes)                      #IMPLIED
>

<!--
    The representation of a certificate information.
    
    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 CertificateInfo (IdReference)>
<!--
    @attr isRequired A value of "yes" indicates that this certificate is required.
-->
<!ATTLIST CertificateInfo
	isRequired         (yes)          #IMPLIED
>

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

    @attr shipNoticeLineNumber The line number of current line item, copied from ShipNoticeRequest. 
-->
<!ATTLIST ShipNoticeLineItemReference
    shipNoticeLineNumber      %uint;                 #REQUIRED
>

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

    SerialNumber: List of serial numbers, this is required when SerialNumberInfo&#064;type is "list".

    PropertyValue: When SerialNumberInfo&#064;type is "range" a minimum and maximum acceptable
        limits should be provided in PropertyValue element, in this case PropertyValue&#064;name 
        should be "range" and PropertyValue&#064;Characteristic should provide the minimum and maximum 
		values in Characteristic&#064;value attribute with "minimum" and "maximum" as domains in 
		Characteristic&#064;domain attribute.

        When SerialNumberInfo&#064;type is "profile" a serial number format should be
        provided in PropertyValue element, in this case PropertyValue&#064;name 
        should be "profile" and PropertyValue&#064;Characteristic should provide the format.
        Characteristic&#064;domain supports "type", "minLength" and "maxLength" as domains to 
		provide these values in Characteristic&#064;value attribute.
		
        When Characteristic&#064;domain is "type", Characteristic&#064;value supports "numeric", 
		"text" and "numericAndText" to provide the serial number format.
		
        When Characteristic&#064;domain is "minLength", Characteristic&#064;value provides the 
		minimum acceptable length of the serial number.
		
        When Characteristic&#064;domain is "maxLength", Characteristic&#064;value provides the 
		maximum acceptable length of the serial number.       
-->
<!ELEMENT SerialNumberInfo (SerialNumber*, PropertyValue*)>
<!--
    @attr requiresSerialNumber A value of "yes" indicates that this item requires serial number to be provided 
		by the supplier in AssetInfo tags in ShipNoticeItem element of the corresponding Advanced Ship Notice.
    
	@attr type Specifies the required serial number. Possible values:
		<ul>
		<li>list - A list of acceptable serial numbers.</li>
        <li>range - A range of acceptable serial numbers, only valid for numeric ranges.</li>
		<li>profile - A format of acceptable serial numbers.</li>
		</ul>
-->
<!ATTLIST SerialNumberInfo
	requiresSerialNumber    (yes)                      #IMPLIED
    type                    (list | profile | range)   #IMPLIED
>

<!--
    Defines one or more serial numbers for accountable items that are
    being invoiced.
-->
<!ELEMENT SerialNumber (#PCDATA)> <!-- string -->

<!--
    Code for the Store, used on the shipping process.
-->
<!ELEMENT StoreCode (#PCDATA)>


<!--   
	Packaging distribution information. 
	
	StoreCode: Code for the store of this packaging distribution information.

	UnitOfMeasure: Unit of measure code.
-->
<!ELEMENT PackagingDistribution (StoreCode, UnitOfMeasure)>
<!--
    @attr quantity Number of this packaging distribution information. Expressed in the units
        given in the UnitOfMeasure element.
-->
<!ATTLIST PackagingDistribution
    quantity             %r8;                 #REQUIRED
>

<!--
    Defines the relationships that exist between suppliers' production facilities and their production 
    facility roles.
	
    ProductionFacilityAssociation: Each ProductionFacilityAssociation element defines a 
        relationship between a production facility and a production facility role.
        A production facility is a supplier unit used for a particular manufacturing 
        process. A production facility role is the stage of a manufacturing process 
        for which a production facility is used.
-->
<!ELEMENT SupplierProductionFacilityRelations (ProductionFacilityAssociation+)>

<!--
    Defines a relationship between a production facility and a production facility role.
	
    ProductionFacility: A supplier unit used for a particular manufacturing process.
	
    OrganizationalUnit: Purchasing organization of the buyer.
	
    ShipTo: Optional Ship-To addressing information for the buyer's plant.
-->
<!ELEMENT ProductionFacilityAssociation (ProductionFacility, OrganizationalUnit, ShipTo?)>

<!--
    @attr operation Operation to be performed. Possible values are:
        <ul>
        <li><code>new</code> - Represents a new production facility association sent to the external system.</li>
        <li><code>update</code> - Represents an update to an existing production facility association.</li>
        <li><code>delete</code> - Represents an instruction to delete this production facility association in the external system.</li>
        </ul>
        <p>The <code>operation</code> attribute does not create or delete objects such as <code>ProductionFacility</code>, 
            <code>ProductionFacilityRole</code>, <code>OrganizationalUnit</code>, or <code>ShipTo</code>. It is used only
            to define relationships between existing production facilities and production facility roles.</p>
-->
<!ATTLIST ProductionFacilityAssociation 
    operation    (new | update | delete)   "new" >

<!--
    Defines a supplier unit used for a particular manufacturing process.
	
    IdReference: Defines an ID reference that identifies a production facility.
	
    ProductionFacilityRole: The stage of a manufacturing process for which a supplier production facility is used.
-->
<!ELEMENT ProductionFacility (IdReference, ProductionFacilityRole)>

<!--
    @attr productionFacilityName Name of the production facility.
-->
<!ATTLIST ProductionFacility 
    name             %string;             #REQUIRED
>

<!--
    Defines the stage of a manufacturing process for which a supplier production facility is used.
    For example, an apparel manufacturing process could have separate production facility 
    roles for cutting, sewing, pressing and folding, finishing and detailing, dyeing, and washing.

    IdReference: Defines an ID reference that identifies a production facility role.
-->
<!ELEMENT ProductionFacilityRole (IdReference)>

<!--
    @attr productionFacilityRole Name of the production facility role.
-->
<!ATTLIST ProductionFacilityRole 
    name             %string;             #REQUIRED
>

<!--
    Unique identifier used to identify group of studies.
-->
<!ELEMENT PoolID (#PCDATA)> <!-- string -->


<!--  
    Life sciences industry item information.
    One of the elements StudyID, ProtocolID or PoolID needs to be sent with a value otherwise the message will be rejected. 
    Also, if the value of the attribute isCFGPooled has a value ‘yes’ then the poolID value should also be provided in the message.
 	
    Study: Contains information about a clinical study. 

    KitType: Contains a unique identifier for a group of clinical finished goods (CFG) that represents the generalization of the stock 
		keeping unit of a specific clinical supply, regardless of country-specific packaging and labeling requirements.

    ProtocolD: Contains a unique external identifier assigned to the protocol. The protocol is the detailed plan of the clinical study.

    PackageControlNumber: Contains an identification number used for blinding the individual batch numbers for an 
		active drug and a placebo.

    PoolID: Contains an alternative to StudyID when several clinical studies are pooled or grouped together. This value 
		is passed only when several clinical studies are pooled.

    MedicationListInfo: Contains a range of medication numbers.
	
	Extrinsic: Contains any additional information related to the ItemOutLifeSciences element.
-->
<!ELEMENT ItemOutLifeSciences (Study?, KitType?, ProtocolID?, PackageControlNumber?, PoolID?,  MedicationListInfo*, Extrinsic*)> 

<!--
    @attr isCFGPooled Identifies whether clinical finished goods are pooled, that is, used in a pool of studies. 
-->
<!ATTLIST ItemOutLifeSciences
    isCFGPooled         (yes)              #IMPLIED
>

<!--  
    Contains information about a clinical study. 

    StudyID: Contains a unique identification number of a clinical study. 

    Description: Description identifying a clinical study.
-->
<!ELEMENT Study (StudyID, Description?)> 

<!--
    Contains a unique identification number of a clinical study.
-->
<!ELEMENT StudyID (#PCDATA)> <!-- string -->

<!--  
    Contains a unique identifier for a group of clinical finished goods (CFG) that represents the generalization of the stock 
	keeping unit of a specific clinical supply, regardless of country-specific packaging and labeling requirements. 

    KitTypeID: Contains an identification number of the kit type.

    Description: Description identifying a kit type.
-->
<!ELEMENT KitType (KitTypeID, Description?)> 

<!--
    Contains an identification number of the kit type.
-->
<!ELEMENT KitTypeID (#PCDATA)> <!-- string -->

<!--
    Contains a unique external identifier assigned to the protocol. The protocol is the detailed plan of the clinical study.
-->
<!ELEMENT ProtocolID (#PCDATA)> <!-- string -->

<!--   
    Contains an identification number used for blinding the individual batch numbers for an active drug and a placebo.
-->
<!ELEMENT PackageControlNumber (#PCDATA)> <!-- string -->

<!--
    @attr packageControlNumberExpiryDate Expiration date of the PackageControlNumber. 
    @attr isPackageControlNumberReleased Set to "yes" when the PackageControlNumber is released. 
-->
<!ATTLIST PackageControlNumber
    packageControlNumberExpiryDate         %datetime.tz;       #REQUIRED
    isPackageControlNumberReleased         (yes)               #IMPLIED
>

<!--
    Contains a set of medication sequence number ranges.
	
    PropertyValue: When MedictionListInfo&#064;type is "range" a minimum and maximum acceptable
		limits should be provided in PropertyValue element, in this case PropertyValue&#064;name 
		should be "range" and PropertyValue&#064;Characteristic should provide the minimum and maximum 
		values in Characteristic&#064;value attribute with "minimum" and "maximum" as domains in 
		Characteristic&#064;domain attribute.
-->
<!ELEMENT MedicationListInfo (PropertyValue*)>

<!--  
    @attr type Specifies the available medication sequence numbers. Possible value:
    <ul>
    <li>range - A range of sequence numbers, only valid for numeric ranges.</li>
    </ul>
-->
<!ATTLIST MedicationListInfo
    type                    (range)   #IMPLIED
>

<!--
    Defines life sciences industry specific information for SubcontractingComponent.
    LabelID: Contains an identification number used in the BOM for artwork of a label.
-->
<!ELEMENT SubcontractingComponentLifeSciences (LabelID?, Extrinsic*)>

<!--
    Defines industry specific information for SubcontractingComponent.
    SubcontractingComponentLifeSciences: Defines life sciences industry specific information for SubcontractingComponent.
    BatchInfo provides information on whether a batch number is required while reporting component consumption.
-->
<!ELEMENT SubcontractingComponentIndustry (SubcontractingComponentLifeSciences?, BatchInfo?)>
<!--
    Contains an identification number used in the BOM for artwork of a label.
-->
<!ELEMENT LabelID (#PCDATA)> <!-- string -->

<!--
    Defines industry specific information for packaging.
    PackagingLifeSciences: Defines life sciences industry specific information for Packaging.
-->
<!ELEMENT PackagingIndustry (PackagingLifeSciences?)>

<!--
    Defines life sciences industry specific information for Packaging.
    MedicationListInfo: Contains a set of medication sequence number ranges.
-->
<!ELEMENT PackagingLifeSciences (MedicationListInfo*)>


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

    $Id$
-->

<!--
    For more information about these elements/entities, see the 
    cXML Reference Guide and related documents.
-->

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

<!--
	The amount of deposit or prepayment.
-->
<!ELEMENT DepositAmount (Money)>

<!--
	Defines the subtotal amount.
-->
<!ELEMENT SubtotalAmount (Money)>

<!--
	Defines the special handling amount.
-->
<!ELEMENT SpecialHandlingAmount (Money, Description?, Distribution*)>

<!--
	Defines the shipping amount.
-->
<!ELEMENT ShippingAmount (Money, Distribution*)>

<!--
	Defines the gross amount, before discounts and adjustments have been applied.
-->
<!ELEMENT GrossAmount (Money)>

<!--
	Defines the net amount, the amount remaining after discounts and adjustments have 
	been applied to the gross amount.
-->
<!ELEMENT NetAmount (Money)>

<!--
	Defines the total amount due.
-->
<!ELEMENT DueAmount (Money)>

<!--
	Defines the discount amount.
-->
<!ELEMENT DiscountAmount (Money)>

<!--
	Defines the fixed amount.
-->
<!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*)>

<!-- 
    Defines different types of individual fees.
-->
<!ELEMENT Fee (Money)>
<!--
    @attr type The type of fee.
-->
<!ATTLIST Fee
    type     %string;  #IMPLIED
>

<!--
	Defines the deduction amount available for an item.
-->
<!ELEMENT DeductionAmount (Money)>

<!--
	Contains the final price of the item. This price overrides the price of the item.
-->
<!ELEMENT DeductedPrice (Money)>

<!--
    Defines a Purchasing Card element used for payment.
-->
<!ELEMENT PCard (PostalAddress?)>
<!--
	@attr number Number of the Purchasing Card.
	
	@attr expiration Expiration date of the Purchasing Card.
	
	@attr name Name of the Purchasing Card.
-->
<!ATTLIST PCard
    number      %number;  #REQUIRED
    expiration  %date;    #REQUIRED
    name        %string;  #IMPLIED
>

<!--
    Defines a Virtual Payment Token Card element used for payment.
-->
<!ELEMENT PaymentToken EMPTY>

<!--
	@attr number Number of the Virtual Card.
	@attr expiration Expiration date of the Virtual Card.
	@attr name Name of the Virtual Card.
	@attr token Token of the Virtual Card.
-->
<!ATTLIST PaymentToken
	number      %number;  #REQUIRED
	expiration  %date;    #REQUIRED
	name        %string;  #IMPLIED
	token	%string; #REQUIRED
>

<!--
    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)>

<!--
    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)>

<!--
    Represents the sum of the SubTotal, Charges (including special handling 
    charges and shipping charges), and 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$
-->

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

        <ul>
		<li>PunchOutSetupRequest</li>
        <li>PunchOutOrderMessage</li>
        <li>OrderRequest</li>
        <li>ConfirmationRequest</li>
		</ul>
		<p>But not for:</p>
		<ul>
		<li>MasterAgreementRequest</li>
		</ul>

    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 (for example, (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 (that is, 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.
-->
<!ELEMENT FeeDetail (UnitRate+, Period?) >
<!--
    @attr isRecurring Indicates that the fee is recurring (charged more than once).

-->
<!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 (that is, 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.
-->
<!ELEMENT LaborDetail (UnitRate+, Period, Contractor?, JobDescription?, Supervisor?, WorkLocation?, Extrinsic*)>
<!--
    @attr supplierReferenceCode The supplier's quote or proposal id, for cross-reference.
-->
<!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.
-->
<!ELEMENT Contractor (ContractorIdentifier, Contact)>

<!--
    Definition of a ContractorIdentifier. Uniquely identifies a contractor.
-->
<!ELEMENT ContractorIdentifier (#PCDATA)>
<!--
	@attr domain Domain in which 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.
-->
<!ATTLIST ContractorIdentifier
        domain     	(supplierReferenceID|buyerReferenceID) #REQUIRED
>

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

    $Id$
-->

<!--
    For more information about these elements/entities, see the
    cXML Reference 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.
-->
<!ELEMENT OrderReference (DocumentReference)>
<!--
    @attr 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.

    @attr orderDate The date and time the order request was created. If present, must
        be copied directly from the referenced OrderRequest document's
        OrderRequestHeader.
-->
<!ATTLIST OrderReference
    orderID              %string;              #IMPLIED
    orderDate            %datetime.tz;         #IMPLIED
>

<!--
    Defines the ID of an order known to the buyer system.
-->
<!ELEMENT OrderIDInfo (IdReference*)>
<!--
    @attr orderID The id of an order known to the buyer system. Basically,
        what the PO number is today.

    @attr orderDate The date and time the order was created.
-->
<!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.
-->
<!ELEMENT InvoiceReference (DocumentReference)>
<!--
    @attr invoiceID The supplier 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.

    @attr invoiceDate The invoice date.
-->
<!ATTLIST InvoiceReference
    invoiceID              %string;               #IMPLIED
    invoiceDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of an invoice known to the supplier system.
-->
<!ELEMENT InvoiceIDInfo EMPTY>
<!--
    @attr invoiceID The id of an invoice known to the supplier system.

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

<!--
    Defines the ID of a PaymentProposalRequest known to the supplier and buyer system.
-->
<!ELEMENT PaymentProposalIDInfo EMPTY>
<!--
    @attr paymentProposalID The ID of a PaymentProposalRequest known to the buyer and supplier system.
-->
<!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.
-->
<!ELEMENT MasterAgreementIDInfo (IdReference*)>
<!--
    @attr agreementID The id of a master agreement known to the buyer system. Basically,
        what the master agreement number is today.

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

    @attr agreementType The type of the master agreement being referenced, for example: Scheduling Agreement
-->
<!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.
-->
<!ELEMENT MasterAgreementReference (DocumentReference)>
<!--
    @attr agreementID The id of a master agreement known to the buyer system. Basically,
        what the master agreement number is today.

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

    @attr agreementType The type of the master agreement being referenced, for example: Scheduling Agreement.
-->
<!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.
-->
<!ELEMENT TransportReference (DocumentReference)>
<!--
    @attr 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.

	@attr requestDate The date and time the transport request was created.
-->
<!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.
-->
<!ELEMENT TransportIDInfo (IdReference*)>
<!--
    @attr 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.

    @attr requestDate The date and time the transport request was created.
-->
<!ATTLIST TransportIDInfo
    requestID              %string;               #IMPLIED
    requestDate            %datetime.tz;          #IMPLIED
>

<!--
    Identifies the carrier who will transport a shipment.
-->
<!ELEMENT CarrierIdentifier (#PCDATA)>         <!-- string -->
<!--
    domain
        Domain in which this value has meaning. Recognized domains
        include:
        <ul>
		<li>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.</li>
		<li>SCAC - Standard Carrier Alpha Code (see
            http://users.erols.com/nmfta/Codes.htm).</li>
        <li>IATA - International Air Transport Association (see
            http://www.iata.org).</li>
        <li>AAR - Association of American Railroads (see http://www.aar.org/).</li>
        <li>UIC - International Union of Railways (see
            http://www.uic.asso.fr/).</li>
        <li>EAN - European Article Numbering (see http://www.ean-ucc.org/).</li>
        <li>DUNS - D&B's Data Universal Numbering System (see
            http://www.dnb.com/dnbhome.htm).</li>
		</ul>
-->
<!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.
-->
<!ELEMENT ShipmentIdentifier (#PCDATA)>        <!-- string -->
<!--
    @attr domain Specifies more precisely what kind of identifier this is.
        Likely values include trackingNumber, billOfLading.

    @attr 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.

    @attr trackingURL Carrier URL that can be used to track the shipment in conjunction
		with the tracking number
-->
<!ATTLIST ShipmentIdentifier
    domain                %string;              #IMPLIED
    trackingNumberDate    %datetime.tz;         #IMPLIED
    trackingURL           %URL;                 #IMPLIED>

<!--
    One language-specific string for the creator of an IdReference,
    for example, IRS, BofA, UPS, Cisco, and so on.
-->
<!ELEMENT Creator (#PCDATA)>              <!-- string -->
<!--
    @attr xml:lang The language or locale in which the name of the creator is written.
-->
<!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, for example, BofA, UPS, Cisco, and so on.

    Description: Textual description of the IdReference. For human readability.
-->
<!ELEMENT IdReference (Creator?, Description?)>
<!--
    @attr identifier The unique identifier of the IdReference within the domain.

    @attr domain The domain of the IdReference. Supported values depend on your procurement application. Possible values:
		<ul>
		<li>1099ID</li>
		<li>abaRoutingNumber</li>
		<li>accountID</li>
		<li>accountPayableID</li>
		<li>accountReceivableID</li>
		<li>bankAccountID</li>
		<li>bankBranchID</li>
		<li>bankNationalID</li>
		<li>bankRoutingID</li>
		<li>buyerLocationID</li>
		<li>companyRegistrationNumber</li>
		<li>courtRegisterID</li>
		<li>creditorRefID</li>
		<li>documentName</li>
		<li>federalTaxID</li>
		<li>governmentNumber</li>
		<li>gstID</li>
		<li>ibanID</li>
		<li>isoBicID</li>
		<li>iso6523</li>
		<li>provincialTaxID</li>
		<li>stateTaxID</li>
		<li>storageLocationID</li>
		<li>supplierReference</li>
		<li>swiftID</li>
		<li>taxExemptionID</li>
		<li>unloadingPointID</li>
		<li>vatID</li>
        <li>ID</li>
		</ul>

		Note: supplierTaxID is deprecated and will be treated as federalTaxID.
-->
<!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
-->
<!ELEMENT SupplierOrderInfo EMPTY>
<!--
    @attr orderID Supplier sales order id of this order.

    @attr orderDate The date and time the sales order was created.
-->
<!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.
-->
<!ELEMENT ShipNoticeReference (DocumentReference)>
<!--
    @attr shipNoticeID Unique identifier of the referenced ShipNoticeRequest.

    @attr shipNoticeDate Date and time of the referenced ShipNoticeRequest.
-->
<!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, for example,
		DispatchAdviceID, ReceivingAdviceID, DeliveryNoteId, ProofOfDeliveryID.
-->
<!ELEMENT ShipNoticeIDInfo (IdReference*)>
<!--
    @attr shipNoticeID Unique identifier of the referenced ShipNoticeRequest.

    @attr shipNoticeDate Date and time of the referenced ShipNoticeRequest.
-->
<!ATTLIST ShipNoticeIDInfo
    shipNoticeID              %string;               #REQUIRED
    shipNoticeDate            %datetime.tz;          #IMPLIED
>

<!--
    Provides a clear reference to a prior OrderStatusRequest document.
-->
<!ELEMENT OrderStatusRequestReference (DocumentReference)>
<!--
    @attr orderStatusRequestID The buyer system orderStatusRequestID for this request. If present, must be copied
        directly from the referenced OrderStatusRequest document's
        OrderStatusRequestHeader.

    @attr orderStatusRequestDate The order status request date.
-->
<!ATTLIST OrderStatusRequestReference
    orderStatusRequestID              %string;               #IMPLIED
    orderStatusRequestDate            %datetime.tz;          #IMPLIED
>

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

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

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

<!--
    The ReceiptReference element provides a clear reference to a prior
    ReceiptRequest document.
-->
<!ELEMENT ReceiptReference (DocumentReference) >
<!--
    @attr receiptID The buyer system receiptID for this request.
        If present, must be copied directly from the
        referenced ReceiptRequest document's ReceiptRequestHeader.

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

<!--
    Defines the ID of a receipt known to the buyer system.
-->
<!ELEMENT ReceiptIDInfo (IdReference*)>
<!--
    @attr receiptID The id of an receipt known to the buyer system.

    @attr receiptDate The date and time the order was created.
-->
<!ATTLIST ReceiptIDInfo
    receiptID              %string;               #REQUIRED
    receiptDate            %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of a quality inspection request document.
-->
<!ELEMENT QualityInspectionRequestReference (DocumentReference?)>
<!--
    @attr inspectionID The id of a quality inspection request document.

    @attr inspectionDate The date and time the quality inspection request document was created.
-->
<!ATTLIST QualityInspectionRequestReference
    inspectionID              %string;               #IMPLIED
    inspectionDate           %datetime.tz;          #IMPLIED
>

<!--
    Defines the ID of a quality inspection result document.
-->
<!ELEMENT QualityInspectionResultReference (DocumentReference?)>
<!--
    @attr inspectionID The id of a quality inspection result document.

    @attr inspectionDate The date and time the quality inspection result document was created.
-->
<!ATTLIST QualityInspectionResultReference
    inspectionID              %string;               #IMPLIED
    inspectionDate           %datetime.tz;          #IMPLIED
>

<!--
    Identifies legal entity in the external system.
-->
<!ELEMENT LegalEntity (IdReference)>

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

    IdReference: Contains a unique identification reference for the Purchase
		Unit or Purchase Group.
-->
<!ELEMENT OrganizationalUnit (IdReference)>

<!--
    Defines the correspondent routing destination.
 -->
<!ELEMENT Routing EMPTY>

<!--
    @attr destination Name of the destination. Possible values are peppol or fieldglass
 -->

<!ATTLIST Routing
    destination      (peppol | fieldglass)    #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!--
     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$
-->

<!--
    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.
-->
<!ELEMENT ProfileResponse ( Option*, Transaction+ )>
<!--
    @attr effectiveDate When these services were first available. Should not be in the
		future since new clients may need to interact with a server.

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

    @attr a-dtype Datatype enumeration for the attributes of this element. May be
		ignored by most XML parsers (used for documentation purposes).
-->
<!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.
-->
<!ELEMENT Option ( #PCDATA )>   <!-- string -->
<!--
    @attr 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).

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

<!--
    A transaction supported by this server.
-->
<!ELEMENT Transaction ( URL, Option* )>
<!--
    @attr requestName A specific request this server accepts at the given URL. Possible values:
		ProfileRequest | OrderRequest | MasterAgreementRequest| PurchaseRequisitionRequest |
		PunchOutSetupRequest | ProviderSetupRequest | StatusUpdateRequest | GetPendingRequest |
		SubscriptionListRequest | SubscriptionContentRequest | SupplierListRequest |
		SupplierDataRequest | SubscriptionStatusUpdateRequest | CopyRequest |
		CatalogUploadRequest | AuthRequest | DataRequest | OrganizationDataRequest | 
		ApprovalRequest | QualityNotificationRequest | QualityInspectionRequest |
		QualityInspectionResultRequest | QualityInspectionDecisionRequest.

		Note: Request names in the base cXML protocol are contained in the 
		%cxml.requests entity.

    @attr a-dtype Datatype enumeration for the attributes of this element. May be
		ignored by most XML parsers (used for documentation purposes).
-->
<!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$
-->

<!--
    For more information about these elements/entities, see the
    cXML Reference Guide and related documents.
-->

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

<!--
    cXML envelope.
-->
<!ELEMENT cXML (((Header, (Message | Request)) | Response), ds:Signature*)>
<!--
    @attr version Version of this cXML transmission. Should be less than or equal
		to the version portion of the SYSTEM identifier for this document.

    @attr payloadID A unique identifier for this document.

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

    @attr 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.

    @attr 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.)
-->
<!ATTLIST cXML
    version    %string;       "&cxml.version;"
    payloadID  %string;       #REQUIRED
    timestamp  %datetime.tz;  #REQUIRED
    signatureVersion %cxml.signatureVersions; #IMPLIED
    xml:lang   %xmlLangCode;  #IMPLIED
>

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

<!--
	Contains the logical source party of the cXML document.
-->
<!ELEMENT From (Credential+, Correspondent?)>

<!--
	Contains the logical destination party of the cXML document.
-->
<!ELEMENT To (Credential+, Correspondent?)>

<!--
	Contains the party that opens the HTTP connection and sends the cXML document.
	When the document is initially sent, Sender and From are the same, However, if the cXML document travels
	through network hubs, the Sender element changes to indicate current sending party.
-->
<!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.
-->
<!ELEMENT Node (Credential+)>
<!--
    @attr 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.

    @attr 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.
-->
<!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.
-->
<!ELEMENT OriginalDocument EMPTY>
<!--
    @attr payloadID The payloadId of the original document.
-->
<!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>
<!--
	@attr type DEPRECATED. Do not use.

	@attr encoding DEPRECATED. Do not use.
-->
<!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.
-->
<!ELEMENT Identity ANY>
<!--
    @attr lastChangedTimestamp When the underlying object last changed in the
		originating system. This is used in cases where the same object (for
		example, a buyer organization) is replicated, and kept synchronized,
		across two systems.
-->
<!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
    (that is, 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. For example, 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. For example, 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. For example, 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. For example, the MAC could authenticate an expiration date
    or sequence number.
-->
<!ELEMENT CredentialMac (#PCDATA)>
<!--
    @attr 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".

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

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

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

<!--
	Authentical elements
-->
<!ENTITY % cxml.authentication  "SharedSecret |
                                 DigitalSignature |
                                 CredentialMac"
>
<!--
    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.

	Allows the receiving party to authenticate the sending party. This credential
	allows strong authentication without requiring a public-key end-to-end digital
	certificate infrastructure. Only a user name and password need to be issued
	by the receiving party to allow the sending party to perform Requests.
-->
<!ELEMENT Credential (Identity, (%cxml.authentication;)?)>
<!--
    @attr domain In what domain is this Credential represented?

    @attr 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.
-->
<!ATTLIST Credential
    domain  %string;      #REQUIRED
    type    (marketplace) #IMPLIED
>

<!--
    Status of a Response or Message. If present, the element content
    describes specifics of a problem.
-->
<!ELEMENT Status (#PCDATA)>
<!--
    @attr code HTTP or cXML-specific status code.

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

    @attr 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.)
-->
<!ATTLIST Status
    code     %uint;        #REQUIRED
    text     %string;      #REQUIRED
    xml:lang %xmlLangCode; #IMPLIED
>

<!--
    Defines a message.

    When Status not present, '<Status code="200" text="OK" />' is implied.
-->
<!ELEMENT Message (Status? %cxml.messages;)>
<!--
	@attr deploymentMode Indicates whether the request is a test request or a production request.
		Allowed values are "production" (default) or "test".

	@attr inReplyTo Specifies to which Message this Message responds. The contents of the inReplyTo
		attribute would be the payloadID of a Message that was received earlier. This would be used
		to construct a two-way conversation with many messages.

	@attr Id This attribute can be used to call out an element and all its children as a target for
		a digital signing.
-->
<!ATTLIST Message
    deploymentMode  (production | test)  "production"
    inReplyTo       %string;  #IMPLIED
    Id              ID        #IMPLIED
>

<!--
	Clients send requests for operations. Only one Request element is allowed for each cXML envelope element, which
	simplifies the server implementations, because no de-multiplexing needs to occur when reading cXML documents.
	The Request element can contain virtually any type of XML data.

	The typical Request elements are:
	<ul>
	<li>OrderRequest</li>
	<li>ProfileRequest</li>
	<li>PunchOutSetupRequest</li>
	<li>StatusUpdateRequest</li>
	<li>GetPendingRequest</li>
	<li>ConfirmationRequest</li>
	<li>ShipNoticeRequest</li>
	<li>ProviderSetupRequest</li>
	<li>PaymentRemittanceRequest</li>
	</ul>
-->
<!ELEMENT Request (%cxml.requests;)>
<!--
	@attr deploymentMode Indicates whether the request is a test request or a production request.
		Allowed values are "production" (default) or "test".

	@attr Id This attribute can be used to call out an element and all its children as a target for
		a digital signing.
-->
<!ATTLIST Request
    deploymentMode  (production | test)  "production"
    Id              ID        #IMPLIED
>

<!--
	Servers send responses to inform clients of the results of operations. Because the result of some requests
	might not have any data, the Response element can optionally contain nothing but a Status element. A Response
	element can also contain any application-level data. During PunchOut for example, the application-level
	data is contained in a PunchOutSetupResponse element.

	The typical Response elements are:
	<ul>
	<li>ProfileResponse</li>
	<li>PunchOutSetupResponse</li>
	<li>GetPendingResponse</li>
	</ul>
-->
<!ELEMENT Response (Status %cxml.responses;)>
<!--
	@attr Id This attribute can be used to call out an element and all its children as a target for
		a digital signing.
-->
<!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.
-->
<!ELEMENT cXMLSignedInfo EMPTY>
<!--
    @attr 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.

    @attr 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.

    @attr Id This identifies this cXMLSignedInfo element for purposes of
        the signature. This attribute must always be present and
        should always have the value "cXMLSignedInfo".
-->
<!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.

    Routing element includes the document destination system name.
-->
<!ELEMENT Correspondent (Contact+, Routing?, Extrinsic*)>
<!--
    @attr preferredLanguage Optional language which the organization, identified
		by this element, would prefer to use. Refer to the definition of
        xmlLangCode entity.
-->
<!ATTLIST Correspondent
    preferredLanguage     %xmlLangCode;        #IMPLIED
>
<!--
    The representation of a line item as it needs to be for sending to a
    supplier.
-->
<!ELEMENT QuoteItemOut (ItemID?, ItemDetail, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Total?, TermsOfDelivery?, ReferenceDocumentInfo?, Contact*, Comments?, Alternative?, SupplierSelector?)>
<!--
    @attr quantity How many items are desired. 

    @attr lineNumber Position (counting from 1) of this item in a QuoteRequest. Used to
        maintain a reference between items in create and update documents.

	@attr parentLineNumber Position (counting from 1) of this item's parent in a QuoteRequest. 
		Used to maintain a hierarchical reference between items in documents.

    @attr requestedDeliveryDate The date this item was requested for delivery.

    @attr agreementItemNumber The corresponding Item Number of the Item in the Master Agreement if this 
		is a "release" order item.

    @attr itemClassification The service item type. It could either be "material" or "service".

	@attr itemType Specifies the type of item. Possible values:
		<ul>
		<li>composite - Identifies an item group.</li>
		<li>item - Identifies an independent line item.</li>
		<li>lean - Indicates that no child item is expected for the line.</li>
		</ul>

	@attr serviceLineType Represents the type of the service line. Possible values:
		<ul>
		<li>standard (default) - Standard service.</li>
		<li>blanket - Blanket service for which you don't specify a quantity. It is settled as a lump sum.</li>
		<li>contingency - A service that is not absolutely necessary to perform the order.</li>
		<li>openquantity - A service for which the sold-to party requires that the bidder offer the quantity 
			for a specific partial service.</li>
		<li>information - The line type does not describe a service and is for information purposes only.</li>
		</ul>
-->
<!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*)>

<!--
	Industry specific Header information for QuoteRequest.
    AerospaceAndDefense: Provides Aerospace and Defense Industry information.
-->
<!ELEMENT QuoteRequestHeaderIndustry (AerospaceAndDefense?)>

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

    SupplierProductionFacilityRelations: Defines the relationships that exist between suppliers' production 
        facilities and their production facility roles.
-->
<!ELEMENT QuoteItemIn (ItemID?, ItemDetail, ShipTo?, Shipping?,
                   Tax?, SpendDetail?, Total?, TermsOfDelivery?, ReferenceDocumentInfo*, Contact*, Comments?, Alternative?, SupplierProductionFacilityRelations?, Extrinsic*)>
<!--
    @attr type Supplier action type.
	
    @attr quantity How many items are quoted.
	
    @attr lineNumber Position (counting from 1) of this item in a QuoteRequest. Used to maintain a 
		reference between items in create and update documents. 
	
	@attr parentLineNumber Position (counting from 1) of this item's parent in a QuoteRequest. Used to
        maintain a hierarchical reference between items in documents.
		
    @attr requestedDeliveryDate The date this item was requested for delivery.
	
    @attr rank The rank of the bid.
	
    @attr itemClassification The service item type. It could either be "material" or "service".
	
	@attr itemType Specifies the type of item. Possible values:
		<ul>
		<li>composite - Identifies an item group.</li>
		<li>item - Identifies an independent line item.</li>
		<li>lean - Indicates that no child item is expected for the line.</li>
		</ul>
		
	@attr serviceLineType Represents the type of the service line. Possible values:
		<ul>
		<li>standard - Standard service (default).</li>
		<li>blanket - Blanket service for which you don't specify a quantity. It is settled as a lump sum.</li>
		<li>contingency - A service that is not absolutely necessary to perform the order.</li>
		<li>openquantity - A service for which the sold-to party requires that the bidder offer the quantity 
			for a specific partial service.</li>
		<li>information - The line type does not describe a service and is for information purposes only.</li>
		</ul>
-->
<!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. 

    SupplierProductionFacilityRelations: Defines the relationships that exist between suppliers' production 
        facilities and their production facility roles.
-->
<!ELEMENT QuoteMessageHeader (OrganizationID, Total, ShipTo?, Contact*, QuoteRequestReference?, Comments?, QuoteHeaderInfo?, SupplierProductionFacilityRelations?, Extrinsic*)>
<!--
    @attr type Supplier action type (enumeration).
    
	@attr quoteID Unique identifier for a quote. 
    
	@attr quoteDate The date when the quote is submitted.
	
	@attr currency Currency for the QuoteRequest and QuoteMessage. Must be a three-letter ISO currency code.
	
	@attr xml:lang The language for the QuoteRequest and QuoteMessage.
-->
<!ATTLIST QuoteMessageHeader
    type  (accept | reject | update | final | award)	#REQUIRED
    quoteID    %string;          #REQUIRED
    quoteDate  %datetime.tz;     #REQUIRED
    currency  %isoCurrencyCode;	 #REQUIRED
    xml:lang  %xmlLangCode;      #REQUIRED
>

<!--
	Reference to a quote request originated in the external system. 
-->
<!ELEMENT QuoteRequestReference (DocumentReference?)>
<!--
	@attr requestID Unique internal number from the buyer’s system for the request for quotations.
	
	@attr requestDate The date and time of the quoteRequest document.
-->
<!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 a 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 a QuoteRequest. This is the data that is sent to the supplier
    to have them submit a quote. 
	
	Total: The total amount of this QuoteRequest.

	QuoteRequestHeaderIndustry: Industry specific header information.
-->
<!ELEMENT QuoteRequestHeader (Name?, SupplierSelector?, Total?, Description?, ShipTo?, Contact*, Comments?, QuoteHeaderInfo?, Extrinsic*, QuoteRequestHeaderIndustry?)>
<!--
    @attr requestID The buyer system ID for this request. This is an internal
        Buyer unique number.

    @attr requestDate The date and time the QuoteRequest request was created.

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

    @attr openDate The date when a QuoteRequest is open for supplier responses.
	
    @attr closeDate The date when a QuoteRequest is closed for supplier responses.
	
    @attr previewDate The date when a QuoteRequest is viewable by suppliers.
	
	@attr templateName The template used by the sourcing application. The template can outline the terms 
		and conditions regarding the details for a request for quotation sent between the buyer and 
		sourcing application.
		
	@attr currency Currency for the QuoteRequest and QuoteMessage. Must be a three-letter ISO currency code.
	
	@attr xml:lang The language for the QuoteRequest and QuoteMessage.

    @attr quoteReceivingPreference Used by the buyer system to identify the preference for
        receiving QuoteMessage back from the sourcing system. Possible values are:
		<ul>
		<li>winningOnly - should result in only the winning supplier quotes being sent to the buyer.</li>
		<li>finalBidsFromAll - should result in  quotes from suppliers being sent after event closes.</li>
		<li>all - quotes are sent to the buyer system as soon as supplier submits the bid. It does not wait 
			for event closing.</li>
		</ul>
-->
<!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
>

<!--
    Defines 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.
-->
<!ELEMENT SupplierSelector (SupplierInvitation*)>
<!--
    @attr matchingType Specifies how suppliers are invited for a quoteRequest. Possible values:
		<ul>
		<li>invitationOnly - Only invited suppliers. Suppliers that can join the event are specified in the 
			OrganizationID element.</li>
		<li>approvedVendorOnly - Suppliers from the approved supplier list. However, the sourcing application 
			may filter the suppliers that can bid based on the commodity and territory matching rules.</li>
		<li>public - Any public supplier. The supplier can also exist in the approved supplier list. However, 
			the sourcing application may filter the suppliers that can bid based on the commodity and 
			territory matching rules.</li>
		</ul>
-->
<!ATTLIST SupplierSelector
    matchingType (invitationOnly|approvedVendorOnly|public) #IMPLIED
>

<!--
	Represents explicit invitation for a supplier.

	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*)>
<!--
	@attr supplierStatus Status of supplier in the buyer's system. Possible values:
		<ul>
		<li>approved (default) - The supplier exists in the buyer's system and is approved by the buyer.</li>
		<li>contracted - The supplier is an approved supplier in the buyer's system and has an associated 
			master agreement of a contract. The buyer can specify the MasterAgreementIDInfo.</li>
		</ul>
-->
<!ATTLIST SupplierInvitation
    supplierStatus       (approved | contracted )  "approved"
>

<!--
    For more information about these elements/entities, see the 
    cXML Reference 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.

    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:
		<ul>
		<li>Procuring certain articles or merchandise categories</li>
		<li>Acting as the contact for vendors</li>
		</ul>
        For example, Purchasing Organization or Purchasing Group.
			%
            <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.

    FollowUpDocument: This would give a hint to the ERP system that the next step should be to create "value" Contract or "quantity" contract etc.
        Example 1: 
		%
		<FollowUpDocument type="value" category="Contract"/>
		%
        Example 2: 
		%
		<FollowUpDocument type="LP" category="Scheduling Agreement"/>
		%

    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>
		%

    SupplierProductionFacilityRelations: Defines the relationships that exist between suppliers' production 
        facilities and their production facility roles.

    ContractRequestHeaderIndustry: Industry specific header information.

    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?, FollowUpDocument?, TermsOfDelivery?, SupplierProductionFacilityRelations?, Extrinsic*, ContractRequestHeaderIndustry?)>
<!--
    @attr contractID The source buyer system contractID for this request.
        For example, Contract ID in the sourcing system.

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

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

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

    @attr effectiveDate Date the contract is available for ordering/releases.

    @attr expirationDate Date the contract is no longer available.
	
	@attr xml:lang The language or locale in which the ContractRequest content is written.

    @attr operation The operational mode of the ContractRequest. Possible values:
		<ul>
		<li>new - operation identifies a new Contract transaction.</li>
		<li>update - operation identified an update to an existing transaction.
			the DocumentInfo attribute can be used to indicate the Document information
			in the external system.</li>
        <li>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.</li>
		</ul>
-->
<!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>
		%
        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.

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

        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>
		%
        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>
		%

        <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"

        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.

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

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

        <Modifications> in <UnitPrice> will be used to send Discount amount/percent, Surcharges, Tax, 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>
		%
        The Alternative at an item level indicates if this is a service line, if there are any alternatives for 
		this line. Alternative line in contracts is used in case of customer doing negotiation to get pricing on 
		alternate lines with a supplier. 

        SupplierProductionFacilityRelations: Defines the relationships that exist between suppliers' production 
        facilities and their production facility roles.
-->
<!ELEMENT ContractItemIn (MaxAmount?, MinAmount?, MaxReleaseAmount?, MinReleaseAmount?,
        MaxQuantity?, MinQuantity?, MaxReleaseQuantity?, MinReleaseQuantity?,
        TermsOfDelivery?, ItemIn, ReferenceDocumentInfo*, Alternative?, SupplierProductionFacilityRelations?, Extrinsic*)>
<!--
	@attr operation Represents the state of the Contract line item that is being sent to the external system. 
		<ul>
		<li>new - Represents new contract line item sent to External system.</li>
		<li>update - Represents update to an existing contract line item.</li>
		<li>delete - Represents instruction to delete this contract line item in external system.</li>
		</ul>

	@attr itemType Specifies the type of item. Possible values:
		<ul>
		<li>composite - Identifies an item group.</li>
		<li>item - Identifies an independent line item.</li>
		<li>lean - Indicates that no child item is expected for the line.</li>
		</ul>
		
	@attr serviceLineType Represents the type of the service line. Possible values:
		<ul>
		<li>standard - Standard service (default).</li>
		<li>blanket - Blanket service for which you don't specify a quantity. It is settled as a lump sum.</li>
		<li>contingency - A service that is not absolutely necessary to perform the order.</li>
		<li>openquantity - A service for which the sold-to party requires that the bidder offer the quantity 
			for a specific partial service.</li>
		<li>information - The line type does not describe a service and is for information purposes only.</li>
		</ul>
-->
<!ATTLIST ContractItemIn
        operation  (new | update | delete) #IMPLIED
        itemType       %lineItemType;    #IMPLIED
 		serviceLineType     %serviceLineType; #IMPLIED
        >

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

<!--
  	Industry specific header information for Contract Request.
  	AerospaceAndDefense: Provides Aerospace and Defense Industry information.
-->
<!ELEMENT ContractRequestHeaderIndustry (AerospaceAndDefense?)>

<!--
    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 the sourcing system.

    Comments: Comments associated with the status update.
-->
<!ELEMENT ContractStatus (ContractIDInfo, ContractItemStatus*, Comments*)>
<!--
    @attr type Type of the contract status, for example, "created".
-->
<!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.
-->
<!ELEMENT ContractIDInfo (IdReference*)>
<!--
    @attr contractID The ID of a contract known to the source buyer system.

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

    @attr contractType The type of the contract being referenced, for example, Scheduling Agreement.
-->
<!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 a 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+)>
<!--
    @attr effectiveDate Date the contract is available for ordering/releases.

    @attr expirationDate Date the contract is no longer available.
-->
<!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).
-->
<!ELEMENT ItemSegment (ContractItem+)>
<!--
    @attr segmentKey Optional agreed-upon string used to segment custom prices.
-->
<!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 more information about these elements/entities, see the 
    cXML Reference Guide and related documents.
-->

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

    $Id$
-->

<!--
     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: 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*)>

<!--
	@attr punchoutLevel Specifies how the procurement application should present the PunchOut item to users. 
		This attribute can have the value store, aisle, shelf, or product.

		Procurement applications might display these items differently, depending on how they are tagged by 
		suppliers. For example, they might display store-level items differently than product-level items.
-->
<!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.
-->
<!ELEMENT Index (SupplierID+, Comments?, SearchGroup*, IndexItem+)>
<!--
     @attr loadmode The mode in which the Index is loaded, either Full
		or Incremental. A full index load completely replace a previously 
		loaded index. The recommended application default is incremental.
-->
<!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+)>

<!--
     DEPRECATED. Do not use. 
	 
	 Parametric search shapes should be defined using TypeDefinition and its
     child elements.

     An attribute that can searched parametrically.
-->
<!ELEMENT SearchAttribute EMPTY>
<!--
     @attr name Name of the attribute.
	 
     @attr type The type of the attribute.
-->
<!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 -->
<!--
     Contains various index specific elements that 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>
<!--
	@attr name Element to search.

	@attr value Value to search.
-->
<!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 more information about these elements/entities, see the 
    cXML Reference Guide and related 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.
-->
<!ELEMENT GetPendingRequest (MessageType+)>
<!--
	@attr maxMessages Maximum number of pending messages that can be included in the response.
	
	@attr lastReceivedTimestamp The timestamp of the most recent document received.
-->
<!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, for example, 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$
-->

<!--
    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+)>
<!--
    @attr type The type of change message (enumeration).
-->
<!ATTLIST SubscriptionChangeMessage
    type  (new | update | delete)  #REQUIRED
>

<!--
    A content subscription.
-->
<!ELEMENT Subscription (InternalID, SubscriptionVersion?, Name, Changetime, SupplierID+, Format?,
                        Description?, CatalogInfo?)>

<!--
	Contains the date and time when any aspect of the subscription last changed.
-->
<!ELEMENT Changetime (#PCDATA)> <!-- datetime.tz -->
<!--
	Contains the format of the catalog.
-->
<!ELEMENT Format (#PCDATA)> <!-- string -->
<!--
	@attr version The version of the catalog format.
-->
<!ATTLIST Format
    version  %string;  #REQUIRED
>
<!--
    Contains CatalogInfo with attributes
-->
<!ELEMENT CatalogInfo (Commodities?)>
<!--
    @attr filename The filename of uploaded catalog file.
    @attr size The size of the catalog file in bytes.
    @attr totalItems Total number of items/products in the catalog.
-->
<!ATTLIST CatalogInfo
    filename         %string;  #REQUIRED
    size             %int;     #REQUIRED
    totalItems       %int;     #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)>
<!-- 
	@attr filename Filename for the subscription content.
-->
<!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+)>
<!--
    @attr type The type of change message.
-->
<!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)>

<!--
	When a supplier edits a catalog, the network hub creates a new version of the catalog and assigns a 
	version number. This version number is used with the InternalID in all messages sent from the buyer to the 
	network hub. This is an optional attribute. When it is not defined, the network hub uses the last published 
	version of the catalog as the InternalID.
-->
<!ELEMENT SubscriptionVersion EMPTY>
<!--
	@attr versionNumber The requested version number of the catalog to fetch. If versionNumber is not provided, 
		the latest available version of the catalog is fetched.
-->
<!ATTLIST SubscriptionVersion
    versionNumber   %uint;  #REQUIRED
>

<!--
	Catalog subscription status from the buyer.
-->
<!ELEMENT SubscriptionStatus (Comments?)>
<!--
	@attr status The status of the catalog.
-->
<!ATTLIST SubscriptionStatus
      status    (received | validation_error | validated | approved | rejected | activated | deactivated | deleted | changed)  #REQUIRED>

<!--
	A request to update the subscription status of a Catalog. 

	InternalID: ID of the catalog.
	
	SubscriptionVersion: Contains the version number of the catalog.

	SubscriptionStatus: Contains the catalog subscription status from the buyer.
-->
<!ELEMENT SubscriptionStatusUpdateRequest (InternalID, SubscriptionVersion?, SubscriptionStatus)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!-- ====
    Provider* transaction is used to visually integrate an application with
    a UI provided by a service provider.
==== -->

<!--
     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*)>

<!--
     Notifies the originating application of the results of the request. 
	 Start page information is included.
-->
<!ELEMENT ProviderSetupResponse (StartPage)>

<!--
    Contains any information the originating application must know about the 
	completed operation at the provider site.
-->
<!ELEMENT ProviderDoneMessage (OriginatorCookie, ReturnData*)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->


<!--
    Notifies any organization about waiting documents that can be retrieved using the data download transaction.
-->
<!ELEMENT DataAvailableMessage (InternalID)>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->


<!--
    Contains a data request. After you obtain a DataAvailableMessage, use its internal 
	ID value to download the waiting documents by sending a DataRequest document.
-->
<!ELEMENT DataRequest (InternalID)>

<!--
    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$
-->

<!--
    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)>
<!--
	@attr operation Specifies the type of upload to perform. Possible values:
		<ul>
		<li>new - Uploads a new catalog. A catalog with the same name must not exist.</li>
		<li>update - Overwrites an exiting catalog. A catalog with the same name must exist.</li>
		</ul>
-->
<!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 -->
<!--
	@attr xml:lang Specifies the language or locale used for the catalog name.
-->
<!ATTLIST CatalogName
    xml:lang  %xmlLangCode;  #REQUIRED
>

<!--
    The list of the commodity codes.
-->
<!ELEMENT Commodities (CommodityCode+)>

<!--
    The two-digit code
-->
<!ELEMENT CommodityCode ( #PCDATA )> <!-- string -->

<!--
    AutoPublishAutoPublish automatically publishes the catalog to buyers after upload.
	
	You can automatically publish only if both of the following requirements are met:
	<ol>
	<li>A previous version of the catalog exists in your account and you are performing an update operation.</li>
	<li>The previous version is in the "published" state. It must have been published private (with a list 
		of buyers) or public.</li>
	</ol>
-->
<!ELEMENT AutoPublish EMPTY>
<!--
	@attr enabled Specifies whether to automatically publish the catalog. Possible values:
		<ul>
		<li>true - Publishes the catalog. It must be an update to a previously published catalog.</li>
		<li>false - Does not publish the catalog. You can log on to your account and manually publish the catalog.</li>
		</ul>
-->
<!ATTLIST AutoPublish
    enabled       %string;       #REQUIRED
>

<!--
    The information used by the network hub 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 "success" (meaning the
    catalog is validated or published) or "failed" (meaning the 
	catalog has errors).
-->
<!ELEMENT URLPost EMPTY>
<!--
	@attr enabled Specifies whether the network sends catalog-status notifications through StatusUpdateRequest. Possible values:
		<ul>
		<li>true - Enables the feature.</li>
		<li>false - Disables the feature.</li>
		</ul>
-->
<!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 $
-->

<!--
    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
    web server 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?)>

<!--
    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 
	(http://www.w3.org/2000/09/xmldsig).
-->
<!ELEMENT X509Data ((X509IssuerSerial |
                     X509SKI |
                     X509SubjectName |
                     X509Certificate)+ |
                     X509CRL)>

<!--
    Contains the serial number and issuer name
    of the X.509 certificate.
-->
<!ELEMENT X509IssuerSerial (X509IssuerName, X509SerialNumber) >

<!--
    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 -->

<!--
    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 -->

<!--
    Contains the serial number of the X.509 certificate.
-->
<!ELEMENT X509SerialNumber (#PCDATA)> <!-- string -->

<!--
    Contains the Subject Key Identifier of the X.509
    certificate.
 -->
<!ELEMENT X509SKI (#PCDATA)> <!-- string -->

<!--
    Contains a Base 64-encoded X.509v3 certificate.
-->
<!ELEMENT X509Certificate (#PCDATA)> <!-- string -->

<!--
    Contains a Base 64-encoded X.509v3 Certificate Revocation List.
-->
<!ELEMENT X509CRL (#PCDATA)> <!-- string -->

<!--
    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) is returned.
-->
<!ELEMENT AuthResponse (Credential)+>
<!--
	@attr 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.

        If expirationDate is not specified, it is assumed that caching of 
		AuthResponse information is not allowed.
-->
<!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.
-->
<!ELEMENT PaymentMethod (Description?)>
<!--
	@attr type The payment method type. Possible values:
		<ul>
		<li>ach</li>
		<li>cash</li>
		<li>check</li>
		<li>creditCard</li>
		<li>debitCard</li>
		<li>draft</li>
		<li>wire</li>
		<li>other</li>
		</ul>
-->
<!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, and 
	so on.

    Contact: Contact information of the payment partner. Allowed contact
        roles include payer, payee, originatingBank, receivingBank,
        originatingCorrespondentBank, receivingCorrespondent, 
        receivingCorrespondentBank, intermediaryBank, payeeContact, 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.
		
		If the contact role is payee, the name under the contact is the supplier 
		organization name. If the contact role is payeeContact, the name under 
		the contact is the supplier contact name.

    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", and so on.

        The bank account identification is specified as follows:
		<ul>
            <li>bankAccountID - Domestic account number.</li>
			<li>ibanID - IBAN ID (International Bank Account Number) as
				specified in ISO 13616.</li>
		</ul>

        The bank identification is specified as follows:
		<ul>
            <li>abaRoutingNumber - ABA (American Banking Association) Routing Number).</li>
            <li>swiftID - SWIFT ID (Society for Worldwide Interbank Financial Telecommunications).</li>
            <li>chipsID - CHIPS ID (Clearing House Interbank Payment System).</li>
            <li>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).</li>
            <li>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.</li>
		</ul>
	    
        The bank branch identification, if necessary, is specified as follows:
            <ul>
			<li>bankBranchID - The bank branch ID.</li>
			</ul>

        The following table illustrates some valid combinations of
        Contact and IdReference domains:
		<table colsep="1" rowsep="1">
			<thead>
				<tr>
					<th>Contact.role</th>
					<th>IdReference.domain</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>payer</td>
					<td>bankAccountID, ibanID</td>
				</tr>
				<tr>
					<td>payee</td>
					<td>bankAccountID, ibanID</td>
				</tr>
				<tr>
					<td>receivingCorrespondent</td>
					<td>bankAccountId, swiftID</td>
				</tr>
				<tr>
					<td>originatingBank</td>
					<td>abaRoutingNumber, bankNationalID, isoBicID, swiftID, bankBranchID (optional)</td>
				</tr>
				<tr>
					<td>receivingBank</td>
					<td>abaRoutingNumber, bankNationalID, isoBicID, swiftID, bankBranchID (optional)</td>
				</tr>
				<tr>
					<td>originatingCorrespondentBank</td>
					<td>abaRoutingNumber, isoBicID, swiftID</td>
				</tr>
				<tr>
					<td>receivingCorrespondentBank</td>
					<td>abaRoutingNumber, isoBicID, swiftID</td>
				</tr>
				<tr>
					<td>intermediaryBank</td>
					<td>abaRoutingNumber, isoBicID, swiftID</td>
				</tr>
			</tbody>
		</table>

	The IDReference can only appear for the Contact with payer role. This is used
    when the payment is done through a PCard.

    PCard: PCard information including PCard number, PCard expiration date,
		PCard name.
		
	NatureOfBusiness: Specifies the sector or industry to which a company belongs. 
		It describes what the company does. The data type is a string and can be 
		any characters with max 255 characters.

    AccountCurrency: Refers to the account currency for the current PaymentPartner
-->
<!ELEMENT PaymentPartner (Contact, IdReference*, (PCard? | PaymentToken?)? , NatureOfBusiness?, IncorporationType?, AccountCurrency?)>

<!-- 
   The nature of business refers to the sector or industry to which a company belongs. 
   It describes what the company does. The data type is string and can be any characters 
   with max 255 characters.
-->
<!ELEMENT NatureOfBusiness (#PCDATA)>
<!--
   The IncorporationType refers to the company type. The data type is string and can be any
   characters with max 255 characters.
-->
<!ELEMENT IncorporationType (#PCDATA)>

<!--
   Refers to the account currency for a PaymentPartner.
-->
<!ELEMENT AccountCurrency EMPTY>

<!-- 
    @attr code Specifies a three-letter ISO 4217 currency code.
-->
<!ATTLIST AccountCurrency
    code   %isoCurrencyCode;   #REQUIRED
>

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

    $Id$
-->
<!--
     Defines a supplier organization.
-->
<!ELEMENT Organization (Name, Credential+, OrganizationRole*, Address, CorporateInformation?, TaxInformation?, RelationshipInformation?, Description*,  Person*, Industry*, Commodity*, Territory*, PaymentInformation*, Extrinsic*)>

<!-- 
    Requests profile information for suppliers with which the buyer has relationships.

    The OrganizationID wrapper is used to distinguish between requests
    about multiple organizations and requests including alias Credentials
    for the same organization.
-->
<!ELEMENT OrganizationDataRequest
         (OrganizationID+)>

<!--
    Returns supplier profile information.
-->
<!ELEMENT OrganizationDataResponse (Organization+)>

<!--
	Used to push organization information to another system.
-->
<!ELEMENT OrganizationChangeMessage (Organization+)>
<!--
	@attr type Type of organization change (enumeration).
-->
<!ATTLIST OrganizationChangeMessage
    type  (new | update | delete)  #REQUIRED
>

<!-- 
	Contains corporate information for a supplier.
-->	
<!ELEMENT CorporateInformation (AnnualRevenue?, StateOfIncorporation?, OwnershipType*)>
<!--
	@attr yearFounded Year the supplier organization was founded.
	
	@attr numberOfEmployees Number of employees in the supplier organization.
	
	@attr organizationType Type of supplier organization.
-->
<!ATTLIST CorporateInformation
    yearFounded        %uint; #IMPLIED
    numberOfEmployees  %uint; #IMPLIED
    organizationType  NMTOKEN #IMPLIED
>

<!--
	State in which the supplier organization was incorporated.
-->
<!ELEMENT StateOfIncorporation (State)>

<!--
	Annual revenue of the supplier organization.
-->
<!ELEMENT AnnualRevenue (MinAmount, MaxAmount?)>

<!--
	Ownership type of the supplier organization.
-->
<!ELEMENT OwnershipType (Extrinsic*)>
<!--
	@attr name Name of ownership type. For United States companies, can be either "minorityOwned", "womanOwned", 
		"veteranOwned", "disabledVeteranOwned", or "vietnamVeteranOwned". The list is not enumerated since it can be 
		different for different countries.
-->
<!ATTLIST OwnershipType
    name  NMTOKEN #REQUIRED
>

<!--
	Contains associated tax information for an organization that can be
    used for 1099 purposes.
-->	
<!ELEMENT TaxInformation (LegalName?, TaxID*)>
<!--
	@attr isExemptFromBackupWithholding Indicates whether the organization is exempt from backup withholding.
-->
<!ATTLIST TaxInformation
    isExemptFromBackupWithholding  (yes | no) #IMPLIED
>

<!--
	Legal name of the owner of the Social Security Number or Tax Identification Number.
-->
<!ELEMENT LegalName (#PCDATA)>
<!--
	@attr xml:lang Language or locale in which the LegalName is written. 
-->
<!ATTLIST LegalName
    xml:lang  %xmlLangCode;  #REQUIRED
>

<!--
	Contains the Tax Identification Number (TIN) or Social Security Number.
-->
<!ELEMENT TaxID (#PCDATA)>
<!--
	@attr domain Specifies the type of tax ID (enumeration).
-->
<!ATTLIST  TaxID
    domain  (usSSN | usTIN | stateTIN | regionalTIN | vatID)  #REQUIRED
>

<!--
	Contains anything that is specific between the
    requester and requestee.
--> 
<!ELEMENT RelationshipInformation (PaymentRelationshipInformation?)>
		
<!--
	Contains payment information between requester and requestee. 
-->
<!ELEMENT PaymentRelationshipInformation (PaymentProviderInformation+, Extrinsic*)>
                      
<!--
	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*)>
<!--
	@attr paymentProviderID ID of the payment provider payment service.
-->
<!ATTLIST PaymentProviderInformation
     paymentProviderID %string; #REQUIRED
>

<!--
    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*, AuthorizationProfiles?)>

<!--
    Contains the possible values the Contact&#064;role attribute may take
    when the associated Contact appears in a cXML Request (such as
    ProviderSetupRequest).
-->
<!ELEMENT PersonRole EMPTY>
<!--
	@attr name Name of the role of a supplier user.
-->
<!ATTLIST PersonRole
    name NMTOKEN #REQUIRED
>

<!--
	Defines the industry to which a supplier organization belongs.
-->
<!ELEMENT Industry (Classification)>

<!--
	Defines the principle commodity of a supplier organization.
-->
<!ELEMENT Commodity (Classification)>

<!--
	Defines the territory of a supplier organization.
-->
<!ELEMENT Territory (Classification)>

<!--
	Contains payment information for the organization.
-->
<!ELEMENT PaymentInformation (PaymentMethodRemittanceInformation+)>

<!--
	Contains payment remittance information for the organization, including payment methods and payment method partners.
-->
<!ELEMENT PaymentMethodRemittanceInformation (Contact, PaymentMethod*, PaymentMethodPartner*)>
<!--
	@attr isDefault Set to "yes" to indicate whether this is the default payment method remittance information.
	
	@attr preferredPaymentMethod Specifies the preferred payment method.
-->
<!ATTLIST PaymentMethodRemittanceInformation
    isDefault (yes) #IMPLIED
    preferredPaymentMethod %cxml.paymentMethod; #IMPLIED
>

<!--
	Includes 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. Similarly, for the receiving correspondent bank, we have the 
    roles receivingCorresondent and receivingCorrespondentBank
-->
<!ELEMENT PaymentMethodPartner (PaymentMethod, PaymentPartner+) >

<!-- 
   Identifies an Authorization Profiles holds all single authorization profiles
--> 
<!ELEMENT AuthorizationProfiles (AuthorizationProfile*)> 

<!-- 
   Includes the SOD Authorization Profile data , combination name and owning org is unique 
--> 


<!ELEMENT AuthorizationProfile (AttributeDomain*)> 
<!-- 
   @attr name - Authorization Profile name visualised to the client.      

   @attr owningOrg - The AN ID of the buyer organization created this profile 

--> 

<!ATTLIST AuthorizationProfile 
    name          %string;                 #REQUIRED 

    owningOrg     %string;                 #REQUIRED 
> 

<!-- 
   Identifies an AttributeDomain , Authorization Profiles are containging attributes - properties that SOD is using .
   These attributes are applied to specific documents like Order Collaboration Planning Quality or GENERAL group .
   Because the names of some attributes are not unique we need to specify also which document they are intended to be applied 

   All the attributes should be listed as IdReference , where domain to be the unique attribute code ex. : sip program .. etc. identifier single value .
   If single attribute sip has two or more values - to be listed as to separate lines - to separate IdReferences
--> 

<!ELEMENT AttributeDomain (IdReference*)>  

<!-- 
   @attr name PLANNING_COLLABORATION,QUALITY_COLLABORATION ORDER_COLLABORATION,  GENERAL - documents this auth profiles property is applicable 
   two - some of the keys are not unique so is mandatory to have key + documentType combination 

--> 

<!ATTLIST AttributeDomain 
    name (ORDER_COLLABORATION|PLANNING_COLLABORATION|QUALITY_COLLABORATION|GENERAL) #REQUIRED
> <!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: //ariba/cxml/schema/Modules/OrganizationID.mod#1 $
-->
<!--
     The unique identification of the supplier. This element is used by 
	 the buyer to specify suppliers that are invited for bidding.

     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 $
-->


<!--
    Identifies one of the roles this (new) organization
    is playing.
-->
<!ELEMENT OrganizationRole EMPTY>
<!--
    @attr name Name of the role played by the organization. Common values
        include "supplier" and "buyer".
-->
<!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?)  >
<!--
    @attr quantity Number of stock items in transfer.
-->
<!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?)  >
<!--
    @attr quantity Number of unrestricted stock items.
-->
<!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?)  >
<!--
    @attr quantity Number of blocked stock items.
-->
<!ATTLIST BlockedQuantity
    quantity        %r8;       #IMPLIED>

<!-- 
	QualityInspectionQuantity is the stock type where the received stock is under quality inspection.
-->
<!ELEMENT QualityInspectionQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of stock items under quality inspection.
-->
<!ATTLIST QualityInspectionQuantity
    quantity        %r8;       #IMPLIED>

<!--
	PromotionQuanity is the stock quantity that is reserved for promotions.
-->
<!ELEMENT PromotionQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of stock items reserved for promotions.
-->
<!ATTLIST PromotionQuantity
    quantity        %r8;       #IMPLIED>
<!--
	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?)  >
<!--
    @attr quantity Number of stock items in transfer from plant to plant.
-->
<!ATTLIST StockInTransferQuantity
    quantity        %r8;       #IMPLIED>

<!-- 
	Quantity used to increment (add to) stock.
-->
<!ELEMENT IncrementQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of stock items to increment.
-->
<!ATTLIST IncrementQuantity
    quantity        %r8;       #IMPLIED>

<!--
	Minimum stock level above which the stock has to be maintained.
-->
<!ELEMENT RequiredMinimumQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of minimum stock items to maintain in inventory.
-->
<!ATTLIST RequiredMinimumQuantity
    quantity        %r8;       #IMPLIED>

<!--
	Maximum stock level above which the stock has to be maintained.
-->
<!ELEMENT RequiredMaximumQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of maximum stock items to maintain in inventory.
-->
<!ATTLIST RequiredMaximumQuantity
    quantity        %r8;       #IMPLIED>

<!--
	Forecast represents the forecast quantity of a product for a specific time period.
-->
<!ELEMENT Forecast (Period, ForecastQuantity, UnitPrice?, Extrinsic*)  >

<!--
	Forecast quantity of a product for a specific time period.
-->
<!ELEMENT ForecastQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of forecast items.
-->
<!ATTLIST ForecastQuantity
    quantity        %r8;       #IMPLIED>

<!--
	The quantity withdrawn in a consignment movement.
-->
<!ELEMENT MovementQuantity (UnitOfMeasure?)  >
<!--
    @attr quantity Number of stock items withdrawn in a consignment movement.
-->
<!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?)>
<!--
    @attr minimum Minimum order quantity.
	
    @attr maximum Maximum order quantity.
-->
<!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>
<!--
    @attr minimum Minimum days of supply quantity.
	
    @attr maximum Maximum days of supply quantity.
-->
<!ATTLIST DaysOfSupply
    minimum        %r8;    #IMPLIED
    maximum        %r8;    #IMPLIED >

<!--
	Represents the calculated value of different Stock types dependent on the customer, location, and material.
-->
<!ELEMENT StockOnHandQuantity (UnitOfMeasure?)>
<!--
	@attr quantity Number of stock items on hand depending on the customer, location, and material.
-->
<!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?)>
<!--
	@attr quantity Number of work in progress stock items.
-->
<!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?)>
<!--
	@attr quantity Number of stock items in transit.
-->
<!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?)>
<!--
	@attr quantity Number of scrapped stock items.
-->
<!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.

    TimeSeriesValue: The generic value associated with the timeseries. This can be used for non-numeric values like priority. 
		It is tightly coupled with the keyfigure type specified in the enclosing TimeSeries Element. 

    TimeSeriesAmount: The generic value associated with the timeseries. This can be used to hold any Amount or price based 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.

    Note: Priority Element is removed and hence please use TimeSeriesValue going forward to map non-numeric values for TimeSeries
-->
<!ELEMENT TimeSeriesDetails (Period, (TimeSeriesQuantity| TimeSeriesValue | TimeSeriesAmount)?, UpsideQuantity?, IdReference*, Extrinsic*)>

<!--
    The generic quantity associated with the given type of inventory timeseries or replenishment timeseries.
-->
<!ELEMENT TimeSeriesQuantity (UnitOfMeasure?)>
<!--
	@attr quantity Number of stock items in the given timeseries.
-->
<!ATTLIST TimeSeriesQuantity
    quantity        %r8;    #REQUIRED>
    
<!--
    The generic value associated with the timeseries. This can be used to hold any non-numeric values associated with timeseries.
-->
<!ELEMENT TimeSeriesValue (Description?)>
<!--
	@attr value Generic value associated with the timeseries. This can be used for non-numeric values like priority. 
		It is tightly coupled with the keyfigure specified in the TimeSeries.type attribute.
-->
<!ATTLIST TimeSeriesValue
    value        %string;    #REQUIRED>

<!--
    The generic value associated with the timeseries. This can be used to hold any Amount or price based timeseries.
-->
<!ELEMENT TimeSeriesAmount (Money)>

<!--
    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?)  >
<!--
	@attr quantity Number of stock items the supplier can provide above and beyond the request demand.
-->
<!ATTLIST UpsideQuantity
    quantity        %r8;       #REQUIRED >

<!--
	Defines a quality notification for one or more defects associated with a line item on a purchase order or a ship 
	notice. Buyers or suppliers can send a quality notification to each other. You use a code to classify each item 
	according to the type of problem or defect. The details of the problem or defect can contain causes, tasks, 
	activities, codes, code groups, and descriptions.
	
    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 that is common to all contained QualityNotificationRequestItem.
    
    DocumentReference: Reference to an earlier QualityNotificationRequest. If the attribute QualityNotificationRequestHeader&#064;operation 
		is "update", the DocumentReference is required and it must reference the original QualityNotificationRequest document (with 
		value "new" for its attribute QualityNotificationRequest&#064;operation) during the same notification process.
    
	QualityInspectionRequestReference: Reference to the Quality Inspection Request. The reference can contain the payloadId or 
		DocumentNumber and DocumentDate of the Quality Inspection Request. This is used in the case when quality inspection results 
		are not met successfully and a Quality Notification is created with reference to the Quality Inspection Request.

    QNCode: These codes define the quality notification in four domains:
		<ul>
        <li>"type" of quality notification without code group.</li>
        <li>"subject" (category) group and code.</li>
        <li>"reason" of this quality notification.</li>
        <li>"revision" quality notification revision.</li>
		</ul>
		
    ShipTo, BillTo, Shipping: Optional. Addresses related to item if it is not related to referenced purchase order or ship notice.
	
    Contact: Related contacts like buyerParty, sellerParty, senderBusinessSystemID, senderParty, receipientParty or componentSupplier.
	
    QNNotes: Structure to define comments and attachments.
	
    Priority: Priority for quality notification.
	
    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 Quality Notification without a referenced document in which case 
		relevant information should be send in the other elements.
	 
    ItemInfo: To get the goods 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 quality notification 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 Quality Notification level: Activity Number, Code Group (Activity type)
		Code Group description, Activity Code, Code Description, Description, Comments for activity Section,
		Status, start end datetime.
	
    AssetInfo: The list of asset information of the complaint items.

    Extrinsic: Additional information related to this document.

    QualityNotificationHeaderIndustry: Industry specific header information.
-->
<!ELEMENT QualityNotificationRequestHeader (
    DocumentReference?,
    QualityInspectionRequestReference?,
    QNCode*,
    ShipTo?,
    BillTo?,
    Shipping?,
    Contact*,
    QNNotes+,
    Priority,
    RequestedProcessingPeriod?,
    MalfunctionPeriod?,
    ReferenceDocumentInfo?,
    ItemInfo,
    Batch?,
    ComplainQuantity?,
    ReturnQuantity?,
    QualityNotificationTask*,
    QualityNotificationActivity*,
    AssetInfo*,
    Extrinsic*,
    QualityNotificationHeaderIndustry?)>
<!--
    @attr requestID The network hub document number for the quality notification.
	
    @attr externalRequestID ERP document number for the quality notification.
	
    @attr requestDate Quality notification request date and time.
	
    @attr requestVersion Version number of this document if the current operation is "update".
	
    @attr operation Operation to be performed. Possible values:
        <ul>
		<li>new - Creates a new quality notification.</li>
		<li>update - Updates an existing quality notification. The DocumentReference element references 
			the original quality notification.</li>
		</ul>
		
    @attr status Current status of the document. Possible values: draft, new (default), in-process, completed, 
		postponed, canceled, and closed.
		
    @attr discoveryDate Date and time when the defect was discovered.
	
    @attr serialNumber Serial number of the defective goods.
	
    @attr returnDate Date on which the defective goods were returned.
	
    @attr returnAuthorizationNumber Return Authorization Number information for a line item.
	
    @attr itemCategory Set to "subcontract" if the defect originated with a subcontract supplier.
	
    @attr minimumRequiredTasks Number of minimum required tasks to close this quality notification. Evaluated only 
		when the status is "closed".
		
    @attr minimumRequiredActivities Number of minimum required activities to close this quality notification. 
		Evaluated only when the status is "closed".
		
    @attr minimumRequiredCauses Number of minimum required causes to complete a defect. Evaluated only when this 
		attribute is not present at the defect level.	
-->
<!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  
>

<!--
    Contains defect item detail for a quality notification.

    QNCode: Code with domain "defect" represents the defect's category/subcategory.
		Code with domain "defectLocation" represents the area where the defect occurs.
    
	OwnerInfo: Contains information about the owner of this defect.
    
	Description: Explanatory text describing this defect.

	QNNotes: Structure to define comments and attachments.
	
    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.
    
	AssetInfo: The list of asset information of the complaint items.
    
	Extrinsic: Additional information related to this defect.
-->
<!ELEMENT QualityNotificationRequestItem (
    QNCode*,
    OwnerInfo?,
    Description?,
    QNNotes*,
    Period?,
    AdditionalQNInfo*,
    QualityNotificationTask*, 
    QualityNotificationActivity*, 
    QualityNotificationCause*,
    AssetInfo*,
    Extrinsic*)>
<!--
    @attr defectId Number of the defect.

    @attr defectCount Quantity of defects in this quality notification item.

    @attr isCompleted Set to "yes" if all activities and tasks were completed.

    @attr completedDate Date and time when quality notification item was completed.

    @attr minimumRequiredTasks Number of minimum required tasks to complete this defect. Evaluated only when the isCompleted is true.

    @attr minimumRequiredActivities Number of minimum required activities to complete this defect. Evaluated only when the 
		isCompleted is true.

    @attr minimumRequiredCauses Number of minimum required tasks to complete this defect. Evaluated only when the isCompleted is true.
-->
<!ATTLIST QualityNotificationRequestItem
    defectId                     %string;         #REQUIRED
    defectCount                  %uint;           #IMPLIED
    isCompleted                  (yes)            #IMPLIED
    completedDate                %datetime.tz;    #IMPLIED
    minimumRequiredTasks	     %uint;           #IMPLIED
    minimumRequiredActivities    %uint;           #IMPLIED
    minimumRequiredCauses        %uint;           #IMPLIED
>

<!--
    Provides additional information about a quality notification, such as part numbers (customer or supplier), batch information, or other information.

    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*)>
<!--
    @attr lineNumber Represents the AdditionalQNInfo line number.
-->
<!ATTLIST AdditionalQNInfo
    lineNumber              %string;         #REQUIRED
>

<!--
    Quality notification task.

    QNCode: Codes for task with domain "task".

    OwnerInfo: Contains information about the owner of this task.

    Description: Explanatory text describing this task.

    QNNotes: Structure to define comments and attachments.

    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?,
    QNNotes*,
    Period?,
    Extrinsic*)>
<!--
    @attr taskId Number of the task.
	
    @attr status Current state of execution of this task. "Close" status is the final step when a task 
		is considered closed. 
		
    @attr completedDate Date time when task was completed.
	
    @attr completedBy User ID of the person who completed this task.
	
	@attr processorId The ID of the person or organization responsible for this task. In the case of a 
		supplier, can be the user ID or the network hub ID.
		
    @attr processorName The name of the person or organization responsible for this task. In the case of a supplier, 
		can be the user name or company name.
		
    @attr processorType Type of processor.
-->
<!ATTLIST QualityNotificationTask
    taskId               %string;         #REQUIRED
    status               (new | in-process | complete | close)         "new"
    completedDate        %datetime.tz;    #IMPLIED
    completedBy          %string;         #IMPLIED
    processorId          %string;         #IMPLIED
    processorName        %string;         #IMPLIED
    processorType        (customer | supplier | customerUser)  #IMPLIED
>
 
<!--
    Quality notification activity.

    QNCode: Codes for activities with domain "activity".
	
    OwnerInfo: Contains information about the owner of this activity.
    
	Description: Explanatory text describing this activity.

	QNNotes: Structure to define comments and attachments.
    
	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?,
    QNNotes*,
    Period?,
    Extrinsic*)>
<!--
    @attr activityId Number of the activity.
	
    @attr isCompleted Set to "yes" if the activity was completed.
-->
<!ATTLIST QualityNotificationActivity
    activityId         %string;        #REQUIRED
    isCompleted        (yes)           #IMPLIED
>

<!--
    Industry specific header information

    AerospaceAndDefense: Provides Aerospace and Defense Industry information.
-->
<!ELEMENT QualityNotificationHeaderIndustry (AerospaceAndDefense?)>

<!--
    Defines the cause of a quality notification.

    QNCode: Group and codes defining the type of cause.
	
    OwnerInfo: Contains information about the owner of this cause.
	
    Description: Explanatory text describing this cause.

    QNNotes: Structure to define comments and attachments.
	
    Extrinsic: Additional information related to this cause.
-->
<!ELEMENT QualityNotificationCause (
    QNCode?,
    OwnerInfo?,
    Description?,
    QNNotes*,
    Extrinsic*)>
<!--
    @attr causeId Number of the cause.
-->
<!ATTLIST QualityNotificationCause
    causeId          %string;         #REQUIRED
>

<!--
    Support for quality notification codes and their descriptions in different domains.
-->
<!ELEMENT QNCode EMPTY>
<!--
    @attr domain Domain in which this value has meaning. Recognized domains includes:
		<ul>
		<li>type - Quality notification type, does not have code group.</li>
        <li>subject - Quality notification subject (category).</li>
        <li>reason - Reason of defect.</li>
        <li>task - Quality notification task.</li>
        <li>activity - Quality notification activity.</li>
        <li>defect - Quality notification defect.</li>
        <li>defectLocation - Area where a quality notification defect occurs (used in 
			QualityNotificationRequestItem only).</li>
        <li>cause - Quality notification cause.</li>
        <li>revision - Quality notification revision.</li>
		</ul>
		
    @attr codeGroup Name of the code group.
	
    @attr codeGroupDescription Description of the code group.
	
    @attr code Quality notification code.
	
    @attr codeDescription Description of the quality notification code.
-->
<!ATTLIST QNCode
    domain               %string;       #REQUIRED
    codeGroup            %string;       #IMPLIED
    codeGroupDescription %string;       #IMPLIED
    code                 %string;       #REQUIRED
    codeDescription      %string;       #REQUIRED
>

<!--
    Defines subject code, description, and attachments of a quality notification.

    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*)>
<!--
    @attr user User name or user ID of the person who created the message.
	
    @attr createDate Timestamp of the message.
-->
<!ATTLIST QNNotes
    user        %string;        #REQUIRED
    createDate  %datetime.tz;   #REQUIRED
>

<!--
    Quantity that was subject to complaints.

    UnitOfMeasure: Unit of measure defined in cXML.dtd.
-->
<!ELEMENT ComplainQuantity (UnitOfMeasure)>
<!--
    @attr quantity Number of items subject to complaints.
-->
<!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.
-->
<!ELEMENT OwnerInfo EMPTY>
<!--
    @attr owner Owner of the element. This attribute should contain the userId

    @attr role Role of the owner. Possible values are customer or supplier.
-->
<!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.
    
    DocumentReference: Reference to an earlier QualityInspectionRequest. If the attribute QualityInspectionRequestHeader&#064;operation is "update", 
		the DocumentReference is required and it must reference the original QualityInspectionRequest document (with value "new" for 
		its attribute QualityInspectionRequest&#064;operation) during the same quality inspection process.
	
		If the attribute QualityInspectionRequestHeader&#064;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.

    AssetInfo: The list of asset information of the complaint items.

    Comments: Comments associated with Quality Inspection Request.

    Extrinsic: Optional additional information related to Quality Inspection Request.

    QualityInspectionHeaderIndustry: Industry specific header information.
-->
<!ELEMENT QualityInspectionRequestHeader (
    DocumentReference?,
    IdReference,
    ShipTo?,
    BillTo?,
    Contact*,
    Period?,
    Priority?,
    ReferenceDocumentInfo?,
    ItemInfo,
    SampleDefinition?,
    Batch?,
    QualityInfo?,
    AssetInfo*,
    Comments?,
    Extrinsic*,
    QualityInspectionHeaderIndustry?)>
<!--
    @attr requestID Network hub document number for the quality inspection request.

    @attr requestDate Quality inspection request date and time.

    @attr operation Operation to be performed. Possible values:
		<ul>
		<li>new (default) - Creates a new quality inspection request.</li>
        <li>update - Updates an existing quality inspection request.</li> 
        <li>delete - Cancels an existing quality inspection request.</li>
		</ul>
        For update and delete operations, the DocumentReference element should indicate the original quality inspection request.
		
    @attr version Version number of this document if the current operation is update. The version of a new 
		QualityInspectionRequest is 1. An update would increment the version to 2, 3, 4, and so on.
	
    @attr createdBy User who created the quality inspection request.
-->
<!ATTLIST QualityInspectionRequestHeader
    requestID               %string;            #REQUIRED
    requestDate             %datetime.tz;       #REQUIRED
    operation               (new | update | delete)      "new"
    version                 %uint;              #IMPLIED
    createdBy               %string;            #IMPLIED
>

<!--
    Details about a 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.

    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*
    )>
<!--
    @attr characteristicID Number of the characteristic. The combination of this attribute with operationNumber should be unique.

    @attr operationNumber Inspection operation. The combination of this attribute with characteristicID should be unique.

    @attr workCenter Work center number.

    @attr procedure A text value that specifies how the sample size is calculated and how the inspection characteristic is assigned values. 

    @attr isLocked Set to "yes" to indicate that a characteristic is locked and no further valuations are allowed.

    @attr allowDefectRecording Set to "yes" to indicate that defect recording is allowed. If an inspection characteristic is rejected 
		during results recording, the function for recording defects for a characteristic is automatically invoked.

    @attr characteristicType A buyer uses inspection characteristics to describe the inspection criteria for materials, parts, and 
		products. This allows the buyer to plan inspections systematically, uniformly, and economically. An inspection request can 
		contain different types of characteristics, some required, optional, or conditional. Specify one of the following values:
		<ul>
		<li>required - The inspection of this characteristic is required to create an inspection decision.</li>
		<li>optional - The inspection of this characteristic is not required to create an inspection decision.</li>
		<li>afterAccept - This conditional inspection characteristic must be inspected if the previous required characteristic was accepted.</li>
		<li>afterRejection - This conditional inspection characteristic must be inspected if the previous required characteristic was rejected.</li>
		</ul>

    @attr isQuantitative Set to "yes" if this characteristic uses a numerical measurement. Otherwise, the characteristic uses a non-numerical, 
		qualitative measurement.

    @attr recordingType Indicates how the valuation will be sent for this characteristic: 
        <ul>
		<li>singleResult - Single values for each inspection characteristic.</li>
		<li>summarizedRecording - Summarized values for each inspection characteristic.</li>
		<li>noCharacteristicRecording - No characteristic record.</li>
		<li>classedRecording - Classed values for each inspection characteristic.</li>
		</ul>

    @attr expirationDate Expiration date of the characteristic.

    @attr inspectionPoint Inspection point types for equipment, functional locations, physical samples, or production. These inspection 
		point types can be assigned individually in the user specifications, if required.

    @attr version Version of characteristic. If any of the attributes change for the characteristic, the ERP generates another version for it.

    @attr isAdHoc Indicates whether the characteristic does not exist in the reference document and is an additional valuation.
-->
<!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
    isAdHoc                  (yes)             #IMPLIED
>

<!--
    Sample definition.
-->
<!ELEMENT SampleDefinition EMPTY>
<!--
    @attr sampleSize Number of the samples required.

    @attr sampleType Sample type. Possible values are:
		<ul>
        <li>samplingProcedure - 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).</li>
        <li>additiveSample - When samples are calculated, the size of the partial sample is increased by the quantity that is 
			required for the inspection of this characteristic.</li>
        <li>destructiveSample - The sample should be destroyed after inspection. This means that it is no longer available. 
			This quantity is used in the usage decision as the proposed quantity for the posting to sample.</li>
        <li>spcCharacteristic - A statistical process control chart should be run.</li>
		</ul>
-->
<!ATTLIST SampleDefinition 
    sampleSize               %uint;            #IMPLIED
    sampleType               (samplingProcedure | additiveSample | destructiveSample | spcCharacteristic) #IMPLIED
>

<!--
    Industry specific header information for Quality Inspection Request.

    AerospaceAndDefense: Provides Aerospace and Defense Industry information.
-->
<!ELEMENT QualityInspectionHeaderIndustry (AerospaceAndDefense?)>

<!--
    Allowed values during the valuation.

    PropertyValue: List of available values. This is mandatory when "choice" is selected for type attribute.
		This element is used also to provide the unit of measure of the allowed values by characteristic using 
		PropertyValue&#064;Characteristic.
-->
<!ELEMENT AllowedValues (PropertyValue?)>
<!--
    @attr type Type of allowed values. Possible values:
		<ul>
		<li>numeric - Only numeric values are allowed during the valuation.</li>
		<li>decision - Only "Accept" and "Reject" values are allowed during the valuation.</li>
		<li>choice - The provided values in "PropertyValue" element are allowed during the valuation.</li>
		</ul>
-->
<!ATTLIST AllowedValues     
    type         (numeric | decision | choice)      #IMPLIED
>

<!--
    Expected result for a measurement.

    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?)>
<!--
    @attr targetValue Target value for the measurement.
	
    @attr valuePrecision Integer specifying the number of decimal places to include in the result.
	
    @attr qualitativeValue A non-numerical value (a string) to send the expected result for qualitative valuation.
-->
<!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.
-->
<!ELEMENT ComparatorInfo EMPTY>
<!--
    @attr comparatorType Type of comparison.

    @attr comparatorValue Reference value to make the comparison.
-->
<!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.

    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, including one by attachment. If a Comments element includes 
		an attached document, the Comments&#064;type attribute supports only "CertificateOfAnalysis" and "CertificateOfConformance". 
		For other document types, do not send the type.
    
	QualityInspectionQuantity: Inspection lot quantity could be filled by supplier based on the inspected quantity on 
		QualityInspectionResult. Generally, it is send by the buyer but if not contract manufacturer based on the 
		inspection lot can provide this quantity.
    
	AssetInfo: The list of asset information of the valuated items.
    
	Extrinsic: Optional additional information related to Quality Inspection Result. 
-->
<!ELEMENT QualityInspectionResultRequestHeader (
    QualityInspectionRequestReference,
    Batch*,
    Comments*,
    QualityInspectionQuantity?,
    AssetInfo*,
    Extrinsic*)>
<!--
    @attr resultID Network hub document number for the quality inspection result.

    @attr resultDate Quality inspection result date and time.

    @attr version Version of the document.

    @attr createdBy User who created the quality inspection result.
-->
<!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.

    QualitySampleResult: Valuation for each sample inspected. When QualityInspectionCharacteristic&#064;recordingType is "summarizedRecording" 
	and AllowedValues@type is "decision" or "choice" the summarized valuation is sent in this element. When QualityInspectionCharacteristic&#064;recordingType 
	is "summarizedRecording" and AllowedValues&#064;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*
    )>
<!--
    @attr valuationID Number of the valuation.

    @attr characteristicID Characteristic ID number. The combination of this attribute with operationNumber should be unique.

    @attr operationNumber Inspection operation number. The combination of this attribute with characteristicID should be unique.

    @attr workCenter Work center number.

    @attr meanValue Mean value in the valuation.

    @attr aboveTolerance Number of samples above tolerance limit.

    @attr belowTolerance Number of samples below tolerance limit. 

    @attr inspectedQuantity Number of samples inspected.

    @attr nonConformance Total number of samples above and below tolerance limits. This value is auto-calculated when suppliers 
		specify the aboveTolerance or belowTolerance values. Otherwise, suppliers can specify the nonConformance value.

    @attr deviation Standard deviation value.

    @attr variance Variance of valid measured values for this characteristic. Applies to calculated characteristics for 
		which the valuation is based on a formula.

    @attr numberOfDefects Number of the defects in this valuation.

    @attr serialNumber Single unit number for the unit to be inspected.

    @attr inspectionDate Date of the characteristic inspection.

    @attr isAdHoc Indicates whether the characteristic does not exist in the reference document and is an additional valuation..
-->
<!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
    isAdHoc                     (yes)             #IMPLIED
>

<!--  
    Contains the sample result after valuation. 
    
    PropertyValue: Result of the valuation when AllowedValues&#064;type is "choice" in QualityInspectionCharacteristic.
		This element is used also to provide the unit of measure of the valuation using PropertyValue&#064;Characteristic.
-->
<!ELEMENT QualitySampleResult (PropertyValue?)>
<!--
    @attr sampleID Sample Number in valuation.

    @attr unitValue Value of the sample.

    @attr physicalSampleNumber Unique number for the sample when the sample was taken.
-->
<!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?
    )>

<!--
	The quantity of stock to post as sample usage stock.
-->
<!ELEMENT SampleUsageQuantity (UnitOfMeasure?)>
<!--
	@attr quantity Number of items of sample usage stock.
-->	
<!ATTLIST SampleUsageQuantity
    quantity        %r8;       #IMPLIED>

<!--
	The quantity of new material. 
-->
<!ELEMENT NewMaterialQuantity (UnitOfMeasure?)>
<!--
	@attr quantity Number of items of new material.
-->
<!ATTLIST NewMaterialQuantity
    quantity        %r8;       #IMPLIED>

<!--
	The quantity of items kept in reserve. 
-->
<!ELEMENT ReserveQuantity (UnitOfMeasure?)>
<!--
	@attr quantity Number of items kept in reserve.
-->
<!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.
    
    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*)>
<!--
    @attr decisionID Network hub document number for the quality inspection decision request.

    @attr decisionDate Quality inspection decision request date and time.

    @attr status Usage decision status. Possible values are "accepted" or "rejected".

    @attr qualityScore Quality score for this inspection decision.

    @attr createdBy The user who created the quality inspection decision request.
-->
<!ATTLIST QualityInspectionDecisionDetail
    decisionID               %string;            #REQUIRED
    decisionDate             %datetime.tz;       #REQUIRED
    status                   (accepted | rejected)   #IMPLIED
    qualityScore             %uint;                  #IMPLIED        
    createdBy                %string;                #IMPLIED
>

<!--
	Contains a unique identification of a production facility leveraged during production, such as a piece of equipment or a production line.

	ResourceType: Identifies the resource category the resourceID belongs to. 
  
	InputItemID: Uniquely identifies materials consumed by a resource during production process.
  
	OutputItemID: Uniquely identifies materials produced by a resource during production process.
-->
<!ELEMENT ResourceID (SupplierResourceID, ResourceType?, InputItemID?, OutputItemID?, IdReference*)>

<!--
	Uniquely identifies a plant, piece of equipment, or other production facilities leveraged by the supplier during production. 
-->
<!ELEMENT SupplierResourceID (#PCDATA)>

<!--
	Identifies the resource category the resourceID belongs to. 
-->
<!ELEMENT ResourceType (#PCDATA)>


<!--
	Uniquely identifies materials consumed by a resource during production process.
-->
<!ELEMENT InputItemID ( ItemID*)>

<!--
	Uniquely identifies materials produced by a resource during production process.
-->
<!ELEMENT OutputItemID ( ItemID*)>



<!--
    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.
==== -->


<!--
	Request that buyers use to send an approval notification for an order confirmation that contains line item values 
	that exceed the buyer's tolerances. The buyer can Approve, Reject, or Approve and Update the purchase order. The header 
	includes a reference to the original ConfirmationRequest document, which in turn references the original purchase order.

    ApprovalRequestHeader: The approval request header contains data that is relevant for the entire approval request. 
	This includes data about type of approval, date, and reference documents.
    
	AcceptanceItem: Approval request can contain one or more acceptance items. Acceptance item provides details about 
	a specific approval of a line item.
	
    ApprovalItem (Deprecated. Use AcceptanceItem instead): 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, (AcceptanceItem* | ApprovalItem*))>

<!--
	Contains data that is relevant for the entire approval request. This includes data about type of approval, date, reference documents.
	
    DocumentReference: Contains the payloadId of the underlaying document which is to approved. For example: OrderConfirmation.payloadId.
	
	cXMLAttachment: Contains the original (cXML) document which is to be approved, for example, original order confirmation cXML.
	
	Contact: Contact information for the document partners.
	
	Comments: Top-level comments.
-->
<!ELEMENT ApprovalRequestHeader (DocumentReference, cXMLAttachment , Contact?, Comments?, Extrinsic*)>
<!--
	@attr approvalStatus Approval status of the request (enumeration).
	
	@attr type The type of document needing approval. The only possible value is "orderConfirmation".

	@attr creationDate Date and time when the document was created.

	@attr approvalStartDate Reserved for future use. The date and time on which the approval is allowed to start.

	@attr approvalEndDate Reserved for future use. The date and time on which the approval is allowed to end.
-->
<!ATTLIST ApprovalRequestHeader
    approvalStatus           (approved | awaitingApproval | reject | approvedAndUpdatePO)         #IMPLIED
	type                   	 (orderConfirmation)  #REQUIRED
    creationDate              %datetime.tz;         #REQUIRED
    approvalStartDate         %datetime.tz;         #IMPLIED
	approvalEndDate           %datetime.tz;         #IMPLIED
>

<!--
	Usage of ApprovalItem is deprecated! Use AcceptanceItem instead.
	Line item that has to approved.
	
	UnitOfMeasure: Unit of measure to specify the quantity.
	
	Comments: Contains comments associated with this approval item.
-->
<!ELEMENT ApprovalItem (UnitOfMeasure, Comments?)>
<!--
	@attr lineNumber Number of the line item.

	@attr quantity Cumulative confirmed quantity of all elements of the same line item in the corresponding order confirmation.

	@attr approvalStatus Approval status of the line item (enumeration).

	@attr reason Reason why the line item is out of tolerance (enumeration).

	@attr startDate Reserved for future use.

	@hidden 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?

	@attr endDate Reserved for future use.

	@attr deviatedDate First delivery date of all confirmed elements of the same line item that is out of tolerance.
-->
<!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
>

<!--
	Line item that has to approved.
	
	DeviationReason: Deviation reason why it is not approved.
	
	Comments: Contains comments associated with this acceptance item.

	AcceptanceItemDetail: Contains the information about the deviation approved when the acceptance status is approvedAndUpdatePO.
-->
<!ELEMENT AcceptanceItem (DeviationReason*, Comments?, AcceptanceItemDetail*, Extrinsic*)>
<!--
	@attr lineNumber Number of the line item.

	@attr acceptanceStatus Acceptance status of the line item (enumeration).
-->
<!ATTLIST AcceptanceItem
	lineNumber				%uint;    			#REQUIRED
	acceptanceStatus		(approved | awaitingApproval | rejected | approvedAndUpdatePO) 	#REQUIRED
>

<!--
    Detail information for the item.
	
	AcceptanceScheduleDetail: Contains the information about the deviation approved when the acceptance status is approvedAndUpdatePO.
	
	UnitPrice: Unit price of the item. If this element is included, the unit price is updated.
	
	Extrinsic: Contains any additional information related to this AcceptanceItem.
-->
<!ELEMENT AcceptanceItemDetail (AcceptanceScheduleDetail+, UnitPrice?, Extrinsic*)>
<!--
    @attr approvedAction The action generated from the approval process. Possible values:
		<ul>
		<li>update - Updates an existing item with the lineNumber specified in the AcceptanceItem.</li>
		<li>replace - Replaces all the schedule information for an existing item with the lineNumber specified in the AcceptanceItem.</li>
		</ul>
-->
<!ATTLIST AcceptanceItemDetail
     approvedAction   (update | replace)           #IMPLIED
>

<!--
    Detail information for the schedule line.
-->
<!ELEMENT AcceptanceScheduleDetail (Extrinsic*)>
<!--
    @attr quantity Quantity approved.
    
	@attr deliveryDate Delivery date approved.
    
	@attr approvedAction The action generated from the approval process. Possible values:
		<ul>
		<li>new - Generates a new schedule line.</li>
		<li>update - Updates the schedule line of the specified lineNumber in the AcceptanceScheduleDetail.</li>
		<li>delete - The schedule line referenced no longer exists and must be deleted.</li>
		</ul>
		
	@attr lineNumber The line number of the schedule line to delete or update.	
-->
<!ATTLIST AcceptanceScheduleDetail
    quantity                 %r8;                       #REQUIRED
    deliveryDate             %datetime.tz;              #IMPLIED
    approvedAction           (new | update | delete)    #IMPLIED
    lineNumber               %uint;                     #IMPLIED
>

<!--
	Deviation reason.	
-->
<!ELEMENT DeviationReason (Comments?)>
<!--
	@attr value Type of deviation (enumeration).
-->
<!ATTLIST DeviationReason
	value					(dateDeviation | quantityDeviation | priceDeviation)         #REQUIRED
>

<!--
    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.
-->
<!ELEMENT ProductActivityMessage (ProductActivityHeader, ProductActivityDetails+, Extrinsic*)>
<!--
	@attr subcontractingIndicator Set to "yes" to indicate that the data in the message is related to subcontracting. 
-->
<!ATTLIST ProductActivityMessage
    subcontractingIndicator  (yes)          #IMPLIED
>

<!--
	Header element for the ProductActivityMessage.

	ProductActivityHeaderIndustry: Industry specific header information.
-->
<!ELEMENT ProductActivityHeader (ProductActivityHeaderIndustry?)>
<!--
	@attr messageID An identifier for this particular product activity message.

	@attr creationDate The date and time this product activity message was created.
        
	@attr processType Identifies the business process supported by the message. Possible values:
        <ul>
		<li>SMI - For Supplier Managed Inventory 
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
        <li>OEM - For Original Equipment Manufacturer owned Inventory scenarios
         (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries, InventoryTimeSeries).</li>
        <li>VMI - For Vendor Managed Inventory
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
        <li>3PL - For third party Logistics Inventory Scenarios
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
        <li>ManufacturingVisibility - Allow ContractManufacturers to share Inventory Visibility
         (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
        <li>Forecast - For Forecast Collaboration
         (TimeSeries, PlanningTimeSeries).</li>
        <li>Consignment - For Consignment Material Movements 
         (ConsignmentInventory, ConsignmentMovement).</li>
        <li>Sales - For Sales report Visibility
         (SalesReport).</li>
        <li>POC - For PO Collaboration Scenarios
         (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries)
         Capacity for Capacity Planning (PlanningTimeSeries).</li>
		<li>Capacity - Capacity planning scenarios (PlanningTimeSeries).</li>
        <li>StockInventory - For Stock Transport Order Collaboration (Inventory).</li>
		<li>Other - Other collaboration scenarios.</li>
		</ul>
-->
<!ATTLIST ProductActivityHeader
     messageID           %string;              #REQUIRED
     creationDate           %datetime.tz;         #IMPLIED
     processType (SMI|OEM|VMI|3PL|ManufacturingVisibility|Forecast|Consignment|Sales|POC|Capacity|StockInventory|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.

    ResourceID: A unique identification of a production facility leveraged during production, such as a piece of equipment or a production line.

    Description: Textual description of the component.

    Classification: Classification is used to group items into similar categories. This also includes product hierarchy and commodity information.
	
    SerialNumberInfo: This is a existing element. The representation of the required serial number information of a line item.
		Component Inventory will only accept only type="list" or type="range".

    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.
    
    ManufacturerName: Name of the item's manufacturer.

    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&#064;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.

	UnitOfMeasure: The unit of measure for an inventory/forecast/consignment quantity at the Item level. This will be applicable for the entire item 
		and will be defaulted over the unit of measure maintained across the time series quantities.		

    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| ResourceID),  Description?, Classification*, SerialNumberInfo?, ForecastDetails?, LeadTime?, PlannedAcceptanceDays?, 
    ManufacturerPartID?, ManufacturerName?, ReferenceDocumentInfo*, Characteristic*, Batch?, Contact*, UnitPrice?, Inventory?, 
    ConsignmentInventory?, TimeSeries*, PlanningTimeSeries*, InventoryTimeSeries*, ConsignmentMovement*, 
    SalesReport?, UnitOfMeasure?, Extrinsic*)>
<!--
    @attr status Indicates whether the material used in the planning process is "active", "inactive", or "deleted".
-->
<!ATTLIST ProductActivityDetails
	status (active|inactive|deleted)		#IMPLIED
>

<!--
	Industry specific Header information for Product Activity Message.

        AerospaceAndDefense: Provides Aerospace and Defense Industry information.
-->
<!ELEMENT ProductActivityHeaderIndustry (AerospaceAndDefense?)>

<!--
	Defines the start and end dates for the accumulation of the forecast for a part.
-->
<!ELEMENT ForecastDetails EMPTY>
<!--
	@attr 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.

	@attr cumulativeEndDate The end date till which the cumulative values for forecast and commit will be calculated. 
-->
<!ATTLIST ForecastDetails
	cumulativeStartDate %date;       #IMPLIED
	cumulativeEndDate %date;       #IMPLIED
>

<!--
	Provides inventory data in time intervals.
-->
<!ELEMENT InventoryTimeSeries (TimeSeriesDetails+)>
<!--
	@attr type Type of inventory. Possible values:
		<ul>
		<li>targetStock - Quantity required to meet the demand, based on customer service levels.</li>
		<li>projectedStock - Calculated stock quantity that reflects the demand and supply stock balance.</li>
		<li>safetyStock - Quantity of stock required to mitigate risk of stockouts.</li>
		<li>minimumStock - Required minimum quantity of stock supplier must maintain in a given time period.</li>
		<li>maximumStock - Required maximum quantity of stock supplier must maintain in a given time period.</li>
		</ul>
-->
<!ATTLIST InventoryTimeSeries
	type	(targetStock | projectedStock | safetyStock | minimumStock | maximumStock )  #REQUIRED >

<!--
	Contains information about a sales report at the item level.

	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*
)>
<!--
	@attr salesDate Date of the sale.

	@attr lineNumber Line number of the item in the sales report.
-->
<!ATTLIST SalesReport
    salesDate      	       %datetime.tz; #IMPLIED
    lineNumber    		%uint; #REQUIRED
>

<!--
	Contains the quantity that was sold.
-->
<!ELEMENT SalesQuantity (UnitOfMeasure)>
<!-- 
	@attr quantity Number of units sold.
-->
<!ATTLIST SalesQuantity
    quantity        %r8; #REQUIRED
>

<!-- 
	Represents a time series in the forecast data.
-->
<!ELEMENT TimeSeries (Forecast+)>
<!--
	@attr type Type of time series (enumeration).
-->
<!ATTLIST TimeSeries
    type                 (orderForecast | demand)  #REQUIRED >

<!-- 
	Contains planning information from the buyers ERP system to provide visibility of critical 
	business information to suppliers and other partners.
-->
<!ELEMENT PlanningTimeSeries (TimeSeriesDetails+)>
<!--
    @attr type A string value to identify the type time series. The value can be as follows:
		<ul>
		<li>grossdemand - Quantity that is considered as demand without taking inventory and receipts into consideration.</li>
		<li>netdemand - Quantity determined based on available inventory and receipts derived based on planning output.</li>
		<li>supplyPlan - Quantity derived to meet the demand based on supply Planning.</li>
        <li>longtermforecast - Forecast quantity derived based on historical trends.</li>
		<li>constrainedforecast - Unconstrained forecast when limited by supply constraints results in constrained forecast.</li>
		<li>capacitydemand - Quantity of production output that is requested from a specific resource.</li>
        <li>custom - Buyer-specific business values could be represented by the customType string.</li>
		</ul>
		
    @attr customType String to include buyer-defined custom types, for example, "NARegionalForecast".	
-->
<!ATTLIST PlanningTimeSeries
    type (supplyPlan | longtermforecast | constrainedforecast | grossdemand| netdemand | capacitydemand | custom)  #REQUIRED 
    customType %string;   #IMPLIED >

<!-- 
	Contains consignment movement information for this product, tracking movement from consignment inventory to 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
	
	ReferenceDocumentInfo: Contains details of a referenced document in the consignment procurement process 
		such as Purchase Order, Scheduling Agreement, Ship Notice, and Receipt.
	
    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. For example, standard price for item is 10, but after being 
		for 30 days in the consignment inventory the price will increase to 12.
	
	Extrinsic: Additional information related to this document.
-->
<!ELEMENT ConsignmentMovement (ProductMovementItemIDInfo, InvoiceItemIDInfo?, ReferenceDocumentInfo?, MovementQuantity, SubtotalAmount, UnitPrice?, Extrinsic*)>
<!--
    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 -->
