<?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.070" >
<!--
    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$
-->

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

<!ENTITY % cxml.requests "(ConfirmationRequest |
                           ShipNoticeRequest |
                           ServiceEntryRequest |
                           CopyRequest |
                           SalesOrderRequest |
			   TimeCardInfoRequest |
			   ReceiptRequest |
               OrderStatusRequest |
                           TimeCardRequest |
                           ComponentConsumptionRequest)"
>

<!ENTITY % cxml.responses "">

<!ENTITY % cxml.messages ",(ProductReplenishmentMessage)">

<!-- ====
    Common to both of the documents listed below.
==== -->


<!-- ====
    Confirmation* transaction forwards confirmation data in the Request.
    No specific Response document is required for this transaction.
    Servers must respond to a ConfirmationRequest with a generic Response
    document.
==== -->

<!-- OrderStatusRequest Elements -->
<!--
    Definition of an order status request. This is the data that is sent to the supplier to ask 
    for information regarding a previously sent PO such as the status of the order, delivery date 
    or current location of a shipped product.
-->
<!ELEMENT OrderStatusRequest (OrderStatusRequestHeader, OrderStatusRequestItem*)>
    
<!-- OrderStatusRequestHeader Elements -->
<!--
    Header of an order status request. It contains the reference to the orderStatusRequest 
    (OrderStatusRequestID, OrderStatusRequestDate) from the buyer side.
	
	OrderReference | OrderIDInfo: The reference to the purchase order. You can specify either 
		the OrderReference or OrderIDInfo information.
		
	Contact: The contact information of the buyer.
-->
<!ELEMENT OrderStatusRequestHeader ((OrderReference | OrderIDInfo),Contact+, Comments?, Extrinsic*)>
<!--
    @attr orderStatusRequestID The buyer system ID for this status request. This is an internal 
		buyer unique number.

    @attr orderStatusRequestDate Date and time when the order status request was created.
-->
<!ATTLIST OrderStatusRequestHeader
    orderStatusRequestID    %string;        #REQUIRED
    orderStatusRequestDate  %datetime.tz;   #REQUIRED
>

<!-- OrderStatusRequestItem* Elements -->

<!--
	Represents an item on the Order Status Request. 
	
	ItemReference: Defines all references related to a line item.
	
	Comments: Contains any additional comments associated with this line item.

	Priority: Priority indicator, used to drive the priority of the orders for the suppliers.
		The Priority of the Order is to indicate the current Build priority associated to the PO line item. It 
		is not meant to update the priority in the PO.
-->
<!ELEMENT OrderStatusRequestItem (ItemReference, Comments?, Priority?)>
<!--
	@attr rescheduleRequest Reschedule request information is derived by MRP to suggest possible changes to 
		the Delivery Date. The proposed changes could be result in the status Reschedule In, Reschedule Out, 
		or Cancellation request for the Order.
		<ul>
		<li>in - MRP proposal to reschedule the Delivery date prior to the current delivery date.</li>
		<li>out - MRP proposal to reschedule the Delivery date post the current delivery date.</li>
		<li>cancel - MRP proposal to cancel the PO line item.</li>
		</ul>

	@attr rescheduleDate The MRP proposed rescheduled date is captured in the date field. The reschedule date 
		is with reference to the delivery date.
-->
<!ATTLIST OrderStatusRequestItem
    rescheduleRequest (in|out|cancel) #IMPLIED
    rescheduleDate    %datetime.tz;   #IMPLIED
>

<!--
    Defines all references related to an schedule line in the confirmation.
-->
<!ELEMENT ScheduleLineReference (Extrinsic*)>
<!--
    @attr quantity The quantity as informed in the ScheduleLine element of the OrderRequest document
		which the current document is referring to.

    @attr requestedDeliveryDate The requested delivery date as informed in the ScheduleLine element of the
		OrderRequest document which the current document is referring to. 
		
	@attr lineNumber The line number identifier as informed in the ScheduleLine element of the
      OrderRequest document which the current document is referring to.
-->
<!ATTLIST ScheduleLineReference 
    quantity               %r8;           #REQUIRED
    requestedDeliveryDate  %datetime.tz;  #REQUIRED
    lineNumber             %uint;         #IMPLIED
>

<!--
    Request to add confirmation information to the data known about an
    order at the receiving server.

    While multiple confirmations may be sent for one order, each
    confirmation must mention a line item once. And, a line item must not
    be mentioned in more than one confirmation. Multiple confirmations are
    allowed (and sensible) only when each has type="allDetail" or
    type="detail". Only one (original) confirmation per order of
    type="accept", type="except" or type="reject" is allowed. When a
    confirmation with one of these types arrives, the receiving system must
    discard any and all previous confirmations for the order.

    OrderStatusRequestReference or OrderStatusRequestIDInfo can be optionally added to
    explicitly reference to the Order Status Request that originated the confirmation.

    ConfirmationItem elements may appear in any order within the
    ConfirmationRequest. Of course, an easily-readable order such as by
    increasing lineNumber value is preferred. Again, no line item
    (Confirmation@lineNumber attribute value) may appear more than once
    within a ConfirmationRequest element.
-->
<!ELEMENT ConfirmationRequest
    (ConfirmationHeader, OrderReference, (OrderStatusRequestReference | OrderStatusRequestIDInfo)*, ConfirmationItem*)>

<!--
    Information about this confirmation that's common to all contained
    items.

    The contained DocumentReference element may appear in a document only
    when the operation is "update". In that case, the DocumentReference is
    required and it must reference the most recent ConfirmationRequest
    document for this particular confirmation (usually also indicated by a
    common confirmID). For example when a confirmation is created, updated
    and then updated again, the final document must contain a
    DocumentReference referring to the previous ConfirmationRequest with
    operation="update". That document must, in turn, refer to the original
    (operation="new") ConfirmationRequest document.

    Tax and Shipping amounts may be updated (included in the confirmation
    with new values) without corresponding line item information
    (additional information in the ConfirmationItem list). Total should
    not be included with a different value from the OrderRequest document
    unless a ConfirmationItem describes a new UnitPrice or quantity. It is
    not necessary to copy this information from the OrderRequest document:
    Total, Tax and Shipping should not be included if they match those
    amounts in the original order.

    Contact roles may usefully include: technicalSupport, customerService,
    sales, shipFrom (starting point for shipments related to this order),
    shipTo (echoing the ShipTo element from the OrderRequest document),
    payTo (where payment for this order should be sent), billTo (echoing
    the BillTo element from the OrderRequest document), buyerCorporate
    (details the supplier has about the buying organization) and
    supplierCorporate. It is not necessary to copy this information from
    the OrderRequest document. The Contact element should be used primarily
    to add information to that known about an order or to describe the
    sender of this particular confirmation.

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

    Elements in the Hazard list may appear in any order. The same hazard
    should not be listed more than once in a ConfirmationHeader. Each
    hazard listed at this level (in a ConfirmationHeader element) should
    apply to the entire order or all items mentioned in this confirmation.
    A ConfirmationRequest which updates the status of a single line item
    should not include Hazard elements in the ConfirmationItem element.

    The Comments element list may contain additional information about the
    status of the overall order (or the portion described in this
    confirmation) such as payment terms, additional detail on shipping
    terms and clarifications of the status. For the last type of
    information, terms such as "backordered", "shipped" and "invalid" may
    be sensible. All such data must be intended for human use. The text
    in this list should describe this particular confirmation and not
    repeat Comments appearing in the OrderRequest.

    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about the order for application consumption. These
    elements may include pre-defined keywords and values affecting workflow
    in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a ConfirmationHeader element. A type may not be mentioned both
    in this list and in a particular ConfirmationStatus element. (The
    ConfirmationHeader must not contain a default extrinsic value
    overridden at the lower level.)

    IdReference: Internal Reference Number/Supplier Reference Number can be one of the 
		following:
		<ul>
		<li>Internal supplier number - This is the most common scenario; it represents the document number 
			created by the internal supplier ERP system.</li>
		<li>Contract - The contract number can be used to identify that a specific outbound document is 
			related to a specific contract.</li>
		<li>Internal criteria - Sometimes the supplier can enter a customized value in the field Supplier 
			Reference Number. Example: It can be the name of the person in charge of the follow-up of the 
			transaction.</li>
		</ul>
-->
<!ELEMENT ConfirmationHeader (DocumentReference?, Total?, Shipping?,
                              Tax?, Contact*, Hazard*, Comments*,
                              IdReference*, Extrinsic*)>
<!--
    @attr confirmID An (optional) identifier for this particular confirmation assigned
        by the supplier. A user-visible and secondary (to the payloadID
        attribute of the cXML element) identifier for this document. This
        value does not vary as a particular confirmation is updated. That
        is, operation="update" documents describing the status of the same
        items in the same order would share a confirmID with the original
        operation="new" ConfirmationRequest.

        When the confirmID does not appear in an operation="new"
        ConfirmationRequest, it must not appear in a corresponding
        operation="update" document. Links between these documents must be
        deduced using the DocumentReference element contained in the
        update's ConfirmationHeader and the payloadID attribute of the
        original or previous update.
		
	@attr operation The (optional) operational mode of the confirmation document.
        Defaults to "new".

        An "update" confirmation allows a supplier to correct an error in a
        confirmation or to add additional information learned later. In
        either case, an "update" document must be complete: All data from
        the original confirmation or a previous update should be discarded
        by the recipient. A ConfirmationRequest document does not provide
        default data for a subsequent operation="update" document. (This
        applies in particular to Hazard and Extrinsic elements, which
        should appear at either the header or item levels but not both.)

        The "completeness" requirement allows the information contained in
        a ConfirmationRequest to expand. No restrictions are placed on
        including additional items that have not yet been referenced in a
        ConfirmationRequest in an operation="update" ConfirmationRequest.
        However, added items must not have been mentioned in another
        ConfirmationRequest. This protocol supports neither splitting 
		confirmations (sending an operation="update" ConfirmationRequest 
		document describing a subset of the items in an earlier version) 
		nor any kind of consolidations of confirmations.

        An operation="update" ConfirmationRequest must contain the same
        confirmID (if any) as the previous version of the confirmation.
        When included, this attribute provides an unambiguous and direct
        connection between all versions of the confirmation.

        An operation="update" ConfirmationRequest must also include a
        DocumentReference element in the ConfirmationHeader. (See above
        for more information on this element.)  This effectively sequences
        multiple versions of a confirmation and may provide the only link
        between those versions. (See above under confirmID for more on the
        implications of leaving out that attribute.)  Other confirmations
        discarded through consolidations as described above are not
        explicitly referenced by the new, larger ConfirmationRequest
        document.

        A confirmation may not be deleted; the protocol does not include an
        operation="delete" option for this request. Suppliers must replace
        incorrect or invalid confirmations with correct information. A
        type="unknown" ConfirmationStatus will reset such information to
        its original state. This covers the case of an error in accepting
        or rejecting an item that has not been researched.
		
    @attr type The type of confirmation. Possible values:
		<ul>
		<li>accept - The entire order is accepted as described in the referenced
            OrderRequest document. A document of this type may contain 
			ConfirmationItem elements. If ConfirmationItem elements are present 
			in the ConfirmationRequest document, they must contain only
            ConfirmationStatus elements of type="accept".</li>
		<li>allDetail - This confirmation updates only those line items described in
            the following ConfirmationItem elements. Line items not
            mentioned specifically in this document retain their current
            status. Unlike the "detail" type (below), a confirmation of
            this type includes all information known by the supplier,
            whether or not it differs from the data provided in the
            original OrderRequest document.

            This type is provided for compatibility with current EDI and
            order entry tools (which commonly send the buyer a snapshot of
            an order in the supplier's systems). Due to the reconciliation
            issues caused by confirmations of this type, it is recommended
            that use of this type be considered a "bridge" strategy
            suitable only for the short term.

            A document of this type must contain ConfirmationItem elements.
            The contained ConfirmationStatus elements must have types
            "allDetail", "reject" or "unknown". "accept" , "detail" 
            or "backordered". Other status types are not allowed because they 
            conflict with the requirements of this document type.</li>
		<li>detail - This confirmation updates only those line items described 
			in the following ConfirmationItem elements. Line items not
            mentioned specifically in this document retain their current
            states. A confirmation of this type should include only
            information which differs from that in the original
            OrderRequest document.

            Later ConfirmationRequest documents that restore information
            provided in the OrderRequest should not include the variations
            described in an earlier ConfirmationRequest. For example, the
            Tax element may appear in a ConfirmationStatus of one
            ConfirmationRequest and not in an update to that confirmation.
            This signifies that the original OrderRequest actually
            contained the correct charge.

            A document of this type must contain ConfirmationItem elements.
            The contained ConfirmationStatus elements may have any type
            except "allDetail".</li>
		<li>backordered - The entire order is backordered.

            A document of this type may contain ConfirmationItem elements.
            If ConfirmationItem elements are present in the
            ConfirmationRequest document, they must contain only
            ConfirmationStatus elements of type="backordered".</li>
		<li>except - The entire order is accepted as described in the referenced
            OrderRequest document with exceptions listed in the following
            ConfirmationItem elements. Line items not mentioned
            specifically in this document are accepted without change.

            A document of this type must contain ConfirmationItem elements.
            The contained ConfirmationStatus elements may have any type
            except "allDetail".</li>
		<li>reject - The entire order is rejected. No further (line item) detail 
			is provided beyond the reason described in the Comments element.

            A document of this type must not contain ConfirmationItem
            elements.</li>
		<li>requestToPay - This type of confirmation is for the supplier to request the
            initiation of payment transactions for either the whole
            order or some line items.

            If the request contains no ConfirmationItem elements, the intent
            will be to initiate payment transaction on the total amount of
            all line items in the order, except those being rejected.

            If the request contains ConfirmationItem elements, payment
            transaction will be initiated against the specified items and
            quantities.

            A ConfirmationItem in this type of request does not have to
            describe the complete line item. It should only contain
            "requestToPay" ConfirmationStatus elements for new payment
            transactions.</li>
		<li>replace - The entire order is replaced. This is used by supplier 
			to perform a wholesale replacement of the order. In the case
            that a changed order is sent from Buyer before this
            OrderConfirmation is received by Buyer, Supplier should
            accept the new changed order. ConfirmationItems in this
            type of request must contain ConfirmationStatus elements
            only of type "detail", and each ConfirmationStatus element
            must include an ItemIn element.</li>
		</ul>

    @attr noticeDate The date and time this confirmation was created.
	
    @attr invoiceID An optional supplier-generated identifier for an Invoice 
		associated with the items described in this confirmation. Identical to 
		the Invoice Number that appears at the top of a physical invoice.
		
    @attr incoTerms Optional shipping terms as defined by the International Chamber of
        Commerce. These terms inform the buyer which portion of the
        shipping charges are their responsibility. Allowed values include:
		<ul>
		<li>cfr - Cost and freight</li>
		<li>cif - Cost, insurance and freight</li>
		<li>cip - Carriage and insurance paid to</li>
		<li>cpt - Carriage paid to</li>
		<li>daf - Delivered at frontier</li>
		<li>dap - Delivered at Place</li>
		<li>ddp - Delivered duty paid</li>
		<li>ddu - Delivered duty unpaid</li>
		<li>dpu - Delivered at Place Unloaded</li>
		<li>deq - Delivered ex quay (duty paid)</li>
		<li>des - Delivered ex ship</li>
		<li>exw - Ex works</li>
		<li>fas - Free alongside ship</li>
		<li>fca - Free carrier</li>
		<li>fob - Free on board vessel</li>
		</ul>
		
	@attr version The version number for this confirmation. It should start with 1 and
        should be incremented by 1 for each subsequent version (2,3,4...).
-->
<!ATTLIST ConfirmationHeader
    confirmID            %string;                        #IMPLIED
    operation            (new | update)                  "new"
    type (accept | allDetail | detail | backordered | except | reject | requestToPay | replace)
                                                         #REQUIRED
    noticeDate           %datetime.tz;                   #REQUIRED
    invoiceID            %string;                        #IMPLIED
    incoTerms (cfr | cif | cip | cpt | daf | dap | ddp | ddu | dpu | deq | des | exw |
               fas | fca | fob)                          #IMPLIED
    version              %uint;                          #IMPLIED
>

<!--
    Information about a specific line item. Must completely describe the
    status of the referenced line item. For example, two
    ConfirmationRequest documents may be necessary to update the status of
    an entire order. However, a particular item must be mentioned in only
    one of these documents.

    A particular line item from an order must not be mentioned in more than
    one ConfirmationItem element.

    Any Contact elements provided at this level describe contacts specific
    to this item. The ConfirmationHeader description mentions roles
    appropriate at this level as well. A particular Contact role must not
    appear in both the ConfirmationItem and ConfirmationHeader elements.

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

    Elements in the Hazard list may appear in any order. The same hazard
    should not be listed more than once in a ConfirmationItem. Each hazard
    listed at this level (in a ConfirmationItem element) must apply to the
    this specific line item. A ConfirmationRequest which updates the
    status of a single line item should not include Hazard elements in the
    ConfirmationItem element.

    The list of ConfirmationStatus elements may appear in any order.
    However, the described quantities must sum to the quantity of the
    containing ConfirmationItem element (after any conversions required by
    use of different UnitOfMeasure scales at each level). This ensures the
    status of a particular line item is completely described in a
    ConfirmationRequest document.
-->
<!ELEMENT ConfirmationItem
    (UnitOfMeasure, Contact*, Hazard*, ConfirmationStatus+)>
<!--
    @attr quantity Number of this line item which was ordered. Expressed in the units
        given in the UnitOfMeasure element. Copied directly from the
        corresponding line item (ItemOut) in the document referenced in the
        OrderReference element.

    @attr lineNumber Position (counting from 1) of this item in an order. Copied
        directly from the corresponding line item (ItemOut) in the document
        referenced in the sibling OrderReference element.

    @attr parentLineNumber Line number of the parent line item in the order confirmation request.

	@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).
-->
<!ATTLIST ConfirmationItem
    quantity             %r8;                  #REQUIRED
    lineNumber           %uint;                #REQUIRED
    parentLineNumber     %uint;                #IMPLIED
    itemType             %lineItemType;        #IMPLIED
	compositeItemType		%compositeItemType;		#IMPLIED
>

<!--
    Confirmation status of a specific line item or portion thereof.
    Quantities at this level must sum to that in the containing
    ConfirmationItem. Documents should use a consistent UnitOfMeasure in
    ConfirmationItem and contained ConfirmationStatus elements. A
    substitution (replacement item) may use a different UnitOfMeasure in
    the ItemDetail contained within the ItemIn element.

    In the normal case (for simple acceptance or rejection of this item),
    the ConfirmationStatus element would contain only a UnitOfMeasure
    element and the quantity and type attributes. ItemIn appears in this
    element if and only if the supplier is recommending a substitution or
    the type is "allDetail". In that case, the quantity of the ItemIn
    element must match that of the containing ConfirmationStatus unless the
    UnitOfMeasure is different. ItemDetail must appear inside ItemIn
    whenever ItemIn appears in this context. That is, an ItemIn element in
    a ConfirmationStatus element must contain an ItemDetail element.

    UnitPrice, Tax and Shipping amounts may be updated (included in the
    ConfirmationStatus element with new values) without a complete part
    substitution. It is not necessary to copy this information from the
    OrderRequest document: UnitPrice, Tax and Shipping should not be
    included if they match that in the original ItemOut element. The
    addition of tax or shipping amounts not mentioned in the original order
    may appear when the type is "accept", "allDetail" or "detail". The
    "accept" type should be used if these additions are the only changes
    from the order. The "detail" type implies a substitution (presence of
    the ItemIn element), price change (presence of the UnitPrice element)
    or delayed shipment (presence of the deliveryDate attribute).
    Unfortunately, the "allDetail" type requires reconciliation software to
    determine what has changed since the original order.

    The Comments element list may contain additional information about the
    status of this portion of the item such clarifications of the type
    attribute. Terms such as "backordered", "shipped" and "invalid" may be
    sensible. All such data must be intended for human use.

    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about this particular item portion for application
    consumption. These elements may include pre-defined keywords and
    values affecting workflow in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a ConfirmationStatus element. A type may not be mentioned both
    in this list and in the overall ConfirmationHeader element. (The
    ConfirmationHeader must not contain a default extrinsic value
    overridden at this lower level.)

    SupplierBatchID: SupplierBatch is the batch ID provided by the supplier at the line item quantity level
        to identify  the batch in which the item or the product was produced. The batch id is helpful in tracebility.
        Batch numbers (also called "lot number" or "variant") are used in several industries to uniquely identify 
		items produced together.

    ComponentConsumptionDetails: Contains detailed information about consumption of components in the manufacturing 
		of final product.
-->
<!ELEMENT ConfirmationStatus
    (UnitOfMeasure, (ItemIn | (UnitPrice?, Tax?, Shipping?)),
    SupplierBatchID?, ScheduleLineReference?, ComponentConsumptionDetails*, Comments*, Extrinsic*)>
<!--
    @attr quantity Number of this line item which has this status. Expressed in the
        units given in the UnitOfMeasure element.
		
    @attr type The status of this particular portion of the order:
		<ul>
		<li>accept - This portion of the line item is accepted as described in the
            referenced ItemOut element.

            This type is allowed in documents with overall
            (ConfirmationHeader) types "accept", "detail" or "except".</li>
		<li>allDetail - This portion of the line item is accepted as detailed in the
            contents of this ConfirmationStatus element. These contents
            completely describe what will be shipped. Unlike the "detail"
            type (below), a confirmation of this type includes all
            information known by the supplier, whether or not it differs
            from the data provided in the original OrderRequest document.

            This type is provided for compatibility with current EDI and
            order entry tools (which commonly send the buyer a snapshot of
            an order in the supplier's systems). Due to the reconciliation
            issues caused by confirmations of this type, it is recommended
            that use of this type be considered a "bridge" strategy
            suitable only for the short term.

            This type is allowed only in documents with overall
            (ConfirmationHeader) type "allDetail".</li>
		<li>detail - This portion of the line item is accepted with the changes
            detailed in the contents of this ConfirmationStatus element.
            At least one of the UnitPrice, Shipping, Tax or ItemIn elements
            or the deliveryDate attribute must be present.

            This type is allowed in documents with overall
            (ConfirmationHeader) types "detail", "except" or "replace".</li>
		<li>backordered - This portion of the line item is backordered.

            This type is allowed in documents with overall
            (ConfirmationHeader) types "backordered", "detail" ,"except",
            and "allDetail". "shipmentDate" and "deliveryDate" attributes for 
            this type of ConfirmationStatus are optional. The rest of elements
            for this type of ConfirmationStatus are ignored.</li>
		<li>reject - This portion of the line item is rejected.

            This type is allowed in documents with overall
            (ConfirmationHeader) types "allDetail", "detail" or "except".</li>
		<li>requestToPay - A requestToPay is being asked about this portion of the line
            item. Request-to-pay will initiate a request to the financial
            institution to begin the settlement process of the portion of
            the line item.

            This type is allowed in documents with overall request
            (ConfirmationHeader) type "requestToPay".</li>
		<li>unknown - The status of this portion of the line item is not known at
            the time of this confirmation. This line item status may
            provide a "placeholder" while the supplier does further
            research. Update confirmations may also reset the status of a
            line item portion to "unknown" when an earlier confirmation
            (incorrectly) accepted or rejected that portion.

            This type is allowed in documents with overall
            (ConfirmationHeader) types "allDetail", "detail" or "except".</li>
		</ul>
		
    @attr shipmentDate The date and time this shipment is expected to leave the supplier.
        A ConfirmationStatus element should include this information if the
        type is "accept", "allDetail" or "detail".
		
    @attr deliveryDate The date and time this shipment is expected to arrive. Should not
        be included if the value matches that of the requestedDeliveryDate
        attribute (if any) in the corresponding OrderRequest document.
        Otherwise, a ConfirmationStatus element should include this
        information if its type is "accept", "allDetail" or "detail".
-->
<!ATTLIST ConfirmationStatus
    quantity             %r8;                             #REQUIRED
    type (accept | allDetail | detail | backordered | reject | unknown | requestToPay)
                                                          #REQUIRED
    shipmentDate         %datetime.tz;                    #IMPLIED
    deliveryDate         %datetime.tz;                    #IMPLIED
>

<!-- ====
    ShipNotice* transaction forwards ship notice data in the Request. No
    specific Response document is required for this transaction. Servers
    must respond to a ShipNoticeRequest with a generic Response document.
==== -->

<!--
    Request to add shipment information to the data known about an order at
    the receiving server.

    Shipments with multiple responsible carriers may be described in one of
    two ways:
    1. A single carrier (or third-party logistics provider) creates a
       tracking identifier that may be used to retrieve information about
       the entire trip. Suppliers send such information in a single
       ShipControl element. Optionally, they may use Route elements to
       describe lower-level carriers.
    2. Separate tracking numbers are required for each segment. Suppliers
       send such information with one ShipControl element per segment.

    ShipControl elements must appear in the order the shipment will travel.
    The first such element must not have an explicit starting date (the
    ShipControl@startDate attribute must not be present) and that carrier's
    control must begin at the shipment's origination time
    (ShipNoticeHeader@shipmentDate attribute value). All later ShipControl
    elements must have increasing (later) starting dates
    (ShipControl@startDate attribute value).

    ShipNoticePortion elements may appear in any order. A particular order
    (ShipNoticePortion/OrderReference/DocumentReference@payloadID attribute
    value) must not appear more than once in a ShipNoticeRequest element.

    Note: Many elements and attributes in the ShipNoticeRequest and
    ShipNoticeHeader elements are optional only for the operation="delete"
    case. For other operations, one or more ShipControl and
    ShipNoticePortion elements must appear in a ShipNoticeRequest element.
-->
<!ELEMENT ShipNoticeRequest
    (ShipNoticeHeader, ShipControl*, ShipNoticePortion*)>

<!--
    Information about this ship notice that's common to all contained
    items.

    One or more ServiceLevel elements must appear in all ShipNoticeRequest
    documents except when operation="delete" is specified. Each
    ServiceLevel must contain a single string corresponding to the level of
    service (such as "overnight") provided by the carrier for this
    shipment. When multiple ServiceLevel elements appear, all must
    describe the same level of service in different languages or locales.
    (No two ServiceLevel elements may have the same xml:lang attribute.)
    Elements in such a list may appear in any order.

    The contained DocumentReference element may appear in a document only
    when the operation is "update" or "delete". In that case, the
    DocumentReference is required and it must reference the most recent
    ShipNoticeRequest document for this particular ship notice (also
    indicated by a common shipmentID). For example when a ship notice is
    created, updated and then updated again, the final document must
    contain a DocumentReference referring to the previous ShipNoticeRequest
    with operation="update". That document must, in turn, refer to the
    original (operation="new") ShipNoticeRequest document.

    Contact roles may usefully include: technicalSupport, customerService,
    sales, shipFrom (starting point for this shipment), shipTo (should echo
    the ShipTo element from the OrderRequest documents), buyerCorporate
    (details the supplier has about the buying organization) and
    supplierCorporate. It is not generally necessary to copy information
    from the various OrderRequest documents. The Contact element should be
    used primarily to add information to that known about an order.

    Elements in the Contact list may appear in any order. A contact role
    (Contact@role attribute value) must not appear more than once within a
    ShipNoticeHeader element.
	
	LegalEntity and OrganizationalUnit elements are intended to include
	the company code and purchasing organization respectively. Currently
	only used for Ship Notices coming from buyer to supplier (Component or
	Return Ship Notice).

    Elements in the Hazard list may appear in any order. The same hazard
    should not be listed more than once in a ShipNoticeHeader. Each hazard
    listed at this level (in a ShipNoticeHeader element) should apply to
    the entire shipment or all items contained in this shipment. A
    ShipNoticeRequest for a single line item should not include Hazard
    elements in the ShipNoticeItem element.

    The Comments element list may contain additional information about the
    shipment. In this context (the ShipNoticeHeader), that information
    must be common to all contained items and routes. All such data must
    be intended for human use. This information could also include a reason 
    for shipment to indicate rush orders for example. 

    The Comments element list may also contain structured comments with 
    type as "ReasonForShipment" to describe any specific reason for this shipment
    and with type as "TransitDirection" to specify transit direction.
    Reason for shipment is typically specified with replace/partial shipments to
    let the buyer know about the need of the shipment.
    
    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about the shipment for application consumption. These
    elements may include pre-defined keywords and values affecting workflow
    in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a ShipNoticeHeader element. A type may not be mentioned both in
    this list and in a particular ShipControl or ShipNoticePortion element.
    (The ShipNoticeHeader must not contain a default extrinsic value
    overridden at either lower level.)
    
    ReferenceDocumentInfo: Additional document reference information.
-->
<!ELEMENT ShipNoticeHeader (ServiceLevel*, DocumentReference?, Contact*, LegalEntity?, OrganizationalUnit*,
                            Hazard*, Comments*, TermsOfDelivery?, TermsOfTransport*, Packaging?, Extrinsic*, IdReference*, ReferenceDocumentInfo*)>
<!--
    @attr shipmentID An identifier for this particular shipment assigned by the
        supplier. A user-visible and secondary (to the payloadID attribute
        of the cXML element) identifier for this document. This value does
        not vary as a particular ship notice is updated. That is,
        operation="update" or operation="delete" documents describing the
        same shipment must share a shipmentID with the original
        operation="new" ShipNoticeRequest.

    @attr operation This optional attribute specifies whether the ShipNoticeRequest 
		document is new (the default) or an update to a previous ship notice. Possible
		values:
		<ul>
		<li>new (default) - Creates a new ship notice. No previous ship notice has been 
			sent.</li>
		<li>update - Updates a previous ship notice request. Allows a supplier to correct 
			an error in a ship notice or to add additional information learned later. In 
			either case, an "update" document must be complete: all data from the original 
			should be discarded by the recipient. The shipmentID must match a previous 
			request's shipmentID.</li>
		<li>delete - Removes the changes described in the previous new or updated ShipNoticeRequest 
			from the state of the shipment. Only use when the supplier discards a planned shipment 
			or incorrectly sends a ShipNoticeRequest about an order that will not take place. The 
			shipmentID must match a previous request's shipmentID.</li>
		</ul>

        If the operation is not "new" (explicitly or by default), the
        ShipNoticeRequest must also include a DocumentReference element in
        the ShipNoticeHeader. This effectively sequences multiple versions of a ship
        notice.
		
    @attr noticeDate Specifies the date and time the ShipNoticeRequest document was created.
		
    @attr shipmentDate The date and time the shipment left the supplier. You must specify 
		this attribute in all ShipNoticeRequest documents except when the operation is "delete".
		
    @attr deliveryDate Specifies the date and time this shipment is expected to arrive. 
		While this value can default to the requestedDeliveryDate of a single order, that 
		attribute is optional in an OrderRequest document, and the ShipNoticeRequest can 
		refer to multiple OrderRequest documents. You must include this attribute in all 
		ShipNoticeRequest documents except when the operation is "delete".
		
    @attr shipmentType Use this attribute to specify if the type of ship notice was actual 
		or estimated. Specify "actual" to indicate an actual ship notice and "planned" 
		for an estimated ship notice.
		
		When you specify "actual", you must enter the actual shipping date. If you specify 
		"planned", you must enter the estimated shipping date.
		
    @attr fulfillmentType The type of fulfillment for which this shipment notice is 
		created. Possible values are "partial" if all the items are not being shipped and 
		"complete" if the whole order is being shipped.
		
    @attr requestedDeliveryDate Specifies the desired date of delivery. In many cases, 
		it can reflect the time (or time frame) when the buyer is able and willing to receive 
		the goods.
		
    @attr reason The reason for the ship notice. The only possible value is "return", which 
		means the shipment contains items that are being returned from the buyer to the supplier 
		for some reason. For example, the items could be damaged or defective.

    @attr activityStepType An identifier for a business document. When creating a ship notice for a stock 
		transport order, you must specify one of the following values:: 
        <ul>
            <li>stockTransfer - Identifies a ship notice message sent from buyer to supplier for stock transfer
					scenario.</li>
            <li>stockShippingAdvice - Identifies a ship notice message sent from a supplier for stock transfer
					scenario.</li>
	    </ul>
-->
<!ATTLIST ShipNoticeHeader
    shipmentID           %string;              #REQUIRED
    operation          (new | update | delete) "new"
    noticeDate           %datetime.tz;         #REQUIRED
    shipmentDate         %datetime.tz;         #IMPLIED
    deliveryDate         %datetime.tz;         #IMPLIED
    shipmentType       (actual | planned)      #IMPLIED
    fulfillmentType    (partial | complete)    #IMPLIED
    requestedDeliveryDate  %datetime.tz;       #IMPLIED
    reason               (return)              #IMPLIED
    activityStepType   (stockTransfer | stockShippingAdvice) #IMPLIED
>

<!--
    One language-specific string for the service level code. Each
    ServiceLevel must contain a string (in the specified language)
    corresponding to the level of service (such as "overnight") provided by
    the carrier for this shipment.
-->
<!ELEMENT ServiceLevel (#PCDATA)>              <!-- string -->
<!--
    @attr xml:lang The language or locale in which the ServiceLevel content (the name
        of the service level) is written.
-->
<!ATTLIST ServiceLevel
   xml:lang              %xmlLangCode;         #REQUIRED
>

<!--
    Carrier responsible for some portion of the shipment. The shipment
    will be tracked using the identifiers provided at this level. Those
    identifiers should be valid from the startDate of one ShipControl
    element or the shipment's shipmentDate until the startDate of the next.

    The CarrierIdentifier list may include multiple identifiers for the
    same carrier. Elements in this list may appear in any order. A
    particular identification domain (CarrierIdentifier&#064;domain attribute
    value) must not appear more than once in a ShipControl element. The
    identification provided by all elements of the CarrierIdentifier list
    must correspond to the same company.

    If present, Route elements must be in the order the shipment will
    travel.

    The only Contact roles likely to be sensible in this element are
    "carrierCorporate" (details the contact information the supplier has
    about the carrier organization) and "shipFrom". A Contact element with
    role "shipFrom" must appear in all ShipControl elements after the
    first. This role must not appear in the first ShipControl element
    since it would duplicate that role in the overall ShipNoticeHeader
    element. Since a Contact with role "shipTo" would always duplicate
    information in the following ShipControl element or that role in the
    ShipNoticeHeader, such a Contact must not appear in this element. In
    essence, control passes from one carrier to another at a particular
    location and (estimated) time.

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

    The Comments element list may contain additional information about the
    shipment while under the control of this carrier. In this context (the
    ShipControl element), that information must be common to all contained
    routes or make it clear which Route is affected. All such data must be
    intended for human use.

    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about this carrier or their period of responsibility
    for application consumption. These elements may include pre-defined
    keywords and values affecting workflow in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a ShipControl element. A type may not be mentioned both in this
    list and in the overall ShipNoticeHeader element. (The
    ShipNoticeHeader must not contain a default extrinsic value overridden
    at this lower level.)
-->
<!ELEMENT ShipControl (CarrierIdentifier+, ShipmentIdentifier+,
                       PackageIdentification?, (Route|TransportInformation)*, Contact*, Comments*,
                       Extrinsic*)>
<!--
    @attr startDate The date and time this shipment started this part of the route.
        Required for all ShipControl elements after the first. This
        attribute must not appear in the first ShipControl element since it
        would duplicate the ShipNoticeHeader's shipmentDate attribute.
-->
<!ATTLIST ShipControl
    startDate            %datetime.tz;         #IMPLIED
>

<!--
    Identifiers which appear on the containers, skids, boxes or packages
    that constitute the shipment. The range of numbers described is
    inclusive at both extremes.
-->
<!ELEMENT PackageIdentification EMPTY>
<!--
    @attr rangeBegin Earliest number appearing on the separate elements in this
        shipment.
		
    @attr rangeEnd Highest number appearing on the separate elements in this
        shipment. Must be greater than or equal to rangeBegin.
-->
<!ATTLIST PackageIdentification
    rangeBegin           %uint;                #REQUIRED
    rangeEnd             %uint;                #REQUIRED
>

<!--
    Purchase order and item data. Answers the question: What's coming in
    this shipment?

    A particular OrderRequest (via the OrderReference element) must not be
    mentioned in more than one ShipNoticePortion element. While multiple
    shipments may be sent for one order, a ship notice must mention each
    order only once.

    MasterAgreementReference or MasterAgreementIDInfo can be used to identify 
    the corresponding scheduling agreement if the ship notice is generated
    from a scheduling agreement release.

    Any Contact elements provided at this level describe contacts specific
    to this order. The ShipNoticeHeader description mentions roles
    appropriate at this level as well, though shipFrom, shipTo,
    buyerCorporate and supplierCorporate information should not vary at
    this level. A particular Contact role must not appear in both the
    ShipNoticePortion and ShipNoticeHeader elements. Therefore, roles such
    as technicalSupport, customerService and sales are most appropriate
    within the ShipNoticePortion.

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

    The Comments element list may contain additional information about the
    order in this shipment. In this context (the ShipNoticePortion
    element), that information must be common to all contained items or
    make it clear which ShipNoticeItem is affected. All such data must be
    intended for human use.

    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about this order for application consumption. These
    elements may include pre-defined keywords and values affecting workflow
    in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a ShipNoticePortion element. A type may not be mentioned both
    in this list and in the overall ShipNoticeHeader element. (The
    ShipNoticeHeader must not contain a default extrinsic value overridden
    at this lower level.)

    If a ShipNoticePortion element contains no ShipNoticeItem elements, the
    entire referenced order is included in the shipment. 
	
	Note: This simplifying option prevents inclusion of hazard and packaging
    information.
    
    ReferenceDocumentInfo: Additional document reference information.
-->
<!ELEMENT ShipNoticePortion
    (OrderReference, (MasterAgreementReference | MasterAgreementIDInfo)?,  Contact*, Comments*, Extrinsic*, ShipNoticeItem*, ReferenceDocumentInfo*)>

<!--
    Portion of a specific line item that is part of this shipment.

    A line item from an order must not be mentioned in more than one
    ShipNoticeItem element. While additional quantities of an item may be
    shipped separately, a single ship notice must describe each item only
    once.

    Elements in the Hazard list may appear in any order. The same hazard
    should not be listed more than once in a ShipNoticeItem. Each hazard
    listed at this level (in a ShipNoticeItem element) must apply to this
    specific line item. A ShipNoticeRequest for a single line item should
    not include Hazard elements in the ShipNoticeItem element.
    
    ShipNoticeItemDetail contains detailed information about an item. All the data that
    a user would want to see about an item instead of the bare essentials.
    In a ship notice the item details are inherited from the purchase order 
    that is referenced. For ship notices without order reference the item details 
    can be retrieved from this section.

    Batch: An element carrying batch information for material or goods produced
		in a single manufacturing run.
		
		There could be a situation that for each ASN line item there could be multiple 
		batches which could be produced on same day and will have same expiry date.
		Each batch can have specific quantities, the sum of these quantity will be equal to 
		ASN line item quantity. 

    SupplierBatchID: 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.
		
	AssetInfo: Provides asset tag numbers or serial numbers for individual items in a shipment of goods.
	
	TermsOfDelivery: Specifies terms of delivery at the line-item level.
		
	ShipNoticeItemIndustry: Contains a grouping of industry-specific fields.

    ComponentConsumptionDetails: Contains detailed information about consumption of components in the 
		manufacturing of final product.
        
    ReferenceDocumentInfo: Additional document reference information.

    Comments: This element contains the ship notice item specific comments. Could be used to attach 
		quality certificates that were required in OrderRequest. In this case, one comment will be 
		provided by attachment, the certificate type will be provided in Comments@type attribute.
		
	Extrinsic: Contains any additional information for this ship notice line item.
-->
<!ELEMENT ShipNoticeItem (ItemID?, ShipNoticeItemDetail?,  UnitOfMeasure, Packaging*, Hazard*, (Batch | SupplierBatchID)*,
				AssetInfo*, TermsOfDelivery?, OrderedQuantity?, ShipNoticeItemIndustry?, ComponentConsumptionDetails*, ReferenceDocumentInfo*, Comments*, Extrinsic*)>
<!--
    @attr quantity Number of this line item which was shipped. Expressed in the units
        given in the UnitOfMeasure element.

    @attr lineNumber Position, counting from 1, of the item in an order. Matches the corresponding line item, 
		ItemOut, in the document referenced by the OrderReference element.    

    @attr parentLineNumber The line number of the corresponding parent line item. This attribute is applicable 
		only for a line item with itemType="item".

    @attr shipNoticeLineNumber Ship notice line number related to this item. Used when there are multiple ship 
		notice line items for a single purchase order 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 Specifies whether a parent item uses group-level pricing.
	
	@attr stockTransferType specifies the type of stock transport order. Possible values:
			<ul>
			<li>intra - Identifies the ship notice item as created for intra stock transport order.</li>
			<li>inter - Identifies the ship notice item as created for inter stock transport order.</li>
			</ul>
			
	@attr outboundType specifies the value for which outbound delivery needs to be created. Possible values:
            <ul>
            <li>stockTransport - Identifies the outbound delivery needs to be created for stock transport order.</li>
            </ul>
-->
<!ATTLIST ShipNoticeItem
    quantity             %r8;                  #REQUIRED
    lineNumber           %uint;                #REQUIRED
    parentLineNumber     %uint;                #IMPLIED
    shipNoticeLineNumber     %uint;            #IMPLIED
    itemType             %lineItemType;        #IMPLIED
	compositeItemType	 %compositeItemType;   #IMPLIED
	stockTransferType    (intra | inter)       #IMPLIED
	outboundType         (stockTransport)      #IMPLIED 
	
>


<!--
    ShipNoticeItemDetail 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.
  
	In a ship notice the item details are inherited from the purchase order that is referenced. 
	For ship notices without order reference the item details can be retrieved from this section.

	UnitPrice: Price per unit of item. Optional Modifications 
		(changes due to discounts or fixed amount) may be provided.

	Description: Description is a string which describes something.

	UnitOfMeasure: Must be a UN/CEFACT (Recommendation 20) unit of measure code.

	PriceBasisQuantity: Define the quantity as quoted in the UnitPrice

	Classification: Classification is used to group items into similar categories.

	ManufacturerPartID: ID with which the item's manufacturer identifies the item.

	ManufacturerName: Name of the item's manufacturer.

	Dimension: Item dimensions.
    
	ItemDetailIndustry: Industry specfic item detail information.
	
	Extrinsic: Contains any additional information related to this item.
-->
<!ELEMENT ShipNoticeItemDetail (UnitPrice?, Description*, UnitOfMeasure?,     PriceBasisQuantity?, Classification*, ManufacturerPartID?,
                      ManufacturerName?, Dimension*, ItemDetailIndustry?, Extrinsic*)>


<!--
    Defines the header information of a ServiceEntryRequest.

    PartnerContact: All parties involved in this service entry sheet, including fieldContractor,
        fieldEngineer and requester.
    
	DocumentReference: The DocumentReference is optional and, if it is provided, it must reference 
		the ServiceEntryRequest which is related to the current ServiceEntryRequest.
	
	DocumentInfo: ID of a document entry known to the system. This attribute is used to reference 
		a document when DocumentReference is omitted. If both DocumentReference and 
		DocumentInfo are provided, they must refer to the same ServiceEntryRequest.

    ServiceEntryDetailLineIndicator: Header level indicators indicating certain information is
        provided at SES line level (in ServiceEntryItem).
	
    ServiceEntryDetailShipping: The shipping details related with SES(auto-generate invoice). It will be ignored if
        isShippingInLine is true.
	
	ShipNoticeIDInfo: References shipment related document identifiers.
	
	PaymentTerm: This defines the payment terms for this invoice.
	
    Period: The total time period during which all the services specified in this service
        entry sheet were rendered. Period at the header level does not imply anything
        about the Period at the line level.

    Comments: Comment text for this service entry sheet. Could be used to attach quality certificates that 
		were required in a service PO. In this case, one comment will be provided by attachment, 
        the certificate type will be provided in Comments@type attribute.

    IdReference
        Internal Reference Number/Supplier Reference Number can be one of the following:
			<ul>
			<li>Internal supplier number - This is the most common scenario; it represents the 
				document number created by the internal supplier ERP system.</li>
			<li>Contract - The contract number can be used to identify that a specific outbound 
				document is related to a specific contract.</li>
			<li>Internal criteria - Sometimes the supplier can enter a customized value in the 
				field Supplier Reference Number. Example: It can be the name of the person in 
				charge of the follow-up of the transaction.</li>
			</ul>

    Extrinsic: Additional information related to this service entry sheet. Extrinsic should not
        duplicate any information in ServiceEntryRequestHeader or ServiceEntryRequest.
-->
<!ELEMENT ServiceEntryRequestHeader (PartnerContact*,
                                     (DocumentReference | DocumentInfo)?,
                                     ServiceEntryDetailLineIndicator?,
                                     ServiceEntryDetailShipping?,
                                     ShipNoticeIDInfo?,
                                     PaymentTerm*,
                                     Period?,
                                     Comments*,
                                     IdReference*,
                                     Extrinsic*)>
<!--
    @attr serviceEntryDate The date and time when this service entry sheet was created, which should be
        earlier than the document's timestamp.

    @attr serviceEntryID A supplier-generated identifier for this service entry sheet, identical to the
        SES Number which appears at the top of a physical service entry sheet.

    @attr supplierReferenceNumber An internal reference to the supplier of this service entry sheet..

	@attr operation How this document is acting on the service entry sheet:
		<ul>
		<li>new (default) - This document creates a new service entry sheet.</li>
        <li>update - This document updates an existing service entry sheet. That existing
            service entry sheet must be specified as DocumentReference or DocumentInfo.</li>
		<li>delete - This document cancels an existing service entry sheet. That existing
			service entry sheet must be specified as DocumentReference.</li>
		</ul>
	
	@attr isFinal Set to "yes" to indicate that this item is closed, and no more deliveries are expected 
		for it.
-->
<!ATTLIST ServiceEntryRequestHeader
    serviceEntryDate   %datetime.tz;        #REQUIRED
    serviceEntryID     %string;             #REQUIRED
    supplierReferenceNumber     %string; 	#IMPLIED
    operation     (new | update | delete)   "new"
	isFinal       (yes)                     #IMPLIED
>


<!--
    Defines information related to a purchase order.

    The various content options for ServiceEntryOrderInfo are in order
    of preference. For example, OrderReference is strongly recommended.
    If OrderReference is not available, OrderIDInfo should be used in that order.

    OrderReference: The reference to the purchase order for the service.

    OrderIDInfo: The buyer system order ID for the purchase order for the service.
-->
<!ELEMENT ServiceEntryOrderInfo
    (OrderReference | OrderIDInfo)>



<!--
    Defines all references related to a line item in this service entry sheet.

    ItemID: The service part number.

    IdReference: Unique reference to part number.

    Classification: The classification code for of the service.

    Description: Textual description of the item.
-->
<!ELEMENT ItemReference (ItemID, IdReference*,Classification*, Description?)>
<!--
    @attr lineNumber The line number of the current line item referred to in OrderRequest.
        For planned item, this refers to the corresponding item in purchase order.
        For unplanned item, this refers to the parent item in purchase order.
-->
<!ATTLIST ItemReference
	lineNumber %uint; #REQUIRED
>


<!--
    Defines a line item in the ServiceEntryRequest.

    UnitRate: The rate at which the service item is charged.
        Use of the UnitRate element is recommended over the plain (UnitOfMeasure, UnitPrice)
        pair, since the UnitRate element includes the rate code. For some services such as
        temporary labor services, UnitRate is required.

    UnitOfMeasure: The unit of measure.

    UnitPrice: The unit price.
     
	PriceBasisQuantity: The price basis quantity. 		
	 
    ItemReference: The references related to this line item.

    MasterAgreementReference: The reference to the corresponding contract master agreement if
        the order for the service is a release purchase order.

    MasterAgreementIDInfo: The buyer's system ID for the corresponding contract master agreement if
        the order for the service is a release purchase order.

    Period: The time period during which the service was rendered.

    SubtotalAmount: The subtotal of the current item = unit price x serviced quantity.
	
	Tax: The tax info for this line item. It will be ignored if isTaxInLine
        is false.

	GrossAmount: The SubtotalAmount plus taxes, shipping, and special handling
        charges.
	
	ServiceEntryDetailLineSpecialHandling: The special handling info for this line item. 
		It will be ignored if isSpecialHandlingInLine is false.

    ServiceEntryDetailLineShipping: The shipping info for this line item. It will be ignored if
        isShippingInLine is false.

    ShipNoticeIDInfo: References shipment related document identifiers.
	
	ServiceEntryDetailDiscount: The discount info for this line item. It will be ignored if
        isDiscountInLine is false.
	
	ServiceEntryItemModifications: The additional Charges, Allowances and their Taxes that are 
        incurred for the total landed cost of the goods and service 
        contained in this SES item.
	
	TotalCharges: The total sum of all the charges applied on the goods and 
        services at the line item level in an SES.

    TotalAllowances: The total sum of all the allowances applied on the goods and
        services at the line item level in an SES.

    TotalAmountWithoutTax: The total sum of the SubTotal, Charges (including special handling
        charges and shipping charges), Allowances (including discounts) 
        applied at the line item level in an SES. This does not include taxes.
    
    NetAmount: The GrossAmount minus discount amount.
	
    Distribution: Accounting distribution information, including cost center, GL#, etc.

    Comments: Comment text for this line item.

    Extrinsic: Additional information related to this line item. Extrinsic should not
        duplicate anything in ServiceEntryItem or ServiceEntryOrder.
-->
<!ELEMENT ServiceEntryItem ( ItemReference,
                            (MasterAgreementReference | MasterAgreementIDInfo)?,
				            (UnitRate | (UnitOfMeasure, UnitPrice, PriceBasisQuantity?))?,
                            Period?, SubtotalAmount?,
                            Tax?, GrossAmount?,
                            ServiceEntryDetailLineSpecialHandling?,
                            ServiceEntryDetailLineShipping?, ShipNoticeIDInfo?,
                            ServiceEntryDetailDiscount?, ServiceEntryItemModifications?, 
                            TotalCharges?, TotalAllowances?, TotalAmountWithoutTax?, NetAmount?,
                            Distribution*, Comments*, Extrinsic*)>
<!--
    @attr serviceLineNumber The supplier-defined ID for the current service line, which should be
        unique for each service line in the same ServiceEntryRequest.

    @attr quantity The quantity serviced for the current line item.

	@attr referenceDate The reference date for the blanket order or contract item. The usage of 
		this attribute is optional in most cases and must be defined by the trading partners involved 
		in the transaction. Procurement software might use this date in reconciling an invoice against 
		a blanket order or contract.
	
	@attr inspectionDate The date when the transfer of goods or the delivery of services occurs 
		according to legal tax definitions. The usage of this attribute is optional in most cases, 
		and must be defined by the trading partners involved in the transaction.
		
    @attr type Specifies the type of ServiceEntryItem. Possible values:
		<ul>
		<li>material - Material goods delivered as part of a service order.</li>
		<li>service - Services delivered as part of a service order.</li>
		</ul>

    @attr isAdHoc Indicates the item does not exist in the reference document or contract master agreement.
-->
<!ATTLIST ServiceEntryItem
    serviceLineNumber        %uint;         #REQUIRED
    quantity                 %r8;           #REQUIRED
    referenceDate            %datetime.tz;  #IMPLIED
    inspectionDate           %datetime.tz;  #IMPLIED
    type                 %serviceItemType;  #IMPLIED
    isAdHoc                (yes)          #IMPLIED 
>


<!--
    Defines the service information for a purchase order or contract master agreement
    with item details.

    In this case, a line in a service entry sheet is a ServiceEntryItem and its
    line number is ServiceEntryItem@serviceLineNumber.

    ServiceEntryOrderInfo: The reference information for the purchase order or contract master agreement.

    ServiceEntryItem: The information for an item in the purchase order.
-->
<!ELEMENT ServiceEntryOrder (ServiceEntryOrderInfo, ServiceEntryItem+)>


<!--
    Defines the summary information for a ServiceEntryRequest.

    SubtotalAmount: The sum of amounts for all quantities.
		
	Tax: Tax info.
	
	SpecialHandlingAmount: Special handling charge.

    ShippingAmount: Shipping charge.
		
	GrossAmount: Sum of subtotal, taxes, special handling
        charges, and shipping charges, before discounts.
	
	ServiceEntryDetailDiscount: The total discount applied in this ServiceEntryRequest.
        Its contained percentageRate attribute will be ignored if isDiscountInLine is true.
		
	ServiceEntryHeaderModifications: The additional Charges, Allowances and their Taxes that are incurred
        for the total landed cost of the goods and services within SES header. This value specified at the 
		header-level is not the aggregated value towards the charges or allowances available for the line items.
	
	ServiceEntrySummaryLineItemModifications: Summary of all modifications applied on the goods and services at 
		the line item level in an service entry.
		
	TotalCharges: The total sum of all the charges applied on the goods and services at 
        the header-level and line item level in SES.

    TotalAllowances: The total sum of all the allowances applied on the goods and services
        at the header-level and  line item level in SES.

    TotalAmountWithoutTax: The total sum of the SubTotal, Charges (including special handling charges
        and shipping charges), Allowances (including discounts) applied at the header-level and  line item 
		level in SES. This does not include taxes.
	
	NetAmount: Gross amount minus discounts.
		
	DepositAmount: Total deposit/prepayment amount.

    DueAmount: Total amount due and payable. It equals NetAmount minus DepositAmount. If ServiceEntryRequest@purpose is
        "creditMemo" or "lineLevelCreditMemo", this amount must be negative. If ServiceEntryRequest@purpose is
        "debitMemo", this amount must be positive.

-->
<!ELEMENT ServiceEntrySummary (SubtotalAmount, Tax?, SpecialHandlingAmount?,
                               ShippingAmount?, GrossAmount?,
                               ServiceEntryDetailDiscount?, ServiceEntryHeaderModifications?, ServiceEntrySummaryLineItemModifications?,
                               TotalCharges?, TotalAllowances?, TotalAmountWithoutTax?, NetAmount?,
                               DepositAmount?, DueAmount?)>


<!--
    Transmits a service entry sheet request to a buyer, providing purchase order
    references, line item references, partners involved, and so on.

    Suppliers can use a ServiceEntryRequest to send a service entry sheet for
    any or all selected line items from a purchase order.

    This document must be sent to the location specified in the buyer's
    ProfileResponse.

    ServiceEntryRequestHeader: The header information for this service entry sheet.

    ServiceEntryOrder: The service entry sheet information for a purchase order with item details.

    ServiceEntrySummary: The summary information for this service entry sheet.
-->
<!ELEMENT ServiceEntryRequest (ServiceEntryRequestHeader, ServiceEntryOrder, ServiceEntrySummary)>

<!--
    Contains retail-specific elements.
	
    BestBeforeDate: The best-before-date helps with in FDA-related deliveries for go/no-go criteria. This is a common 
		element and hence can be found in the common proposal.

    ExpiryDate: ExpiryDate is used mainly in retail industries for FDA-related deliveries for go/no-go criteria.

	FreeGoodsQuantity: Quantities delivered but not charged for; those can be samples or promotions or just "fill up" 
		articles; has financial impact because those will not be on the commercial invoice (or marked with value 0.00)
	  
    PromotionDealID: Number assigned by a supplier to a special promotion activity. Promotions affect the forward 
		planning/ordering process (and the related pricing). The definition can be found in the common proposal.
	  
    PromotionVariantID: Promotional variance info associated with the ship notice item.
-->
<!ELEMENT ShipNoticeItemRetail (BestBeforeDate?, ExpiryDate?, FreeGoodsQuantity?,  PromotionDealID?, PromotionVariantID?)>

<!--
    Contains industry-specific elements.
	
	ShipNoticeItemRetail: Contains retail-specific field details that can be grouped together for ship notices.
	
	ShipNoticeItemLifeSciences: Contains life sciences specific elements for ship notices.
-->
<!ELEMENT ShipNoticeItemIndustry (ShipNoticeItemRetail?, ShipNoticeItemLifeSciences?)>

<!--
    Defines discount applied to the service item.

    Money: The total discount in dollar (or other currency) amount.
-->
<!ELEMENT ServiceEntryDetailDiscount (Money)>
<!--
    @attr percentageRate The discount rate in percentage.
-->
<!ATTLIST ServiceEntryDetailDiscount
    percentageRate          %r8;           #IMPLIED
>

<!--
    ServiceEntryItemModifications represents the additional Charges and Allowances
    that are incurred for the total landed cost of the goods and service 
    contained in this SES item.
 
    Modification: Provides the details of a Charge or an Allowance.
-->
<!ELEMENT ServiceEntryItemModifications (Modification+)>

<!--
    Defines the shipping information related to SES (auto-generated invoice).

    Contact: The ship from and ship to addresses. Both ship from and ship to
        must be specified. Allowed contact roles are shipFrom, shipTo and
        carrierCorporate.

    CarrierIdentifier: This list may include multiple identifiers for the same carrier.
        Elements in this list may appear in any order. A particular
        identification domain (CarrierIdentifier&#064;domain attribute
        value) must not appear more than once in an ServiceEntryDetailShipping
        element. The identification provided by all elements of the
        CarrierIdentifier list must correspond to the same company.

    ShipmentIdentifier: The tracking number of this shipment or a bill of lading number,
        depending on the domain attribute.

    DocumentReference: The reference to an earlier ShipNoticeRequest.
-->
<!ELEMENT ServiceEntryDetailShipping (Contact, Contact+,
                                 (CarrierIdentifier+, ShipmentIdentifier+)?,
                                 DocumentReference?)>

<!--
    ServiceEntryHeaderModifications represents the additional Charges, Allowances 
    that are incurred for the total landed cost of the goods and services within 
    the SES header. This value specified at the header-level is not the aggregated 
    value towards the charges or allowances available for the line items.

    Modification: Provides the details of a Charge or an Allowance.
-->
<!ELEMENT ServiceEntryHeaderModifications (Modification+)>

<!--
    Defines SES line level indicators indicating certain
    information is provided at SES line level (in ServiceEntryDetailItem).
    By default, all indicators are false.

    If an indicator indicates certain information (for example, tax, shipping, 
	and so on.) will be provided at SES line level, for SES lines which do
    not provide such information, they will be assumed to have values of
    zero, or "not available", whichever is appropriate, for that information.
-->
<!ELEMENT ServiceEntryDetailLineIndicator EMPTY>
<!--
    @attr isTaxInLine True if tax info (Tax) is provided at SES line level.

    @attr isSpecialHandlingInLine True if special handling info is provided at SES line level.

    @attr isShippingInLine True if shipping info is provided at SES line level.

    @attr isDiscountInLine True if discount info (ServiceEntryDetailDiscount) is provided
        at SES line level.

    @attr isAccountingInLine True if accounting distribution info (Distribution) is provided at
        SES line level.
-->
<!ATTLIST ServiceEntryDetailLineIndicator
    isTaxInLine                            (yes)      #IMPLIED
    isSpecialHandlingInLine                (yes)      #IMPLIED
    isShippingInLine                       (yes)      #IMPLIED
    isDiscountInLine                       (yes)      #IMPLIED
    isAccountingInLine                     (yes)      #IMPLIED
>

<!--
    Defines special handling information of the current SES line.

    Description: Textual description of the special handling.

    Money: The special handling amount.
-->
<!ELEMENT ServiceEntryDetailLineSpecialHandling (Description?, Money)>

<!--
    Defines shipping information of the current SES line.

    ServiceEntryDetailShipping: The shipping details.

    Money: The shipping amount.
-->
<!ELEMENT ServiceEntryDetailLineShipping (ServiceEntryDetailShipping, Money)>

<!--
    Defines information related to a summary of line modifications (allowances/charges) in Service Entry Sheet.

    Modification: Summary of one modification.
-->	
<!ELEMENT ServiceEntrySummaryLineItemModifications (Modification+)>

<!--
    Contains information relevant to the life sciences industry.
    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’ on the corresponding OrderRequest message then the poolID value 
    should also be provided in the message.    
    Study: Contains information about a clinical study. 
    ProtocolD: Contains a unique external identifier assigned to the protocol. The protocol is the detailed plan of the clinical study.
	MedicationListInfo: Medication list info is a set of medication sequence numbers.
	Extrinsic: Contains any additional information related to the ShipNoticeItemLifeSciences element.
-->
<!ELEMENT ShipNoticeItemLifeSciences (Study?, ProtocolID?, PoolID?,  MedicationListInfo*, Extrinsic*)>

<!--
    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
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id: $
-->

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

<!--
    Describes a time card document that is sent from a supplier/staffing agency to a buyer.
-->
<!ELEMENT TimeCardRequest (TimeCard)>

<!--
    Describes a time card document that is sent from a buyer to a supplier/staffing agency.
-->
<!ELEMENT TimeCardInfoRequest (TimeCard)>

<!--
    Definition of a Time card that is used to capture time and expense 
	entered by a contractor/temp labor. Document reference is for update 
	to timecards. Approval info is only when suppliers send in timecards 
	that are approved in their system. There can be multiple approval 
	infos since many people could have approved it. The OrderInfo element 
	is used to reference an order. One timecard can reference only one 
	order. Also the document reference is used on an update operation to 
	refer to a previous TimeCardRequest/TimeCardInfoRequest. 
-->
<!ELEMENT TimeCard (OrderInfo, Contractor, ReportedTime, SubmitterInfo, ApprovalInfo*, Comments?, DocumentReference?)>
<!--
	@attr type The type of the timecard (enumeration). Defaults to "new". To update the 
		status of the timecard, one needs to do an update to the original timecard 
		with the new status in it.

    @attr status The status of the timecard (enumeration). Defaults to "submitted".

	@attr timeCardID The buyer system/supplier system unique identifier for this 
		timecard.
-->
<!ATTLIST TimeCard
    type      	(new | update | delete)  "new"
  	status		(submitted| approved| denied)  "submitted"
    timeCardID      NMTOKEN #REQUIRED
>

<!--
	Definition of ReportedTime. This captures the line items for
	the time card. Though the DTD allows it, the expectation is
	that at least one of TimeCardTimeInterval or Expense will be
	present.
-->
<!ELEMENT ReportedTime (Period, TimeCardTimeInterval*, Expense*)>

<!--
    Definition of a time interval that is being reported on a timecard. 
	Extrinsic are used to pass other things not captured. For the 
	TimeRange the start date is mandatory. The difference in time between 
	the endDate and startDate attributes in TimeRange need not agree with 
	the duration. Hence the endDate attribute is for informational purpose 
	only. 
-->
<!ELEMENT TimeCardTimeInterval (TimeRange, Comments?, Extrinsic*)>
<!--
	@attr duration The duration of time being claimed for the line item, represented 
		in the ISO 8601 format PnYn MnDTnH nMnS, where nY represents the number of years, nM the 
		number of months, nD the number of days, T the date/time separator, nH the number of hours, 
		nM the number of minutes and nS the number of seconds. For example, to indicate a duration 
		of 1 year, 2 months, 3 days, 10 hours, and 30 minutes, one would write: P1Y2M3DT10H30M.
		
		In the event that duration and TimeRange do not agree, duration takes precedence. For example, 
		if duration is 2 hours, and TimeRange is from 4:00 p.m. to 8:00 p.m., then the 2 hour duration 
		takes precedence. However, if duration is not present, then it is computed from the TimeRange.
    
	@attr paycode The pay code to be used. Recommended pay codes include:
		<ul>
		<li>Regular</li>
		<li>Overtime</li>
		<li>Doubletime</li>
		<li>Mealbreak</li>
		<li>Tripletime</li>
		<li>WeeklyRestDay</li>
		<li>HolidayWorked</li>
		<li>RegularNightShift</li>
		<li>OvertimeNightShift</li>
		<li>DoubletimeNightShift</li>
		<li>TripletNightShift</li>
		<li>WeeklyRestDayNightShift</li>
		<li>RegularMixedShift</li>
		<li>OvertimeMixedShift</li>
		<li>DoubletimeMixedShift</li>
		<li>TripletimeMixedShift</li>
		<li>WeeklyRestDayMixedShift</li>
		</ul>

    @attr isNonBillable Set to "yes" to indicate that the time is not billable. 
		The default behavior is billable. 
-->
<!ATTLIST TimeCardTimeInterval
        duration     	%duration; #REQUIRED 
        payCode     	%string; #REQUIRED 
        isNonBillable   (yes)  #IMPLIED
>

<!--
	Definition of an expense item. The type of expense, date and
    amount are required pieces of information
-->
<!ELEMENT Expense (ExpenseAmount, Comments*, Extrinsic*)>
<!--
	@attr expenseDate Date of the expense.
	
    @attr expenseType The type of expense. Recommended expense types include:
		<ul>
		<li>mileage</li>
		<li>airfare</li>
		<li>fuel</li>
		<li>taxi</li>
		<li>perDiem</li>
		<li>hotel</li>
		</ul>
		
    @attr isNonBillable Set to "yes" to indicate that the time is not billable. 
		The default behavior is billable.
-->
<!ATTLIST Expense
        expenseDate	%date;  #REQUIRED
        expenseType    	%string; #REQUIRED 
        isNonBillable   (yes)  #IMPLIED
>

<!--
	Amount of the expense item.
-->
<!ELEMENT ExpenseAmount (Money)>

<!--
   	Information about someone submitting a timecard. If the contact 
	is absent, then it is assumed that the contractor is the submitter 
	of the timecard.
-->
<!ELEMENT SubmitterInfo (Contact?)>
<!--
	@attr submittedDate The time when the timecard was submitted.
-->
<!ATTLIST SubmitterInfo
        submittedDate     	%datetime.tz; #REQUIRED
>

<!--
    Information about the approver for a timecard. This is sent by the 
	supplier for informational purposes only. The buyer system does 
	not send it. This can includes all the approvers in the chain.
-->
<!ELEMENT ApprovalInfo (Contact?)>
<!--
	@attr approvedDate Time when the timecard was approved.
-->
<!ATTLIST ApprovalInfo
        approvedDate     	%datetime.tz; #REQUIRED
>

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

    $Id$
-->

<!--
    Please note that all amounts at receipt line level should add up
    to the Total specified in ReceiptRequest.
-->

<!--
    Request representing details about a receipt against Purchase Order or Master Agreement
    sent from a buyer to supplier. Provides purchase order references, line item references, 
    quantities and amounts received and, optionally, reference to related ship notices from supplier.

    This request can be used to send receipt information for any portion of all or 
    selected line items from single or multiple purchase orders.

    ReceiptRequestHeader: The header information of this receipt.

    ReceiptOrder: Details about purchase order or master agreement against which this receipt 
		is generated.

    Total: Summary total amount of all receipt line item amounts.       
-->
<!ELEMENT ReceiptRequest (ReceiptRequestHeader,ReceiptOrder+,Total)>

<!-- 
    Defines header information of an ReceiptRequest

    DocumentReference: Reference to an earlier ReceiptRequest.  If the
        attribute ReceiptRequestHeader@operation is "delete",
        the DocumentReference is required and it must reference the
        original ReceiptRequest document (with value "new" for
        its attribute ReceiptRequestHeader@operation) during the
        same receipt process.  The DocumentReference is optional and, if it
        is provided, it must reference the ReceiptRequest which
        is related to the current ReceiptRequest.

    Comments: Textual comments for this receipt.

    Extrinsic: Additional information related to this receipt. Should not duplicate
        anything in ReceiptRequestHeader or ReceiptRequest.

    ShipNoticeIDInfo: References shipment related document identifiers.
-->
<!ELEMENT ReceiptRequestHeader (DocumentReference?, ShipNoticeIDInfo?, Comments?,Extrinsic*)>
<!--
    @attr receiptID A buyer-generated unique identifier for this receipt.

    @attr receiptDate The date and time the items or services were received by the buying 
		organization. This date and time should be earlier than the document’s timestamp.
	
    @attr operation The operation described by this receipt document. Possible values are "new" 
		(the default) and "delete", which cancels an existing receipt specified by the 
		DocumentReference element. The "delete" operation is supported only for component receipts.

    @attr activityStepType An identifier for a business process. The only possible value is         "stockTransfer", representing the stock transport order scenario.

-->
<!ATTLIST ReceiptRequestHeader
	receiptID %string; #REQUIRED
	receiptDate %datetime.tz; #REQUIRED
    operation (new | delete) "new"
	activityStepType (stockTransfer) #IMPLIED
>

<!-- 
    Defines the receipt information of a purchase order or master agreement with item details.
    In this case, an receipt line is an ReceiptItem and its receipt line number is 
    ReceiptItem@receiptLineNumber.

    ReceiptOrderInfo: The reference information of the purchase order or master agreement.

    ReceiptItem: The information of an item in the purchase order or master agreement.
-->
<!ELEMENT ReceiptOrder (ReceiptOrderInfo, ReceiptItem+)>
<!--
    @attr closeForReceiving Set to "yes" to indicate whether the underlying order or master agreement 
		should be closed for receiving on approval of this receipt.

        If this receipt is against a purchase order or release order against a
        master agreement, this flag indicates corresponding order being closed for
        receiving. If this receipt is against a no release master agreement, this 
		flag indicates closing the master agreement for receiving.
-->
<!ATTLIST ReceiptOrder
	closeForReceiving (yes) #IMPLIED
>

<!-- 
    Defines information related to a purchase order, including purchase order
    reference and related master agreement reference, if any.

    The various content options of ReceiptOrderInfo are in order
    of preference, that is, OrderReference is strongly recommended. If
    that is not possible, MasterAgreementReference, MasterAgreementIDInfo,
    OrderIDInfo should be used, in that order.

    If this receipt is against a release order, reference to both order as well
    as the master agreement should be specified. If the receipt is against a 
    no-release master agreement, only the master agreement reference is required.
    If the receipt is against a purchase order, reference to the purchase order
    should be specified.

    OrderReference: The reference to the purchase order being received.

    MasterAgreementReference: The reference to the master agreement being received.

    OrderIDInfo: The buyer system order ID of the order.

    MasterAgreementIDInfo: The buyer system ID of the corresponding master agreement if receiving
		against master agreement.
-->
<!ELEMENT ReceiptOrderInfo
    ( (OrderReference, (MasterAgreementReference | MasterAgreementIDInfo)?) |
      (MasterAgreementReference, OrderIDInfo?) |
      (MasterAgreementIDInfo, OrderIDInfo?) |
      (OrderIDInfo))>

<!-- 
    Defines line item in the ReceiptRequest

    ReceiptItemReference: The references related to this line item.

    UnitRate: The amount(s) to be paid per unit (of specified measure).

    ReceivedAmount: Amount of received goods or services for this line item. The total received amount 
		for the rate. The total received amount must equal to quantity x UnitRate.

    AssetInfo: Optional asset information for this line item. Specified for each quantity of the line item.
        
    DeliveryAddress: Address where goods are received.

    Comments: Textual comments for this line item.

    Batch: An element carrying batch information for material or goods  produced
        in a single manufacturing run.
    
    Classification: Multiple element that can be used to add a classification for Receipt Item Movement Type, 
		Stock Type or other Classification of the item receipt.
-->
<!ELEMENT ReceiptItem (ReceiptItemReference, UnitRate, ReceivedAmount, AssetInfo*, DeliveryAddress?, Comments?, Batch?, Classification*, Extrinsic*)>
<!--
    @attr receiptLineNumber A buyer-defined ID for the current line item. It must be unique across all receipt 
		line items of the same ReceiptRequest document.

    @attr quantity The quantity received for the current receipt line.
	
		Negative values in the quantity attribute indicate corrective action against an order that was received 
		or returned with errors. For example, if there is an order that has one line item with the quantity as 20, 
		and you originally specified the received quantity as 20; later found out the received quantity was only 
		15 and not 20, you can do a negative receiving to correct this mistake.		
		%
		<ReceiptItem receiptLineNumber="1"
			quantity="-5"
			type="received">
		%
    
    @attr type Indicates whether the items are "received" or "returned".

    @attr parentReceiptLineNumber Line number of the parent line item in the receipt request.

	@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 Specifies whether a parent item uses group-level pricing.

    @attr completedIndicator Set to "yes" to indicate that a component ship notice item is considered closed and no more 
		component receipts are expected for it.
-->
<!ATTLIST ReceiptItem
	receiptLineNumber             %uint;                #REQUIRED
	quantity                      %r8;                  #REQUIRED
	type                      (received|returned)       #IMPLIED
    parentReceiptLineNumber       %uint;                #IMPLIED
    itemType                      %lineItemType;        #IMPLIED
    compositeItemType			  %compositeItemType;	#IMPLIED
    completedIndicator        (yes)                     #IMPLIED
>

<!-- 
    Defines all references related to a line item in this receipt.

    ItemID: The supplier part number of current line item, copied from
        OrderRequest.

    Description: The line item description, copied from OrderRequest.

    ManufacturerPartID: The manufacturer part number.

    ManufacturerName: The name of the manufacturer.

    ShipNoticeReference: Reference to the ShipNoticeRequest document sent from the supplier 
        when this item was shipped.

    ShipNoticeIDInfo: ID of the ShipNoticeRequest known to the Buyer system. This ID is used when ShipNoticeReference is omitted.
       
    ShipNoticeLineItemReference: Provides a reference to the line item in a prior ShipNoticeRequest document.

    ReferenceDocumentInfo: Additional document reference information.        
-->
<!ELEMENT ReceiptItemReference (ItemID?, Description?, (ManufacturerPartID, ManufacturerName)?, (ShipNoticeReference | ShipNoticeIDInfo)?, ShipNoticeLineItemReference?, ReferenceDocumentInfo*)>
<!--
	@attr lineNumber The line number of the current line item, copied from the OrderRequest document. The line 
		number can also refer to a line item in the component ship notice referenced by ShipNoticeReference.
-->
<!ATTLIST ReceiptItemReference
	lineNumber %uint; #REQUIRED
>

<!-- 
    Amount of goods or services received by the buying organization.
-->
<!ELEMENT ReceivedAmount (Money)>

<!--
    The delivered address for an item.
-->
<!ELEMENT DeliveryAddress (Address)>

<!--
	A request sent by a supplier to the buyer to report the consumption of components during the 
	manufacturing of an ordered item.
-->
<!ELEMENT ComponentConsumptionRequest (ComponentConsumptionHeader, ComponentConsumptionPortion*)>

<!--
	Contains information about this component consumption that is common to all contained portions.

	Comments: Contains additional information about this consumption document. All such data must be 
		intended for human use.

		Elements in the Comments list may appear in any order. The xml:lang attribute may have the 
		same value in multiple Comments elements in the list. The set of Comments with a particular 
		xml:lang value should contain similar content to that for any other xml:lang value present 
		in the list.

	Extrinsic: Contains additional data about this component consumption header.
-->
<!ELEMENT ComponentConsumptionHeader (Comments*, Extrinsic*)>
<!--
	@attr consumptionID An identifier for this particular component consumption document.

	@attr operation The operational mode of component consumption document. Defaults to "new". 
		Update and delete operations are not supported for this document.

	@attr referenceDocumentID The identifier of reference Work Order for which the consumption 
		is reported.

	@attr creationDate The date and time this component consumption document was created.

	@attr lastChangeDate The date and time this component consumption document was last modified.
-->
<!ATTLIST ComponentConsumptionHeader
    consumptionID           %string;              #REQUIRED
    operation 				(new)                 #REQUIRED
    referenceDocumentID   	%string;              #IMPLIED
    creationDate           	%datetime.tz;         #IMPLIED
    lastChangeDate         	%datetime.tz;         #IMPLIED
>

<!--
	Contains details of all component consumptions for a particular OrderRequest 
	(via the OrderReference or MasterAgreementReference element).

	OrderReference: Identifies the corresponding purchase order for which component consumption is reported.

	MasterAgreementReference or MasterAgreementIDInfo: Can be used to identify the corresponding scheduling 
		agreement if the component consumption is generated from a scheduling agreement release.

	ComponentConsumptionItem: Contains details of all consumption items for given order reference.

	Extrinsic: Contains additional data about this component consumption portion.
-->
<!ELEMENT ComponentConsumptionPortion
(OrderReference, (MasterAgreementReference | MasterAgreementIDInfo)?, ComponentConsumptionItem*, Extrinsic*)>

<!--
	Contains details of all consumption for a given order reference item.

	ItemID: Identifies the part ID of sub-contracted purchase order item for which component 
		consumption is reported.

	BuyerBatchID: The batch ID provided by the buyer at the line item level to identify the buyer batch for which the 
		item or the product was produced. The batch id is helpful in traceability.

	SupplierBatchID: The batch ID provided by the supplier at the line item 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.

	Contact: In this context, roles that are usually included are: BuyerParty, ProductReceipentParty, ShipFromLocation, 
		and ShipToLocation.

	ComponentConsumptionDetails: Contains details of component consumption for a given PO line item

	ScrapQuantity: Represents the Scrap of a material that is expected to occur during production if the material 
		is a component.

	AssetInfo: The list of asset information of the item.

	Extrinsic: Contains additional data about this component consumption portion.
-->
<!ELEMENT ComponentConsumptionItem (ItemID, UnitOfMeasure?, Batch?, Contact*, Comments*, ComponentConsumptionDetails*, ScrapQuantity?,  AssetInfo*, Extrinsic*)>
<!--
	@attr poLineNumber Purchase order line number associated with this consumption item.
	
	@attr completedIndicator Set to "yes" to indicate that consumption reporting is completed for a PO item.
	
	@attr quantity The quantity of component that is consumed.
-->
<!ATTLIST ComponentConsumptionItem
	poLineNumber           	%uint;                	#REQUIRED
	completedIndicator   	(yes)                   #IMPLIED
	quantity             	%r8;                    #IMPLIED
>

<!--
	Captures details of component consumption for a given PO line item..

	Product: The supplier & buyer part ID of component that is consumed .

	BuyerBatchID: The batch ID provided by the buyer for the component that is consumed

	SupplierBatchID: The batch ID provided by the supplier for the component that is consumed.

	ReferenceDocumentInfo: Details of referenced production order.

	AssetInfo: The list of asset information of the components consumed. The quantity of these elements 
		must match the quantity of component consumed if at least one is specified.

	Dimension: Item dimensions.

	Extrinsic: Contains additional data at schedule line level of component consumption.
-->
<!ELEMENT ComponentConsumptionDetails (Product, UnitOfMeasure, BuyerBatchID?, SupplierBatchID?, ReferenceDocumentInfo*, AssetInfo*, Dimension*, Extrinsic*)>
<!--
	@attr lineNumber The position of a component in the current consumption details.

	@attr quantity The quantity of component that is consumed

	@attr type Type of inventory movement that could cause the suppliers to not consume the material. Possible values:
		<ul>
		<li>blocked - This inventory is not assigned a value and cannot be consumed.</li>
		<li>qualityRestricted - This inventory is not qualified for unrestricted use and cannot be consumed in production.</li>
		<li>scrapped - This inventory is out of date or material has been destroyed during logistics operation.</li>
		</ul>

	@attr usage Specifies whether the supplier uses a component listed in the order. Used only when confirming an order. 
		Possible values are yes (or not specified) or no. In other contexts, usage is not used. For example, when 
		reporting component consumption use type instead.
-->
<!ATTLIST ComponentConsumptionDetails
	lineNumber          %uint;                						#IMPLIED
	quantity            %r8;                  						#REQUIRED
	type        		(blocked | qualityRestricted | scrapped)  	#IMPLIED
	usage               (yes | no)            						#IMPLIED
>
<!-- 
	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*)>



<!--
    This document is intended for Suppliers to communicate the following types of messages to Buyers:
	<ul>
	<li>For Suppliers to Communicate the Manufacturing and Planning related information to Buyers. The processes 
		for Outsourced Manufacturing processes where Contract Manufacturer is the considered to the extension of 
		internal manufacturing.</li>
	<li>For Suppliers to Communicate the Inventory details to Buyers. The processes for Outsourced Manufacturing 
		and Supplier Managed Inventory requires Suppliers provide customers with Inventory updates to support Planning.</li>
	<li>For Supplier to provide Forecast confirmation to the Buyers in Collaborative Planning processes. The goal 
		of sending a Forecast confirmation is to enable an automated process that provides the receiver critical 
		information about the supplier’s constraints. Forecast Confirmation should help automate existing processes 
		for both senders and receivers.</li>
	</uL>
-->
<!ELEMENT ProductReplenishmentMessage (ProductReplenishmentHeader, ProductReplenishmentDetails+, Extrinsic*)>

<!--
    Contains the product replenishment header.
-->
<!ELEMENT ProductReplenishmentHeader EMPTY>
<!--
    @attr messageID Identifier for this product replenishment message.
	
    @attr creationDate Date and time this product replenishment message was created.
	
    @attr processType Identifies the business process supported by the message. Possible values:
		<ul>
		<li>SMI - Supplier-managed inventory (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
		<li>OEM - OEM-owned inventory scenarios (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries, InventoryTimeSeries).</li>
		<li>VMI - Vendor-managed inventory (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
		<li>3PL - Third-party logistics inventory scenarios (Inventory, ConsignmentInventory, PlanningTimeSeries, InventoryTimeSeries).</li>
		<li>ManufacturingVisibility - Contract manufacturers sharing inventory visibility (Inventory, ConsignmentInventory, 
			PlanningTimeSeries, InventoryTimeSeries).</li>
		<li>Forecast - Forecast collaboration (TimeSeries, PlanningTimeSeries).</li>
		<li>Consignment - Consignment material movements (ConsignmentInventory, ConsignmentMovement).</li>
		<li>Sales - Sales report visibility (SalesReport).</li>
		<li>POC - Purchase order collaboration scenarios (Inventory, ConsignmentInventory, TimeSeries, PlanningTimeSeries).</li>
		<li>Capacity - Capacity planning scenarios (PlanningTimeSeries).</li>
		<li>Other - Other collaboration scenarios.</li>
		</ul>        
-->
<!ATTLIST ProductReplenishmentHeader
     messageID           %string;              #REQUIRED
     creationDate           %datetime.tz;         #IMPLIED
     processType  (SMI|OEM|VMI|3PL|ManufacturingVisibility|Forecast|Consignment|Sales|POC|Capacity|Other )  #IMPLIED>

<!--
    The representation of product replenishment for the given 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.

    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: 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: When the type of message is forecast confirmation:
		Contact represents the location to which the product forecast confirmation is taking place.
        The only Contact role (Contact@role attribute value) likely to be sensible in this element are
        "locationTo". To provide a plant location description, the domain attribute of the element IdReference 
		should be set to "buyerLocationID" and the identifier to the plantID.
		
        When the type of message is NOT forecast confirmation:
		<ul>
		<li>Contact with role “locationTo” represents the destination of the product replenishment.</li>
		<li>Contact with role “locationFrom” represents the source of the product replenishment.</li>
		<li>Contact with role “inventoryOwner” (if specified), represents the owner of the inventory, in this case,
			Inventory or ConsignmentInventory should be specified in the message.</li>
		</ul>

	Unit Price: Price per unit of item.

    Comments: These are comments provided for the part whose quantity is being committed.

    ReplenishmentTimeSeries: It represents the product replenishment quantity of a product for a specific time period.

	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.
-->
<!ELEMENT ProductReplenishmentDetails ((ItemID| ResourceID),   Description?, LeadTime?, PlannedAcceptanceDays?, ManufacturerPartID?,
          ManufacturerName?, ReferenceDocumentInfo*, Characteristic*, Batch?, Contact*, UnitPrice?, Inventory?, ConsignmentInventory?, 
          ReplenishmentTimeSeries*, Comments?, UnitOfMeasure?, Extrinsic*)>

<!--
    Contains the product replenishment quantity of a product for a specific time period.

	TimeSeriesDetails: Carries product activity or product replenishment information regarding the quantity of a product for a 
		specific time period.
-->
<!ELEMENT ReplenishmentTimeSeries (TimeSeriesDetails+)>
<!--
	@attr type Type of replenishment order. Possible values:
		<ul>
		<li>manufacturingOrder - An order that initiates the manufacturing process to track the status of manufacturing from 
			Raw Material to Finished Goods status.</li>
		<li>purchaseOrder - Subcontracting purchase order from the backend ERP system.</li>
		<li>supplierForecast - Forecast created by the supplier based on the Demand Supply situation in the backend ERP system. 
			Typically, the supplier creates the forecast for components based on the Finished Goods Demand.</li>
		<li>shipment - Supplier shipment quantity from supplier's location and customer's location to ship the quantities 
			requested.</li>
		<li>projectedStock - Stock that is expected to be available in the location at the end of this day.</li>
		<li>firmReceipt - Total quantity that the supplier wants to deliver to the customer in period so that the total demand 
			from the customer is covered.</li>
		<li>plannedReceipt - Total quantity that the supplier wants to deliver to the customer in a period so that the raw net 
			demands of the buyer are covered. It is a planned quantity that is subject to changes.</li>
		<li>forecastConfirmation - Total quantity that the supplier wants to deliver to the customer in the period so that the 
			total demand from the customer is covered.</li>
		<li>capacityConfirmation - Quantity of production output of a specific resource that supplier commits to attain.</li>
		<li>capacityShiftRuns - Number of shifts a specific production resource can run.</li>
		</ul>
	
	@attr customType String to include buyer-defined custom types, for example, "BuildQuantity".
-->
<!ATTLIST ReplenishmentTimeSeries
type                 (manufacturingOrder | purchaseOrder | supplierForecast | shipment | projectedStock | firmReceipt | plannedReceipt | forecastConfirmation | capacityConfirmation | capacityShiftRuns | custom)  #REQUIRED 
customType %string;   #IMPLIED >
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

<!--
    Sales Order mod file
-->

<!-- ====
    SalesOrderRequest transaction forwards shopping basket data in the Request.
    No specific Response document is required for this transaction.
    Servers must respond to a SalesOrderRequest with a generic Response
    document.
==== -->

<!--
    Definition of a Sales Order Request. This is the shopping basket data 
    that is sent to the procurement application from the supplier. 
-->
<!ELEMENT SalesOrderRequest (SalesOrderHeader, ItemIn*)>

<!--
    Header of a Sales Order Request.

    The contained DocumentReference element may appear in a document only
    when the operation is "update". In that case, the DocumentReference is
    required and it must reference the most recent SalesOrderRequest
    document for this particular sales order (usually also indicated by a
    common salesOrderID). For example when a sale order is created, updated
    and then updated again, the final document must contain a
    DocumentReference referring to the previous Sales Order with
    operation="update". That document must, in turn, refer to the original
    (operation="new") SalesOrderRequest document.

    Tax information can be present at this level. It indicates taxes that
    are applicable to the whole document.

    Contact information should uniquely identify the requester in the 
    procurement application. There must a contact with the role as 
    "requester" along with the details of the requester.

    The Comments element list may contain additional information about the
    status of the overall order. This data must be intended for human use.

    Elements in the Comments list may appear in any order. The xml:lang
    attribute may have the same value in multiple Comments elements in the
    list. The set of Comments with a particular xml:lang value should
    contain similar content to that for any other xml:lang value present in
    the list.

    On the other hand, the Extrinsic element list may be used to insert
    additional data about the order for application consumption. These
    elements may include predefined keywords and values affecting workflow
    in the receiving system.

    Elements in the Extrinsic list may appear in any order. An extrinsic
    type (Extrinsic@name attribute value) must not appear more than once
    within a SalesOrderHeader element. (The SalesOrderHeader must not 
    contain a default extrinsic value  overridden at the lower level.)

    SupplierOrderInfo of PunchOutOrderMessage should have the orderID
    same as salesOrderID. Procurement application would use the orderID of
    PunchOutOrderMessage and salesOrderID of SalesOrderRequest to identify
    the document within the procurement application.
-->
<!ELEMENT SalesOrderHeader (DocumentReference?, Total?, Tax?, Contact+,
                            Comments*, Extrinsic*)>
<!--
    @attr salesOrderID An identifier for this particular sale order assigned by the supplier. This attribute provides an unambiguous 
		and direct connection between all versions of the sale order. A user-visible and secondary (to the payloadID attribute of the 
		cXML element) identifier for this document. This value should remain same for all SalesOrderRequests corresponding to the 
		same order.
		
		The salesOrderID may be used in the procurement application for processing this request. Links between these documents must 
		be deduced using the DocumentReference element contained in the update's SalesOrderHeader and the payloadID attribute of 
		the original or previous update.

    @attr operation The (optional) operational mode of the sales order document. Defaults to "new".
	
		An "update" operation allows a supplier to correct an error in a sale order or to add additional information learned later. 
		In either case, an "update" document must be complete: All data from the original sale order or a previous update should be 
		discarded by the recipient.
		
		A "cancel" operation allows a supplier to cancel a sale order sent earlier.
		
		A SalesOrderRequest with an "update" operation must also include a DocumentReference element in the SalesOrderHeader. This 
		effectively sequences multiple versions of a confirmation and may provide a link between those versions.

    @attr operationAllowed Highest operation allowed on the shopping basket in the procurement application. "create" allows only 
		later OrderRequest operations on these items. "inspect" adds a PunchOutSetupRequest with operation="inspect". And, "edit" 
		allows operation="edit" in the later punchout setup request.

    @attr noticeDate The date and time this sale order was created.

    @attr orderVersion The supplier system order version number for this request. Relevant when the SalesOrderRequest 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.

    @attr channelType Indicates the action expected by the supplier who initiates the sales document. Possible values:
		<ul>
		<li>buy - The buyer will create a Sales Order.</li>
		<li>sell - The buyer will create a Purchase Order.</li>
		<li>visibility - No action is expected from the buyer. The supplier is sending the sales document for visibility on a 
			purchase order from a third party.</li>
		</ul>
-->
<!ATTLIST SalesOrderHeader
    salesOrderID          %string;                       #REQUIRED
    operation            (new | update | cancel)         "new"
    operationAllowed     (create | inspect | edit)       #REQUIRED
    noticeDate           %datetime.tz;                   #REQUIRED
    orderVersion         %number;                        #IMPLIED
    channelType          (buy | sell | visibility)       #IMPLIED
><!--
    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 -->
