Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schema structure issue for SQLXML 3.0

Status
Not open for further replies.

TJac

Programmer
Sep 6, 2007
4
US

The issue is with the final xml document specifically the ordering of some elements.

Element Originator is coming before element OriginManfest.
Element BusinessAddress is coming before StateCode.
Element OutofStateWages is coming out before TotalWages.

As as result, when I send test files to state govenment I get invalid child errors because the previously mentioned elements are out of sequence.

Not being an xml person I have done due digilence in getting this far. All data and elements in the final document are correct except for the sequencing of the mentioned elements. The document is well formed.

A review and advice and direction from anyone using schemas with the xmlns:sql="urn:schemas-microsoft-com:mapping-schema" namespace would be much appreciate.

 
To very one this is the actual schema



<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd=" xmlns:sql="urn:schemas-microsoft-com:mapping-schema"
elementFormDefault = "qualified"
>

<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="EmployeeEmployee"
parent="MRF_FLSuta_Emp" parent-key="SSN"
child="MRF_FLSuta_Emp" child-key="SSN" />

<sql:relationship name="TransHdrTranHdr"
parent="MRF_FLSuta_TranmissionData" parent-key="YrQtr"
child="MRF_FLSuta_TranmissionData" child-key="YrQtr" />

<sql:relationship name="TransHdrEmployee"
parent="MRF_FLSuta_TranmissionData" parent-key="YrQtr"
child="MRF_FLSuta_Emp" child-key="YrQtr" />

</xsd:appinfo>
</xsd:annotation>



<xsd:element name= "Transmissiontemp" sql:is-constant = "true" >
<xsd:complexType>
<xsd:sequence>
<xsd:element ref = 'TransmissionHeader'/>
<xsd:element ref = 'OriginHeaders'/>
<xsd:element ref = 'ReturnData'/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>




<xsd:element name="TransmissionHeader" sql:relation="MRF_FLSuta_TranmissionData" >
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Jurisdiction" sql:field="Jurisdiction" type="xsd:string" />
<xsd:element name="TransmissionId" sql:field="TransmissionId" type="xsd:string" />
<xsd:element name="Timestamp" sql:field="Timestamp" type="xsd:dateTime" />
<xsd:element name="Transmitter" sql:relation="MRF_FLSuta_TranmissionData"
sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ETIN"
sql:field="ETIN"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ProcessType" sql:field="ProcessType" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>



<xsd:element name="OriginHeaders" sql:is-constant = "true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ReturnOriginHeader" sql:relation="MRF_FLSuta_TranmissionData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="OriginId" sql:field="OriginId" type="xsd:string" />
<xsd:element name="Timestamp" sql:field="Timestamp" type="xsd:dateTime" />


<xsd:element name="OriginManifest" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ItemReference" maxOccurs="1" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:attribute name="contentLocation" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="itemCount" type="xsd:integer" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>


<xsd:element name="Originator" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="AgentIdentifier" sql:field="AgentIdentifier" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>








<xsd:element name="ReturnData" sql:relation="MRF_FLSuta_TranmissionData" >
<xsd:complexType>
<xsd:sequence>

<xsd:element name="StateReturn" sql:is-constant = "true">
<xsd:complexType>
<xsd:sequence>

<xsd:element name="StateUI" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>


<xsd:element name="ReturnHeader" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>


<xsd:element name="Quarter" sql:field="Quarter" type="xsd:string" />
<xsd:element name="Taxyear" sql:field="TaxYear" type="xsd:string" />
<xsd:element name="SoftwareId" sql:field="SoftwareId" type="xsd:string" />
<xsd:element name="ReturnType" sql:field="ReturnType" type="xsd:string" />


<xsd:element name="FilingAction" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Action" sql:field="Action" type="xsd:string" />
<xsd:element name="Reason" sql:field="Reason" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="TIN" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TypeTIN" sql:field="TypeTIN" type="xsd:string" />
<xsd:element name="TINTypeValue" sql:field="TINTypeValue" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="StateEIN" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TypeStateEIN" sql:field="TypeStateEIN" type="xsd:string" />
<xsd:element name="StateEINValue" sql:field="StateEINValue" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="StateCode" sql:field="StateCode" type="xsd:string"/>


<xsd:element name="BusinessAddress" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="BusinessName" sql:field="BusinessName" type="xsd:string" />
<xsd:element name="AddressLine" sql:field="Address" type="xsd:string" />
<xsd:element name="City" sql:field="City" type="xsd:string" />
<xsd:element name="StateOrProvince" sql:field="State" type="xsd:string" />
<xsd:element name="ZipCode" sql:field="ZipCode" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="Contact" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ContactName" sql:relation="MRF_FLSuta_TranmissionData" sql:relationship="TransHdrTranHdr">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="FullName" sql:field="ContactName" type="xsd:string" />

</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="Phone" sql:field="Phone" type="xsd:string" />
<xsd:element name="EmailAddress" sql:field="EmailAddress" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>


</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="UITotalWages" sql:field="UITotalWages" type="xsd:decimal" />
<xsd:element name="ExcessWages" sql:field="ExcessWages" type="xsd:decimal" />
<xsd:element name="UITaxableWages" sql:field="UITaxableWages" type="xsd:decimal" />
<xsd:element name="ContributionRate" sql:field="ContributionRate" type="xsd:decimal" />
<xsd:element name="ContributionDue" sql:field="ContributionDue" type="xsd:decimal" />
<xsd:element name="UIAmountPaid" sql:field="UIAmountPaid" type="xsd:decimal" />
<xsd:element name="UIInterest" sql:field="UIInterest" type="xsd:decimal" />
<xsd:element name="UIPenalty" sql:field="UIPenalty" type="xsd:decimal" />
<xsd:element name="UITotalDue" sql:field="UITotalDue" type="xsd:decimal" />

<xsd:element name="PayRoll" sql:is-constant = "true">
<xsd:complexType>
<xsd:sequence>


<xsd:element name="Employee" sql:relation="MRF_FLSuta_Emp" sql:relationship="TransHdrEmployee">
<xsd:complexType>
<xsd:sequence>


<xsd:element name="SSN"
sql:field="SSN"
type="xsd:string" />

<xsd:element name="Employee" sql:relation="MRF_FLSuta_Emp"
sql:relationship="EmployeeEmployee">

<xsd:complexType>
<xsd:sequence>


<xsd:element name="SSN" sql:field="SSN"
type="xsd:string" sql:mapped="false"/>

<xsd:element name="FirstName" sql:field="FirstName"
type="xsd:string" />

<xsd:element name="MiddleName" sql:field="MiddleName"
type="xsd:string" />

<xsd:element name="LastName" sql:field="LastName"
type="xsd:string" />

</xsd:sequence>
</xsd:complexType>
</xsd:element>


<xsd:element name="TotalWages" sql:field="TotalWages"
type="xsd:decimal" />
<xsd:element name="TaxableWages" sql:field="TaxableWages"
type="xsd:decimal" />


<xsd:element name="OutOfStateWages" sql:relation="MRF_FLSuta_Emp"
sql:relationship="EmployeeEmployee">

<xsd:complexType>
<xsd:sequence>
<xsd:element name="TotalWages" sql:field="OutofStateTotalWages" type="xsd:decimal"/>
<xsd:element name="TaxableWages" sql:field="OutofStateTaxableWages"
type="xsd:decimal" />
<xsd:element name="TaxState" sql:field="TaxState"
type="xsd:string" />
</xsd:sequence>
</xsd:complexType>

</xsd:element>


</xsd:sequence>
</xsd:complexType>
</xsd:element>


</xsd:sequence>
</xsd:complexType>
</xsd:element>



<xsd:element name="NumberOfEmployees" sql:field="NumberOfEmployees" type="xsd:int"/>
<xsd:element name="Month1Employees" sql:field="Month1Employees" type="xsd:int" />
<xsd:element name="Month2Employees" sql:field="Month2Employees" type="xsd:int" />
<xsd:element name="Month3Employees" sql:field="Month3Employees" type="xsd:int" />




</xsd:sequence>
<xsd:attribute name="documentType" type="xsd:string" use="required">
</xsd:attribute>
<xsd:attribute name="documentId" type="xsd:string" use="required">
</xsd:attribute>
<xsd:attribute name="documentName" type="xsd:string" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>


</xsd:sequence>
</xsd:complexType>
</xsd:element>

</xsd:sequence>
<xsd:attribute name="documentCount" type="xsd:integer" use="required">
</xsd:attribute>
</xsd:complexType>
</xsd:element>

</xsd:schema>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top