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

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

<!--
    Note: In InvoiceDetailRequest, positive amounts are debit the
    buyer owes the supplier; negative amounts are credit given back to the
    buyer by the supplier. For example, the supplier can use a SubtotalAmount
    of -50 USD to indicate credit of 50 USD given back to the buyer.

    Also note that all amounts at invoice line level should add up
    to the total specified in InvoiceDetailSummary.
-->

<!--
    Defines a party involved in invoicing, including Issuer Of Invoice (issuerOfInvoice), 
	Sold to (soldTo), Bill to (billTo), Remit to (remitTo), etc. This element should 
	NOT be used for specifying ship from and ship to. For that purpose, InvoiceDetailShipping 
	should be used.

    Contact: Contact information of the invoice partner. Allowed contact
        roles include issuerOfInvoice, soldTo, billTo, and remitTo.

    IdReference: Partner reference ID, including account #, ERP account payable ID,
        ERP account receivable ID, bank routing ID for remittance, supplier
        tax ID, VAT ID, 1099 ID, court register ID, tax exemption ID, and so on.
-->
<!ELEMENT InvoicePartner (Contact, IdReference*)>

<!--
    Defines invoice header level indicators describing overall
    attributes of this invoice. By default, all indicators are false.
-->
<!ELEMENT InvoiceDetailHeaderIndicator EMPTY>
<!--
    @attr isHeaderInvoice Category of the invoice. Possible values:
		<ul>
		<li>yes - Header invoice. Invoice uses InvoiceDetailHeaderOrder, which contains 
			header level invoice information without item details.</li>
		<li>Not specified - Detail invoice. Invoice uses InvoiceDetailOrder, which 
			contains item details.</li>
		</ul>

    @attr isVatRecoverable Set to "yes" to indicate that the entire invoice is 
		VAT-recoverable.

    @attr isPriceBasedLineLevelCreditMemo Set to "yes" to indicate that the invoice 
		is a price-based, line-level credit memo for an early payment discount granted 
		after the original invoice was issued.
-->
<!ATTLIST InvoiceDetailHeaderIndicator
    isHeaderInvoice                   (yes)      #IMPLIED
    isVatRecoverable                  (yes)      #IMPLIED
    isPriceBasedLineLevelCreditMemo   (yes)      #IMPLIED
>

<!--
    Defines invoice line level indicators indicating certain
    information is provided at invoice line level (in InvoiceDetailItem
    or InvoiceDetailOrderSummary). By default, all indicators are false.

    If an indicator indicates certain information (for example, tax, shipping, and so on)
    will be provided at invoice line level, for invoice 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 InvoiceDetailLineIndicator EMPTY>
<!--
    @attr isTaxInLine Set to "yes" if tax info (Tax) is provided at invoice line level.

    @attr isSpecialHandlingInLine Set to "yes" if special handling info (InvoiceDetailLineSpecialHandling)
        is provided at invoice line level.

    @attr isShippingInLine Set to "yes" if shipping info (InvoiceDetailLineShipping) is provided
        at invoice line level.

    @attr isDiscountInLine Set to "yes" if discount info (InvoiceDetailDiscount) is provided
        at invoice line level.

    @attr isAccountingInLine Set to "yes" if accounting distribution info (Distribution) is provided at
        invoice line level. If isHeaderInvoice is true, this indicator must
        be false because Distribution is only available at item level.

    @attr isPriceAdjustmentInLine Set to "yes" if a line-item credit memo or debit memo has a price adjustment.
-->
<!ATTLIST InvoiceDetailLineIndicator
    isTaxInLine                            (yes)      #IMPLIED
    isSpecialHandlingInLine                (yes)      #IMPLIED
    isShippingInLine                       (yes)      #IMPLIED
    isDiscountInLine                       (yes)      #IMPLIED
    isAccountingInLine                     (yes)      #IMPLIED
    isPriceAdjustmentInLine                (yes)      #IMPLIED
>

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

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

    OrderReference: The reference to the order being invoiced.

    MasterAgreementReference: The reference to the corresponding master 
		agreement if the order being invoiced is a release.

    MasterAgreementIDInfo: The buyer system id of the corresponding master 
		agreement if the order being invoiced is a release.

    OrderIDInfo: The buyer system order id of the order.

    SupplierOrderInfo: Supplier sales order info of this order.
-->
<!ELEMENT InvoiceDetailOrderInfo
    ( (OrderReference, (MasterAgreementReference | MasterAgreementIDInfo)?,
        SupplierOrderInfo?) |
      (MasterAgreementReference, OrderIDInfo?, SupplierOrderInfo?) |
      (MasterAgreementIDInfo, OrderIDInfo?, SupplierOrderInfo?) |
      (OrderIDInfo, SupplierOrderInfo?) |
      SupplierOrderInfo )>

<!--
    Defines the shipping information related to this 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@domain attribute
        value) must not appear more than once in an InvoiceDetailShipping
        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 InvoiceDetailShipping (Contact, Contact+,
                                 (CarrierIdentifier+, ShipmentIdentifier+)?,
                                 DocumentReference?)>
<!--
    @attr shippingDate The date and time this shipment leaves the supplier.
-->
<!ATTLIST InvoiceDetailShipping
    shippingDate             %datetime.tz;          #IMPLIED
>

<!--
	Defines a payment term.

    DEPRECATED in cXML 1.2.011. Do not use. Use PaymentTerm instead.
-->
<!ELEMENT InvoiceDetailPaymentTerm EMPTY>
<!--
    @attr payInNumberOfDays The number of days after invoice date to pay in full.

    @attr percentageRate Discount rate as a percentage for the payment
        term defined in the corresponding payInNumberOfDays.
        Positive means discount and negative means penalty.
-->
<!ATTLIST InvoiceDetailPaymentTerm
    payInNumberOfDays        %uint;         #REQUIRED
    percentageRate           %r8;           #REQUIRED
>

<!-- 
    Defines PaymentInformation for the document that Buyers can provide in
    ERP Copy Invoices and ERS invoices.
    Used to indicate the date after which the invoice has to be paid without any discount
-->
<!ELEMENT PaymentInformation EMPTY>
<!-- 
    @attr paymentNetDueDate The date after which the invoice has to be paid without any discount.
-->
<!ATTLIST PaymentInformation
    paymentNetDueDate         %datetime.tz;  #IMPLIED
>

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

    Money: The total discount in dollar (or other currency) amount.

    Distribution: Accounting distribution information, including cost center, GL#, and so on.
-->
<!ELEMENT InvoiceDetailDiscount (Money, Distribution*)>
<!--
    @attr percentageRate The discount rate as a percentage. Positive rates denote 
		discounts and negative rates denote penalties. Do not include a percentage 
		sign (\%) or divide by 100. For example, "2" means 2\%.
-->
<!ATTLIST InvoiceDetailDiscount
    percentageRate          %r8;           #IMPLIED
>

<!--
    Represents the additional Charges and Allowances
    that are incurred for the total landed cost of the goods and service 
    contained in this invoice item.

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

<!--
    Represents the additional Charges, Allowances that are incurred for the total landed 
	cost of the goods and services within the invoice 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 InvoiceHeaderModifications (Modification+)>

<!--
    Defines the summary information of an InvoiceDetailRequest.

    SubtotalAmount: Sum of amount of all quantities.

    Tax: Tax information.

    SpecialHandlingAmount: Special handling charge.

    ShippingAmount: Shipping charge.

    InvoiceDetailDiscount: The total discount applied in this InvoiceDetailRequest.
        Its contained percentageRate attribute will be ignored if isDiscountInLine 
		is true.

    InvoiceHeaderModifications: The additional Charges, Allowances and their Taxes that are 
		incurred for the total landed cost of the goods and services within the invoice
        header. This value specified at the header-level  is not the aggregated
        value towards the charges or allowances available for the line items.
    
	InvoiceDetailSummaryLineItemModifications: Summary of all modifications applied on the 
		goods and services at the line item level in an invoice.
	
    TotalCharges: The total sum of all the charges applied on the goods and services at 
        the header-level and  line item level in an invoice.

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

    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 an invoice. This does not include taxes.
    
    GrossAmount: Sum of subtotal, taxes, special handling charges, and shipping charges, 
		before discounts.

    InvoiceItemModificationsTotalAmount: Represents the  sum total of all the charges, allowances, 
		and their taxes applied on the goods and services at the line item level in an invoice.

    NetAmount: Gross amount minus discounts.

    DepositAmount: Total deposit/prepayment amount.

    DueAmount: Total amount due and payable. It equals NetAmount minus DepositAmount. If 
		InvoiceDetailRequestHeader@purpose is "creditMemo" or "lineLevelCreditMemo", this 
		amount must be negative. If InvoiceDetailRequestHeader@purpose is "debitMemo", this 
		amount must be positive.
    
    InvoiceDetailSummaryIndustry: Industry specific summary level data is specified in this 
		element.

-->
<!ELEMENT InvoiceDetailSummary (SubtotalAmount, Tax, SpecialHandlingAmount?,
                                ShippingAmount?, GrossAmount?,
                                InvoiceDetailDiscount?, InvoiceHeaderModifications?, InvoiceDetailSummaryLineItemModifications?,
								TotalCharges?, TotalAllowances?, TotalAmountWithoutTax?, NetAmount,
                                DepositAmount?, DueAmount?, InvoiceDetailSummaryIndustry?)>

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

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

    Description: The line item description, copied from OrderRequest.

    Classification: The classification code for of the line item.

    ManufacturerPartID: The manufacturer part number.

    ManufacturerName: The name of the manufacturer.

    Country: The country of origin of the current line item.

    SerialNumber: Defines one or more serial numbers for accountable items that
        are being invoiced. If serial numbers are being reported, then
        the number of serial numbers should match the invoice
        quantity. The specification does not enforce this. Rather, it
        is the responsibility of buyer and supplier implementers to
        validate this count if appropriate. SerialNumber should be
        used instead of the InvoiceDetailItemReference@serialNumber
        attribute, which is now deprecated. It is not valid to use
        both the attribute and the SerialNumber element.

	SupplierBatchID: Batch ID is assigned to material that is manufactured in 
		batches or production lots to a specific batch number.

    InvoiceDetailItemReferenceIndustry: Industry specific item detail data is 
		specified in this element.
-->
<!ELEMENT InvoiceDetailItemReference (ItemID?, Description?, Classification*,
                                      (ManufacturerPartID, ManufacturerName)?,
                                      Country?, SerialNumber*, SupplierBatchID?, InvoiceDetailItemReferenceIndustry?)>
<!--
    @attr lineNumber The line number of current line item, copied from OrderRequest.

    @attr serialNumber The product serial number for the current line item.
		DEPRECATED in cXML 1.2.009. Use SerialNumber elements instead.
-->
<!ATTLIST InvoiceDetailItemReference
    lineNumber      %uint;         #REQUIRED
    serialNumber    %string;       #IMPLIED
>

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

    Classification: The classification information of the service.

    ItemID: The supplier part number of the service.

    Description: The description of the service.
-->
<!ELEMENT InvoiceDetailServiceItemReference (Classification*, ItemID?, Description?)>
<!--
    @attr lineNumber The line number of current line item on the master agreement. This 
		value is required if the item being invoiced is part of a detailed master agreement 
		that specifies detailed pricing terms at the line item or commodity level. It is 
		optional if the item being invoiced is part of a master supplier agreement or 
		blanket purchase order which do not contain detailed line item pricing information.
-->
<!ATTLIST InvoiceDetailServiceItemReference
    lineNumber      %uint;         #IMPLIED
>

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

	DocumentReference: The reference to a prior ServiceEntryRequest.
-->
<!ELEMENT ServiceEntryItemReference (DocumentReference)>
<!--
	@attr serviceLineNumber Refers to the line number in the related ServiceEntryRequest 
		for the item.

	@attr serviceEntryID The ID for the related ServiceEntryRequest. If present, it must 
		be copied from the ServiceEntryRequestHeader.

	@attr serviceEntryDate The date and time when the supplier created the service sheet. 
		If present, it must be copied from the ServiceEntryRequestHeader.
-->
<!ATTLIST ServiceEntryItemReference
    serviceLineNumber        	%uint;         		#REQUIRED
    serviceEntryID              %string;            #IMPLIED
    serviceEntryDate            %datetime.tz;       #IMPLIED
>

<!--
	The ServiceEntryItemIDInfo element provides a clear reference to the line item
	in a prior ServiceEntryRequest document.
-->
<!ELEMENT ServiceEntryItemIDInfo (IdReference*)>
<!--
	@attr serviceLineNumber The line number of current line item, copied from ServiceEntryRequest.

	@attr serviceEntryID The ID of a service entry sheet known to the buyer system. Basically, what
       the service entry sheet number is today.

	@attr serviceEntryDate The date and time the service entry sheet was created. If present, 
		must be copied directly from the referenced ServiceEntryRequest document's 
		ServiceEntryRequestHeader.
-->
<!ATTLIST ServiceEntryItemIDInfo
    serviceLineNumber        	%uint;         		#REQUIRED
    serviceEntryID              %string;            #REQUIRED
    serviceEntryDate            %datetime.tz;       #IMPLIED
>

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

    Description: Textual description of the special handling.

    Money: The special handling amount.

    Distribution: Accounting distribution information, including cost center, GL#, and so on.
-->
<!ELEMENT InvoiceDetailLineSpecialHandling (Description?,
                                            Money,
                                            Distribution*)>

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

    InvoiceDetailShipping: The shipping details.

    Money: The shipping amount.

    Distribution: Accounting distribution information, including cost center, GL#, and so on.
-->
<!ELEMENT InvoiceDetailLineShipping (InvoiceDetailShipping, Money, Distribution*)>

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

    UnitOfMeasure: The unit of measure.

    UnitPrice: The unit price.

    InvoiceDetailItemReference: The references related to this line item.
    
    ReceiptLineItemReference: The reference to the receipt line related to this line item.
    
    ShipNoticeLineItemReference: The reference to the ship notice line related to this 
		line item.

    ServiceEntryItemReference: The clear reference to the line item in a prior 
		ServiceEntryRequest document.

	ServiceEntryItemIDInfo: The clear reference to the line item in a prior 
		ServiceEntryRequest document.

    ProductMovementItemIDInfo: Movement line item from a consignment movement document 
		that is invoiced

    SubtotalAmount: The invoice subtotal of the current item = unit price x
        invoiced quantity.

    Tax: The tax info for this line item. It will be ignored if isTaxInLine
        is false.

    InvoiceDetailLineSpecialHandling: The special handling info for this line item. 
		It will be ignored if isSpecialHandlingInLine is false.

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

    ShipNoticeIDInfo: References shipment related document identifiers.

    GrossAmount: The SubtotalAmount plus taxes, shipping, and special handling
        charges.

    InvoiceDetailDiscount: The discount info for this line item. It will be ignored if
        isDiscountInLine is false.

    InvoiceItemModifications: The additional Charges, Allowances and their Taxes 
		that are incurred for the total landed cost of the goods and service 
        contained in this invoice item.

    TotalCharges: The total sum of all the charges applied on the goods and 
        services at the line item level in an invoice.

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

    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 invoice. This does not include taxes.
    
    NetAmount: The Gross Amount minus discount amount.

    Distribution: Accounting distribution information, including cost center, GL#, etc.
        It will be ignored if isAccountingInLine is false.

    Packaging: Details about the packaging of this invoiced item.

    InvoiceDetailItemIndustry: Industry specific line item detail data is specified 
		in this element.

    Comments: Textual comments for this line item.

    CustomsInfo: Defines specific customs information data for this invoice item, this 
		complementary information applies for imported invoice items.

    Extrinsic: Additional information related to this line item. Should not
        duplicate anything in InvoiceDetailItem or InvoiceDetailOrder.
-->
<!ELEMENT InvoiceDetailItem (UnitOfMeasure, UnitPrice, PriceBasisQuantity?,
                             InvoiceDetailItemReference,
                             ReceiptLineItemReference?,
                             ShipNoticeLineItemReference?,
                             (ServiceEntryItemReference | ServiceEntryItemIDInfo)?,
                             ProductMovementItemIDInfo?,
                             SubtotalAmount?,
                             Tax?, InvoiceDetailLineSpecialHandling?,
                             InvoiceDetailLineShipping?, ShipNoticeIDInfo?, GrossAmount?,
                             InvoiceDetailDiscount?, InvoiceItemModifications?, TotalCharges?, 
                             TotalAllowances?, TotalAmountWithoutTax?, NetAmount?,
                             Distribution*, Packaging*, InvoiceDetailItemIndustry?, Comments?, CustomsInfo?, Extrinsic*)>
<!--
    @attr invoiceLineNumber Supplier defined ID for the current invoice line. Should be unique across all 
		invoice lines within an invoice.

    @attr quantity The quantity being invoiced for the 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 parentInvoiceLineNumber Specifies the line number of the corresponding parent line item. This 
		attribute is applicable only for a line item with itemType="item".

    @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. Possible values are 
		"groupLevel" or "itemLevel".
    
    @attr reason Specifies the reason for a line-item credit memo. The only possible value for reason is "return", 
		which means the credit memo is for a return item.

    @attr isAdHoc Set to "yes" to indicate that the item does not exist in the reference document or contract 
		master agreement.
-->
<!ATTLIST InvoiceDetailItem
    invoiceLineNumber        %uint;         #REQUIRED
    quantity                 %r8;           #REQUIRED
    referenceDate            %datetime.tz;  #IMPLIED
    inspectionDate           %datetime.tz;  #IMPLIED
    parentInvoiceLineNumber  %uint;         #IMPLIED
    itemType                 %lineItemType; #IMPLIED
	compositeItemType		 %compositeItemType;		#IMPLIED
    reason                   (return)       #IMPLIED
    isAdHoc                  (yes)          #IMPLIED 
>

<!--
    Defines a service line item in the InvoiceDetailRequest.

    InvoiceDetailServiceItemReference: The references related to this line item.

    ServiceEntryItemReference: The clear reference to the line item in a prior ServiceEntryRequest document.

	ServiceEntryItemIDInfo: The clear reference to the line item in a prior ServiceEntryRequest document.

    SubtotalAmount: The invoice subtotal of the current service item. If unit price and invoiced quantity 
		are specified, then subtotal should be equal to the product of them.

    Period: The period during which the service was rendered.

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

    UnitOfMeasure: (DEPRECATED) The unit of measure. For ex: HUR (per hour), MON (per month), etc. Use of
		UnitRate is recommended over use of this element.

    UnitPrice: (DEPRECATED) The unit price if any. Use of UnitRate is recommended over use 
		of this element.

    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.

    InvoiceDetailDiscount: The discount info for this line item. It will be ignored if
        isDiscountInLine is false.

    InvoiceItemModifications: The additional Charges, Allowances and their Taxes that are 
        incurred for the total landed cost of the goods and service 
        contained in this invoice item.

    TotalCharges: The total sum of all the charges applied on the goods and 
        services at the line item level in an invoice.

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

    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 invoice. This does not include taxes.
    
    NetAmount: The Gross Amount minus discount amount.

    Distribution: Accounting distribution information, including cost center, GL#, etc.
        It will be ignored if isAccountingInLine is false.

    Comments: Textual comments for this line item.

    InvoiceLaborDetail: Additional details for a particular type of spend category will be specified here.
        For example, for timecard related(temp labor) services, extra info like the 
        TimeCard document reference, Contractor, and so on, can be specified.
    
    Extrinsic: Additional information related to this line item. Should not duplicate
        anything in InvoiceDetailItem or InvoiceDetailOrder. Other line item related
        attributes such as "union/non-union" should be specified in 
        extrinsic elements.
-->
<!ELEMENT InvoiceDetailServiceItem (
                             InvoiceDetailServiceItemReference,
                             (ServiceEntryItemReference | ServiceEntryItemIDInfo)?,
                             SubtotalAmount,
                             Period?, 
                             (UnitRate | (UnitOfMeasure, UnitPrice, PriceBasisQuantity?))?,
                             Tax?,
                             GrossAmount?,
                             InvoiceDetailDiscount?, InvoiceItemModifications?, TotalCharges?, 
                             TotalAllowances?, TotalAmountWithoutTax?, NetAmount?,
                             Distribution*, Comments?, 
                             (InvoiceLaborDetail)?,
                             Extrinsic*)>

<!--
    @attr invoiceLineNumber Supplier defined ID for the current invoice line. Should be unique across 
		all invoice lines within an invoice.

    @attr quantity The quantity being invoiced for the line item. For service items, quantity 
		represents the number of units of service rendered. For example, 2 hours of service, where 
		UnitOfMeasure is “HUR”

    @attr referenceDate The reference date for the service item. This can indicate the date at 
		which the service line item is being invoiced.

    @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 parentInvoiceLineNumber To specify the line number of the corresponding parent line item. 
		This field is applicable only for a line item with itemType="item".
	
    @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 isAdHoc Set to "yes" to indicate that the item does not exist in the reference document or 
		contract master agreement.
-->
<!ATTLIST InvoiceDetailServiceItem
    invoiceLineNumber        %uint;         #REQUIRED
    quantity                 %r8;           #IMPLIED
    referenceDate            %datetime.tz;  #IMPLIED
    inspectionDate           %datetime.tz;  #IMPLIED
    parentInvoiceLineNumber  %uint;         #IMPLIED
    itemType                 %lineItemType; #IMPLIED  
    isAdHoc                  (yes)          #IMPLIED
>

<!--
    Defines header level summary info of an order or master agreement in an invoice
    line.

    SubtotalAmount: The invoice subtotal of this order or master agreement.

    Period: The period during which the service was rendered. It should only be used for
        header level summary info for services, and it does not apply to goods.

    Tax: The tax info for this order or master agreement. It will be ignored if
        isTaxInLine is false.

    InvoiceDetailLineSpecialHandling: The special handling info for this order or master 
		agreement. It will be ignored if isSpecialHandlingInLine is false. It should only be 
		used for header level summary info for goods, and it does not apply to services.

    InvoiceDetailLineShipping: The shipping info for this order. It will be ignored if 
		isShippingInLine is false. It should only be used for header level summary info 
		for goods, and it does not apply to services.

    GrossAmount: The SubtotalAmount plus taxes, shipping, and special handling
        charges.

    InvoiceDetailDiscount: The discount info for this order. It will be ignored if
        isDiscountInLine is false.

    NetAmount: The GrossAmount minus discount amount.

    Comments: Textual comments for this line item.

    Extrinsic: Additional information related to this line item. Should not
        duplicate anything in InvoiceDetailOrderSummary or
        InvoiceDetailHeaderOrder.
-->
<!ELEMENT InvoiceDetailOrderSummary (SubtotalAmount, Period?, Tax?,
                                     InvoiceDetailLineSpecialHandling?,
                                     InvoiceDetailLineShipping?,
                                     GrossAmount?, InvoiceDetailDiscount?,
                                     NetAmount?, Comments?, Extrinsic*)>
<!--
    @attr invoiceLineNumber Supplier defined ID for the current invoice line. It should be 
		unique across all invoice lines of the same InvoiceDetailRequest.

    @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.
-->
<!ATTLIST InvoiceDetailOrderSummary
    invoiceLineNumber        %uint;         #REQUIRED
    inspectionDate           %datetime.tz;  #IMPLIED
>

<!--
    Defines the header invoice information of an order without item details,
    used ONLY when isHeaderInvoice is true.

    In this case, an invoice line is an InvoiceDetailHeaderOrder
    and its invoice line number is InvoiceDetailHeaderOrder/
    InvoiceDetailOrderSummary@invoiceLineNumber.

    InvoiceDetailOrderInfo: The reference information of the order.

    InvoiceDetailOrderSummary: The header level invoice info of the order.
-->
<!ELEMENT InvoiceDetailHeaderOrder
    (InvoiceDetailOrderInfo, InvoiceDetailOrderSummary)>

<!--
    Defines the invoice information of an order or master agreement with item details,
    used ONLY when isHeaderInvoice is false.

    In this case, an invoice line is an InvoiceDetailItem and its invoice
    line number is InvoiceDetailItem@invoiceLineNumber.

    InvoiceDetailOrderInfo: The reference information of the order or 
		master agreement.

    InvoiceDetailReceiptInfo: The reference information of the receipt.

    InvoiceDetailShipNoticeInfo: The reference information of the ship notice.

    InvoiceDetailItem: The information of an item in the order.

    InvoiceDetailServiceItem: The information of a service item in the master agreement.
-->
<!ELEMENT InvoiceDetailOrder (InvoiceDetailOrderInfo, InvoiceDetailReceiptInfo?, InvoiceDetailShipNoticeInfo?,
                              (InvoiceDetailItem | InvoiceDetailServiceItem)+)>

<!--
    Defines the header information of an InvoiceDetailRequest.

    InvoiceDetailHeaderIndicator: Header level indicators describing overall attributes of this
        invoice.

    InvoiceDetailLineIndicator: Header level indicators indicating certain information 
		is provided at invoice line level (in InvoiceDetailItem or InvoiceDetailOrderSummary).

    InvoicePartner: All partners invoiced in invoicing, including Sold to,
        Bill to, Remit to, Issuer of Invoice, and so on.

    DocumentReference: Reference to an earlier InvoiceDetailRequest. If the
        attribute InvoiceDetailRequestHeader@operation is "delete",
        the DocumentReference is required and it must reference the
        original InvoiceDetailRequest document (with value "new" for
        its attribute InvoiceDetailRequestHeader@operation) during the
        same invoicing process. If the attribute
        InvoiceDetailRequestHeader@purpose is "lineLevelCreditMemo",
        the DocumentReference is required and must identify the
        original invoice against which the credit is applied. In all
        other situations, the DocumentReference is optional and, if it
        is provided, it must reference the InvoiceDetailRequest which
        is related to the current InvoiceDetailRequest.

    InvoiceIDInfo: Reference to an earlier InvoiceDetailRequest. If both
        DocumentReference and InvoiceIDInfo are provided, they must
        refer to the same invoice.

    PaymentProposalIDInfo: Reference to an earlier PaymentProposalRequest.
        In case of priceBasedLineLevelCreditMemo, this element will be populated. 

    InvoiceDetailShipping: The shipping details of this invoice. It will be ignored if
        isShippingInLine is true.

    ShipNoticeIDInfo: References shipment related document identifiers.

    InvoiceDetailPaymentTerm: DEPRECATED in cXML 1.2.011. Do not use. Use PaymentTerm instead.

    PaymentTerm: This defines the payment terms for this invoice.

    Period: The total period during which all the services (specified in this invoice)
        were rendered. This does not imply anything about the Period at the
        line level. 

    Comments: Textual comments for this invoice.

    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 invoice. Should not
        duplicate anything in InvoiceDetailRequestHeader or InvoiceDetailRequest.
        For service related invoice, header level service extrinsics such 
        as "serviceLocation" can be specified here as follows.
		%
        <Extrinsic name="serviceLocation">
            <Contact role="serviceLocation">
                <Name>XYZ Inc</Name>
                <PostalAddress>
                    <Street>123 Easy St</Street>
                    <City>Sunnyvale</City>
                    <State>California</State>
                    <PostalCode>94089</PostalCode>
                    <Country isoCountryCode="US">USA</Country>
                </PostalAddress>
            </Contact>
        </Extrinsic>
		%
-->
<!ELEMENT InvoiceDetailRequestHeader (InvoiceDetailHeaderIndicator,
                                      InvoiceDetailLineIndicator,
                                      InvoicePartner*,
                                      DocumentReference?,
                                      InvoiceIDInfo?,
                                      PaymentProposalIDInfo?,
                                      InvoiceDetailShipping?,
                                      ShipNoticeIDInfo?,
                                      (InvoiceDetailPaymentTerm*|PaymentTerm*),
                                      PaymentInformation?,
                                      Period?,
                                      Comments?,
                                      IdReference*,
                                      Extrinsic*)>
<!--
    @attr invoiceID A supplier-generated identifier for this Invoice. Identical to the
        Invoice Number which appears at the top of a physical Invoice.

    @attr isInformationOnly True if this document is for buyer's information only (i.e. no action
        needs to be taken by the buyer). False if the buyer needs to take
        action upon receiving this document (for example, submit payment or accept
        credit). By default, it is false.

    @attr purpose The purpose of this invoice. Possible values:
		<ul>
		<li>standard (default) - This invoice is a standard billing statement from the
            supplier to the buyer.</li>
        <li>creditMemo - This invoice is a credit memo for giving credit back
            to the buyer by the supplier. In this case, the attribute
            InvoiceDetailHeaderIndicator@isHeaderInvoice must be true.
            Also, the element InvoiceDetailSummary/DueAmount must be
            a negative amount.</li>
        <li>debitMemo - This invoice is a debit memo for billing a balance
            owed by the buyer to the supplier. In this case, the attribute
            InvoiceDetailHeaderIndicator@isHeaderInvoice must be true.
            Also, the element InvoiceDetailSummary/DueAmount must be
            a positive amount.</li>
        <li>lineLevelCreditMemo - This invoice is a line item level credit memo 
            for giving credit back to the buyer by the supplier. In this 
            case, the attribute InvoiceDetailHeaderIndicator@isHeaderInvoice 
            is false. All the line item amounts and hence the 
            InvoiceDetailSummary/DueAmount must be a negative amount.</li>
        <li>lineLevelDebitMemo - This invoice is a line item level debit memo 
            billing a balance owed by the buyer to the supplier.</li>
		</ul>

    @attr operation How this document is acting on the invoice:
		<ul>
		<li>new (default) - This document creates a new invoice.</li>
		<li>delete - This document cancels an existing invoice. That existing
            invoice must be specified as DocumentReference.</li>
		</ul>

    @attr invoiceDate Date and time this Invoice was created (should be earlier than the
        document's timestamp).

    @attr invoiceOrigin Indicates the originator of the invoice for categorization. Possible values:
		<ul>
		<li>supplier - Invoice originated by supplier.</li>
		<li>buyer - Invoice originated by buying organization.</li>
		<li>Not specified - Invoice origin is unknown.</li>
		</ul>
	
	@attr isERS Whether the invoice is an Evaluated Receipt Settlement (ERS) invoice. The only 
		possible value is "yes". If not specified, the invoice is a regular invoice.
-->
<!ATTLIST InvoiceDetailRequestHeader
    invoiceID     %string;                         #REQUIRED
    isInformationOnly
                  (yes)                            #IMPLIED
    purpose       (standard | creditMemo | debitMemo | lineLevelCreditMemo | lineLevelDebitMemo)
                                                   "standard"
    operation     (new | delete)                   "new"
    invoiceDate   %datetime.tz;                    #REQUIRED
    invoiceOrigin   
                  (supplier | buyer)               #IMPLIED
    isERS          (yes)                           #IMPLIED
>

<!--
    Transmits a invoice request to a buyer. Provides order
    references, line item references, partners involved, accounting
    distribution, discount terms, shipping and special handling, applicable
    taxes, deposit and payment, contact and remittance information, etc.

    Suppliers can use InvoiceDetailRequest to send invoice for any
    portion of all or selected line items from single or multiple
    orders. They can also use InvoiceDetailRequest to send cancel invoice
    (InvoiceDetailRequestHeader@operation is "delete"), credit memo,
    debit memo, or receipt (InvoiceDetailRequestHeader@isInformationOnly is
    "yes").

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

    InvoiceDetailRequestHeader: The header information of this invoice.

    InvoiceDetailOrder: The invoice information of an order with item details, 
		used ONLY when isHeaderInvoice is false.

    InvoiceDetailHeaderOrder: The header invoice information of an order 
		without item details, used ONLY when isHeaderInvoice is true.

    InvoiceDetailSummary: The summary information of this invoice.
-->
<!ELEMENT InvoiceDetailRequest
    (InvoiceDetailRequestHeader,
     (InvoiceDetailOrder+ | InvoiceDetailHeaderOrder+),
     InvoiceDetailSummary)>

<!-- 
	Specifies the retail industry specific data for InvoiceDetailSummary element. 
-->
<!ELEMENT InvoiceDetailSummaryRetail (AdditionalAmounts? )>

<!-- 
	Specifies the various industries specific data for InvoiceDetailSummary element. 
-->
<!ELEMENT InvoiceDetailSummaryIndustry (InvoiceDetailSummaryRetail?)>

<!-- 
	Defines the retail industry specific data for InvoiceDetailItemReference element 
    
	EANID: Number assigned to a manufacturer's product according to the International 
		Article Numbering Association for substitution of an article. This is a world-wide 
		largest and most standardized article catalog in retail and CPG.
		DEPRECATED. Use '<IdReference domain="EAN-13">' within 'ItemID' instead.
    
	EuropeanWasteCatalogID: European Waste Catalog is a unique ID for articles listed in the EU 
		Waste Catalog (EWC). It requires special handling.
    
	Characteristic: Defines Product Characteristics like size, color, grade, and so on.
-->
<!ELEMENT InvoiceDetailItemReferenceRetail (EANID?, EuropeanWasteCatalogID?, Characteristic*)>

<!-- 
	Defines the various industries specific categories for InvoiceDetailReferenceItem element. 
-->
<!ELEMENT InvoiceDetailItemReferenceIndustry (InvoiceDetailItemReferenceRetail?)>

<!-- 
	Defines the retail industry specific data for InvoiceDetailItem element.

	AdditionalPrices: Retail industry specific item level additional prices.
	
	TotalRetailAmount: Total retail amount at the item detail level.
	
	ItemIndicator: Product/item level indicators.
	
	PromotionDealID: An ID assigned by the supplier for a special promotional activity. 
		Promotions affect the forward planning/ordering process (and the related pricing). 
    
	PromotionVariantID: The item number is a promotional variant number. Used when only one 
		or some variants of an article are promoted         
-->
<!ELEMENT InvoiceDetailItemRetail (AdditionalPrices?, TotalRetailAmount?, ItemIndicator*, PromotionDealID?, PromotionVariantID?)>

<!-- 
	Defines the various industries specific categories for InvoiceDetailItem element. 
-->
<!ELEMENT InvoiceDetailItemIndustry (InvoiceDetailItemRetail?)>

<!--
    Defines customs reference as complementary information when the item is imported.
		
    Issuer: The information of the issuer related to the imported item.
    
	DocumentInfo: The information of the document related to the imported item.
-->
<!ELEMENT CustomsInfo ( Issuer , DocumentInfo )>

<!--
    The ReceiptLineItemReference element provides a clear 
    reference to the line item in a prior ReceiptRequest document.
-->
<!ELEMENT ReceiptLineItemReference EMPTY>
<!--
    @attr receiptLineNumber Specifies the receipt line number of the current line item, copied from ReceiptRequest. 
-->
<!ATTLIST ReceiptLineItemReference
    receiptLineNumber      %uint;                 #REQUIRED
>

<!--
    Defines information related to an receipt

    The various content options of InvoiceDetailReceiptInfo are in order
    of preference, that is, ReceiptReference is strongly recommended. If
    that is not possible ReceiptIDInfo should be used, in that order.

    ReceiptReference: The reference to the receipt being invoiced.

    ReceiptIDInfo: The buyer system receipt id of the receipt.
-->
<!ELEMENT InvoiceDetailReceiptInfo
    (ReceiptReference | ReceiptIDInfo) >

<!--
    Defines information related to a ship notice

    The various content options of ShipNoticeDetailReceiptInfo are in order
    of preference, that is, ShipNoticeReference is strongly recommended. If
    that is not possible, ShipNoticeIDInfo should be used, in that order.

    ShipNoticeReference: The reference to the ship notice being invoiced.

    ShipNoticeIDInfo: The buyer system ship notice ID of the receipt.
-->
<!ELEMENT InvoiceDetailShipNoticeInfo
    (ShipNoticeReference | ShipNoticeIDInfo) >

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

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

<!--
    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 invoice information specific to labor items.

    Contractor: The contractor whose work is being invoiced.

    JobDescription: Detailed description of the job for this labor line item.

    Supervisor: Supervisor of the contractor whose work is being invoiced.

    WorkLocation: The work location of the contractor whose work is being invoiced.

    InvoiceTimeCardDetail: Invoice details for labor reported on a time card. The pay code 
		for this invoice line item is in the UnitRate of the containing 
		InvoiceDetailServiceItem element.
-->
<!ELEMENT InvoiceLaborDetail (Contractor?, JobDescription?, Supervisor?, WorkLocation?,  InvoiceTimeCardDetail?)>

<!--
    Captures details about a timecard related (temp labor) service.

    TimeCardReference: Provides a clear reference to a prior TimeCard
        cXML document.

    TimeCardIDInfo: Unique ID for the timecard as sent on the TimeCard document during
        TimeCardInfoRequest or TimeCardRequest messages.
-->
<!ELEMENT InvoiceTimeCardDetail ((TimeCardReference | TimeCardIDInfo))>
<!--
	Provides a clear reference to a prior TimeCard document.
-->
<!ELEMENT TimeCardReference (DocumentReference)>
<!--
	@attr timeCardID Unique ID for the timecard as sent on the TimeCard document during 
		TimeCardInfoRequest or TimeCardRequest.
-->
<!ATTLIST TimeCardReference
	timeCardID %string; #IMPLIED
>

<!--
    Defines the unique ID of the timecard known to the buyer and supplier systems.
-->
<!ELEMENT TimeCardIDInfo EMPTY>
<!--
	@attr timeCardID Unique ID for the timecard as sent on the TimeCard document during 
		TimeCardInfoRequest or TimeCardRequest.
-->
<!ATTLIST TimeCardIDInfo
	timeCardID %string; #REQUIRED
>
<!--
    For cXML license agreement information, please see
    http://www.cxml.org/home/license.asp

    $Id$
-->

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

<!--
     The originating application would provide the BrowserFormPost location
     only if it wished the provider site to display a "Done" button or
     would like information (at least Status) returned at the end of the
     interactive session. Inclusion should lead to a ProviderDoneMessage
     from the provider at the end of a session.

     The originating application would provide the Followup location if it
     wished the provider to provide information about later status changes
     in the service (after the end of a particular Provider session). This
     applies only when the initial status (transmitted via a
     ProviderDoneMessage) was an interim value.
-->
<!ELEMENT ProviderSetupRequest (OriginatorCookie,
                                (BrowserFormPost, Followup?)?,
                                SelectedService, Extrinsic*)>

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

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

    $Id$
-->

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

<!ENTITY % cxml.requests "(InvoiceDetailRequest |
                           ProviderSetupRequest)">

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

<!ENTITY % cxml.responses ",(ProviderSetupResponse)?">
<!--
    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: //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 -->
