Subject: Syntax Definition for Voucher
From: Ko Fujimura <[email-masked]>
To: [email-masked]
Date: Mon, 30 Apr 2001 12:18:32 +0900

Hi,

Attached are the updated version of a voucher sample and syntax
definition described in XML Schema.

I'm going to incorporate them into the XML Voucher -01 document and
submit it in a couple of weeks. Any comments are welcome.
Sorry for the delay of the submission.

Thanks,

Ko
   <?xml version="1.0"?>
   <schema
    targetNamespace="http://www.ietf.org/rfc/rfcXXXX"
    xmlns:gvl="http://www.ietf.org/rfc/rfcXXXX"
    xmlns="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">

    <complexType name="RoleType">
     <sequence>
      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
     </sequence>
     <attribute name="name" type="string" use="required"/>
    </complexType>

    <element name="Voucher">
     <complexType>
      <sequence>
       <element name="Provider" type="gvl:RoleType"/>
       <element name="Issuer" type="gvl:RoleType" minOccurs="0"/>
       <element ref="gvl:Promise"/>
       <element name="Holder" type="gvl:RoleType" minOccurs="0"/>
      </sequence>
     </complexType>
    </element>

    <element name="Promise">
     <complexType>
      <sequence>

       <element name="Title" type="string" minOccurs="0"/>

       <element name="Description" type="string" minOccurs="0"/>

       <element name="ValidPeriod" minOccurs="0">
        <complexType>
         <attribute name="start" type="dateTime"/>
         <attribute name="end" type="dateTime"/>
        </complexType>
       </element>

       <element name="Redemption" minOccurs="0">
        <complexType>
         <attribute name="spend" type="nonNegativeInteger"
                    default="0"/>
        </complexType>
       </element>
       
       <element name="Value">
        <complexType>
         <sequence>
          <choice>
           <element name="Ratio" minOccurs="0">
            <complexType>
             <attribute name="percentage" use="required">
              <simpleType>
               <restriction base="positiveInteger">
                <maxInclusive value="100"/>
               </restriction>
              </simpleType>
             </attribute>
            </complexType>
           </element>
           <element name="Fixed" minOccurs="0">
            <complexType>
             <attribute name="currency" type="string" 
                        use="required"/>
             <attribute name="amount" type="nonNegativeInteger"
                        use="required"/>
             <attribute name="decimalPower" type="Integer" 
                        default="0"/>
            </complexType>
           </element>
          </choice>
         </sequence>
         <attribute name="type">
          <simpleType>
           <restriction base="string">
            <enumeration value="exchange"/>
            <enumeration value="discount"/>
            <enumeration value="monetary"/>
           </restriction>
          </simpleType>
         </attribute>
        </complexType>
       </element>

       <element name="Merchandise" minOccurs="0">
        <complexType>
         <sequence>
          <any namespace="##any" minOccurs="0" 
               maxOccurs="unbounded"/>
         </sequence>
        </complexType>
       </element>

       <element name="Conditions" type="string" minOccurs="0"/>

      </sequence> 
     </complexType>
    </element>

   </schema>

   <?xml version="1.0"?>
   <Voucher xmlns="http://www.ietf.org/rfc/rfcXXXX"
            xmlns:vts="http://www.example.com/vts">
            
    <Provider name="Voucher Wallet 2001">
      <vts:KeyInfo>AbCdEfG</vts:KeyInfo>
    </Provider>

    <Issuer name="Alice Book Center, Ltd.">
      <vts:KeyInfo>aBcDeFg</vts:KeyInfo>
    </Issuer>

    <Promise>
      <Title>IOTP Book Coupon</Title>
      <Description>$5 off IOTP Book</Description>
      <ValidPeriod start="2001-04-01" end="2002-03-31"/>
      <Redemption spend="1"/>
      <Value type="discount">
        <Ratio percentage="20"/>
      </Value>
      <Merchandise>
        <BookID xmlns="http://www.example.com/book"
          ISBN="0071355014"/>
      </Merchandise>
      <Conditions>It can be claimed at only Alice Book Center.</Conditions>
    </Promise>

   </Voucher>