Приветствую всех. Проблема следующая
Есть xml документ, который надо положить в базу:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
<?xml version="1.0" encoding="UTF-8"?>
<env:ContentEnvelope xmlns="http://data.schemas.financial.thomsonreuters.com/metadata/2009-09-01/"
xmlns:env="http://data.schemas.tfn.thomson.com/Envelope/2008-05-01/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://data.schemas.financial.thomsonreuters.com/metadata/2009-09-01/
http://portal.emea.ime.reuters.com/sites/Content_Marketplace_Implementation/Metadata/Shared%20Documents/Schemas/CommodityDataItem.xsd"
pubStyle="FullRebuild" majVers="1" minVers="0.0">
<env:Header>
<env:Info>
<env:Id>33f49efd-4f7a-4e60-a00f-480edb298e4b</env:Id>
<env:TimeStamp> 2010 - 09 -14T00: 00 : 39 . 156 </env:TimeStamp>
</env:Info>
</env:Header>
<env:Body contentSet="MetadataSystems" majVers="1" minVers="0.0">
<env:ContentItem action="Insert">
<env:Data xsi:type="CommodityItem">
<Commodity activeFrom="1900-01-01T00:00:00">
<CommodityId> 300007 </CommodityId>
<CommodityUniqueName>Acid Oils</CommodityUniqueName>
<CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404502" language="505074" commodityNameMetadataViewId="404300" commodityNameSequence="1">Acidic oils- an agricultural commodity</CommodityName>
<CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404500" language="505074" commodityNameMetadataViewId="404300" commodityNameSequence="1">Acid Oils</CommodityName>
</Commodity>
</env:Data>
</env:ContentItem>
<env:ContentItem action="Insert">
<env:Data xsi:type="CommodityItem">
<Commodity activeFrom="1900-01-01T00:00:00">
<CommodityId> 300008 </CommodityId>
<CommodityUniqueName>Acrylonitrile</CommodityUniqueName>
<CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404500" language="505074" commodityNameMetadataViewId="404300" commodityNameSequence="1">Acrylonitrile</CommodityName>
<CommodityName effectiveFrom="1900-01-01T00:00:00" commodityNameType="404502" language="505074" commodityNameMetadataViewId="404300" commodityNameSequence="1">Pungent-smelling colorless liquid (chemical formula CH2CHCN) often appears yellow due to impurities. It is an important monomer for the manufacture of useful plastics.</CommodityName>
</Commodity>
</env:Data>
</env:ContentItem>
</env:Body>
</env:ContentEnvelope >
Если без namespace, то хорошо работает следующая xsd:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xsd:annotation>
<xsd:appinfo>
<sql:relationship name="Com"
parent="Commodity"
parent-key="CommodityId"
child="CommodityName"
child-key="CommodityId"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:element name="ContentEnvelope" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Body" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ContentItem" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Data" sql:is-constant="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Commodity" sql:relation="Commodity"
sql:key-fields="CommodityId">
<xsd:complexType>
<xsd:sequence>
<xsd:element name = "CommodityId"
type = "xsd:long"/>
<xsd:element name = "CommodityUniqueName"
type = "xsd:string"/>
<xsd:element name = "CommodityName"
sql:relation="CommodityName"
sql:relationship="Com">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:long">
<xsd:attribute name="effectiveFrom"
sql:field ="EffectiveFrom"
type="xsd:dateTime"
sql:datatype="dateTime"/>
<xsd:attribute name="effectiveTo"
sql:field ="EffectiveTo"
type="xsd:dateTime"
sql:datatype="dateTime" />
<xsd:attribute name="commodityNameType"
type="xsd:long" />
<xsd:attribute name="language"
type="xsd:long" />
<xsd:attribute name="commodityNameMetadataViewId"
type="xsd:long" />
<xsd:attribute name="commodityNameSequence"
type="xsd:long" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="activeFrom"
sql:field ="ActiveFrom" type="xsd:dateTime" sql:datatype="dateTime"/>
<xsd:attribute name="activeTo"
sql:field ="ActiveTo" type="xsd:dateTime" sql:datatype="dateTime"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Подскажите пожалуйста, как правильно все xmlns?