Friday, March 23, 2012

Help! Problem with XSD mapping schema

Hello,
I have a simple mapping schema and XML document for import into MSSQL. The tables will be created on import by the bulkloader.
Im getting the cryptic error message: "Schema: invalid value for 'column' on 'bl_advertiser_listing'." when I start the import. I cant figure out why this is and I have reduced the job down to a very simple state. What 'column' is this error referring to and why? Thankyou.

The XML

<listings>
<advertiser id="470000016">
<listing>
<ibl-id>3406095</ibl-id>
</listing>
</advertiser>
</listings>

The Schema:

<xsTongue Tiedchema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlnsTongue Tiedql="urnTongue Tiedchemas-microsoft-com:mapping-schema">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="advertiser_listings" parent="bl_advertiser" parent-key="id" child="bl_advertiser_listing" child-key="id"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="listings" sql:is-constant="1">
<xs:complexType>
<xsTongue Tiedequence>
<xs:element name="advertiser" minOccurs="0" maxOccurs="unbounded" sql:relation="bl_advertiser" sql:key-fields="id">
<xs:complexType>
<xsTongue Tiedequence>
<xs:element name="listing" minOccurs="0" maxOccurs="unbounded" sql:relation="bl_advertiser_listing" sql:relationship="advertiser_listings">
<xs:complexType>
<xsTongue Tiedequence>
<xs:element name="ibl-id" type="xs:integer"/>
</xsTongue Tiedequence>
</xs:complexType>
</xs:element>
</xsTongue Tiedequence>
<xs:attribute name="id" type="xs:integer"/>
</xs:complexType>
</xs:element>
</xsTongue Tiedequence>
</xs:complexType>
</xs:element>
</xsTongue Tiedchema>

Moving thread...

|||I worked this out, it was quite simple! <xs:element name="ibl-id" type="xs:integer"/> is invalid since the dash - is not allowed in column names.

No comments:

Post a Comment