<?xml encoding="UTF-8"?>

<!--

This is the schema for a complete BATCH

-->

<!ELEMENT SLACAL_BATCH (BATCH_COVER,BATCH_ITEM+)>
<!ATTLIST SLACAL_BATCH
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
BATCH_COVER is the equivalent of the Broker Batch Cover Sheet
and must occur exactly once at the beginning of the batch.
-->

<!ELEMENT BATCH_COVER (Brokerage_Name?,SLA_Broker_Number,
                       Broker_Batch_Date?,Broker_Batch_Id?,
                       Item_Summaries*,Cover_Sheet_Item_Count?,
                       Total_Item_Count?,Total_Premium?,
                       Total_Stamping_Fee?,Late_Filing_Explanation*,
                       Courtesy_Filing_For?,Broker_Batch_Notes*)>
<!ATTLIST BATCH_COVER
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
One or more BATCH_ITEM follow the BATCH_COVER. We recommend a size
of approximately 40 items per batch (and no more than twice that),
but there is no hard limit. There has to be at least one item to
make it a valid batch.
-->

<!ELEMENT BATCH_ITEM (item_type_any)>
<!ATTLIST BATCH_ITEM
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- Name of the Brokerage  -->

<!ELEMENT Brokerage_Name (#PCDATA)>
<!ATTLIST Brokerage_Name
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- The SLA Broker Number for the Broker or Brokerage -->

<!ELEMENT SLA_Broker_Number (#PCDATA)>
<!ATTLIST SLA_Broker_Number
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
Broker Batch Date and Id are optional, but recommended
fields used by the Broker to uniquely identify this batch
-->

<!ELEMENT Broker_Batch_Date (#PCDATA)>
<!ATTLIST Broker_Batch_Date
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!ELEMENT Broker_Batch_Id (#PCDATA)>
<!ATTLIST Broker_Batch_Id
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
ItemSummaries is a list of all premium-bearing items in
the batch. Non-premium endorsements should be added at the
end of the batch and do not need to be included in the
ItemSummaries nor in the count of CoverSheetItems
-->

<!ELEMENT Item_Summaries (Item_Number,Item_Type?,Policy_Number?,
                          Insured_Name?,Premium_Amount?,CA_State_Tax?,
                          Stamping_Fee,Invoice_Date?)>
<!ATTLIST Item_Summaries
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
CoverSheetItemCount is the number of items on the batch cover
sheet (listed as ItemSummaries above) and does not include
any of the non-premium endorsements that may be attached at
the end of the batch.
-->

<!ELEMENT Cover_Sheet_Item_Count (#PCDATA)>
<!ATTLIST Cover_Sheet_Item_Count
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
TotalItemCount is the number of all items included in this
batch (including non-premium endorsements not listed on the
cover sheet.
-->

<!ELEMENT Total_Item_Count (#PCDATA)>
<!ATTLIST Total_Item_Count
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- TotalPremium is the sum of all PremiumAmounts in the batch -->

<!ELEMENT Total_Premium (#PCDATA)>
<!ATTLIST Total_Premium
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- TotalStampingFee is the sum of all StampingFees in the batch -->

<!ELEMENT Total_Stamping_Fee (#PCDATA)>
<!ATTLIST Total_Stamping_Fee
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
LateFilingExplanation is an option that allows to explain
the reason why the this batch was not filed on time
-->

<!ELEMENT Late_Filing_Explanation (#PCDATA)>
<!ATTLIST Late_Filing_Explanation
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
If this batch is filed on behalf of someone else please
identify that Broker or Brokerage. See SLA Bulletin 1123
-->

<!ELEMENT Courtesy_Filing_For (#PCDATA)>
<!ATTLIST Courtesy_Filing_For
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
BrokerBatchNotes is an option that allows a Broker to
provide information to the SLA Analyst processing this batch
-->

<!ELEMENT Broker_Batch_Notes (#PCDATA)>
<!ATTLIST Broker_Batch_Notes
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
ItemNumber should be a sequential, positive
integer numbering each item in the batch.
Note: the order in which items are listed on the
batch cover sheet should match the order in which
the items appear within the batch.
-->

<!ELEMENT Item_Number (#PCDATA)>
<!ATTLIST Item_Number
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
ItemType specifies the type of the item as
N - New Policy
R - Renewal
X - Extension Endorsement
C - Cancellation
A - Audit Endorsement
E - Endorsement 
O - Offset / Adjustment
The single character abbreviation is preferred
-->

<!ELEMENT Item_Type (#PCDATA)>
<!ATTLIST Item_Type
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- PolicyNumber -->

<!ELEMENT Policy_Number (#PCDATA)>
<!ATTLIST Policy_Number
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!-- InsuredName -->

<!ELEMENT Insured_Name (#PCDATA)>
<!ATTLIST Insured_Name
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
PremiumAmount should be the sum of the CA premium
and all fees that were included in the StampingFee
calculation
-->

<!ELEMENT Premium_Amount (#PCDATA)>
<!ATTLIST Premium_Amount
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
CA State Tax is the California State Tax based on
PremiumAmount
-->

<!ELEMENT CA_State_Tax (#PCDATA)>
<!ATTLIST CA_State_Tax
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
Stamping Fee as calculated by the broker based on
the PremiumAmount and the Stamping Fee Percentage
in effect at the item effective date
-->

<!ELEMENT Stamping_Fee (#PCDATA)>
<!ATTLIST Stamping_Fee
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!--
InvoiceDate as defined by California Insurance Code
Section 1774(c). See also SLA Bulletin 1061
-->

<!ELEMENT Invoice_Date (#PCDATA)>
<!ATTLIST Invoice_Date
  xmlns CDATA #FIXED 'http://ws.slacal.org/schema/slacal_batch/2007/10/15'>

<!ENTITY % item SYSTEM "item.dtd">
%item;
