Y
Yolande
Hi,
I want to import a XML file and use the XML schema file to define the Access
database. I met a problem of how to define the relationships between tables.
I would like to use "costomerid" in Table "custom" as a foreign key in Table
"ticket" but it did not show in Table "ticket". How do I change the schema
file and/or XML file to accomplish what I want?
Any help is welcome.
Yolande
----------------------------
The XML file has the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<thqroot xmlnsd="urn:schemas-microsoft-comfficedata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ticket.xsd" generated="2004-12-13T13:44:11">
<ticket>
<objname>041201112521482</objname>
<comment>Test ticket</comment>
<title>A remote test</title>
<customer>
<customerid>"21d62206-e1b4-c044-a3cf-5d3ac96b13a0"</customerid>
<customer>Entry Software Corporation</customer>
<departmentname>Technology Division</departmentname>
<fname>Francisco</fname>
<lname>Imperio</lname>
</customer>
</ticket>
</thqroot>
and the corresponding ticket.xsd is:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlnsd="urn:schemas-microsoft-comfficedata">
<xsd:element name="thqroot">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ticket" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="generated" type="xsd:dateTime" />
</xsd:complexType>
</xsd:element>
<xsd:element name="ticket">
<xsd:annotation>
<xsd:appinfo>
<od:index index-name="PrimaryKey" index-key="objname" primary="yes"
unique="yes" clustered="no"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="objname" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element ref="customer" minOccurs="0" />
<xsd:element name="comment" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="title" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string"> <xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="customer">
<xsd:annotation>
<xsd:appinfo>
<od:index index-name="PrimaryKey" index-key="customerid" primary="yes"
unique="yes" clustered="no"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType >
<xsd:sequence>
<xsd:element name="customerid" type="xsd:string"/>
<xsd:element name="customer" type="xsd:string" />
<xsd:element name="departmentname" type="xsd:string" />
<xsd:element name="fname" type="xsd:string" />
<xsd:element name="lname" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
I want to import a XML file and use the XML schema file to define the Access
database. I met a problem of how to define the relationships between tables.
I would like to use "costomerid" in Table "custom" as a foreign key in Table
"ticket" but it did not show in Table "ticket". How do I change the schema
file and/or XML file to accomplish what I want?
Any help is welcome.
Yolande
----------------------------
The XML file has the following structure:
<?xml version="1.0" encoding="UTF-8"?>
<thqroot xmlnsd="urn:schemas-microsoft-comfficedata"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ticket.xsd" generated="2004-12-13T13:44:11">
<ticket>
<objname>041201112521482</objname>
<comment>Test ticket</comment>
<title>A remote test</title>
<customer>
<customerid>"21d62206-e1b4-c044-a3cf-5d3ac96b13a0"</customerid>
<customer>Entry Software Corporation</customer>
<departmentname>Technology Division</departmentname>
<fname>Francisco</fname>
<lname>Imperio</lname>
</customer>
</ticket>
</thqroot>
and the corresponding ticket.xsd is:
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlnsd="urn:schemas-microsoft-comfficedata">
<xsd:element name="thqroot">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ticket" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="generated" type="xsd:dateTime" />
</xsd:complexType>
</xsd:element>
<xsd:element name="ticket">
<xsd:annotation>
<xsd:appinfo>
<od:index index-name="PrimaryKey" index-key="objname" primary="yes"
unique="yes" clustered="no"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="objname" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element ref="customer" minOccurs="0" />
<xsd:element name="comment" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="title" minOccurs="0" od:jetType="text"
od:sqlSType="nvarchar">
<xsd:simpleType>
<xsd:restriction base="xsd:string"> <xsd:maxLength value="255" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="customer">
<xsd:annotation>
<xsd:appinfo>
<od:index index-name="PrimaryKey" index-key="customerid" primary="yes"
unique="yes" clustered="no"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType >
<xsd:sequence>
<xsd:element name="customerid" type="xsd:string"/>
<xsd:element name="customer" type="xsd:string" />
<xsd:element name="departmentname" type="xsd:string" />
<xsd:element name="fname" type="xsd:string" />
<xsd:element name="lname" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>