• Post Reply Bookmark Topic Watch Topic
  • New Topic

Primary key - Foreign Key relationship  RSS feed

Hemant Kamat
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you establish a primary key - foreign key relationship in two different XML files?
-- e.g In one XML file (Person.xml) I have a Persons tag. This tag can have any number of Person elements which have one attribute id. I need the value of this id attribute to be present in the other xml file (Directory.xml)
<Person ID=1>
<Person ID=3>

Now since Person with ID=2 is not present in person.xml, I should not be able to use this number in PersonList. I want to put a restriction. I know xsd:key and xsd:keyref works but i think - it works if both the elements are in one xml file. I want to put the data in 2 separate xml files and establish primary key- foreign key relationship. How do i do that?
Any help will be greatly appreciated.
Thanks a lot in Advance
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!