You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Josema Alonso <jo...@josema.net> on 2002/09/29 00:47:49 UTC

cross referenced xml documents question

Hi, all.
Beware, newbie posting...

I've just started using XIndice and I'm still learning the basics but, I
would like to ask you a more general question.

How to make IDREFS to other documents?
Let's see an example.

Let's say I have a usual schema for Books and a usual schema for Authors.
And I want to reutilize both. Of course, I want to make a reference from a
Book element to some Author elements. I thought about making different
attempts:
- I could try using IDREFS from the Book document to the Author documents,
but XML Schema expects to find the referenced ID in the document and it's
not there.
- I could include the Author Schema into the Book schema. But that will
force to make the Author document data available when making the Book data
available. It doesn't sound too bad too. It makes sense.
- I could try using XLink, so the reference would be a link to the Author
documents. But that wouldn't enforce any identity restrictions.
- I could try XIndice Collections but I think it would be similar to the
preceding one.

What are you doing? I'm sure many of you have found the same problem. After
all is just something very very similar to modeling a one to many
relationship (well, a many to many in this case) in a relational database,
and the IDs are just like the primary key and external key for each
document.

I've tried some of the discussed above, I've red tons of articles about it,
and still haven't found a right way. Hope you could point me in the right
direction.

Thanks for reading :-)