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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining relationships between data in different files

Status
Not open for further replies.

fawkes

Technical User
Sep 12, 2003
343
GB
Can anyone offer some advice. I'm not after the full code but just some pointers.

I'm sure everyone has wanted to do this and I'm sure many of you already do this. I want to create relational data in xml format so I have one file with, for example, customers details and another with customers' orders.

As far as I can tell I might be able to do it with key and keyref or id and idref but I need to know some things:

1. How do I build the reference into the schema that not only identifies the key or keyref/id or idref but also identifies the related file?

2. Is it better to use key/keyref or id/idref?

3. Are there better ways of identifying relationships other than schemas.

Any help would be gratefully received.
 
I have made some progress.

I have added this to my xml file

<xs:import id="bank" schemaLocation=" file:///mySchema.xsd" />

Yet, when I try to create a dataset in visual basic .net I get the message

Custom tool error: Unable to convert input xml file content to a DataSet. The value for the 'type' attribute is invalid - 'myType:myTypeName' is an invalid value for the 'type' attribute.

The schemas are in the same folder.

myTypeName is a complex element.

Can anyone tell me what I'm doing wrong?
 
I think my main problem is namespaces which is something that I confess I don't fully understand.

What I am trying to build is an application that resides on a users pc but uses xml to hold data.

Can anyone point me in the right direction for declaring namespaces that can be referenced on a pc without access to the internet?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top