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 Tony Collen <tc...@hist.umn.edu> on 2002/06/11 23:05:27 UTC

[Newbie-RT] Enforcing document structure within collections

Hi all-

I haven't been able to find anything on the web or on the mailing list 
archives, so here goes:

I've been thinking about some cool uses for Xindice, and I was wondering 
how one would go about enforcing a DTD for data inserted into Xindice. 
 What if one could associate a DTD with a given collection? Xindice 
could then allow or deny documents to be inserted into the collection if 
it fails validation against that DTD.  Likewise, you could also trigger 
errors when an XUpdate query is made that would violate the DTD that is 
associated with the collection.

There are a few questions that this raises (along with ones I probably 
haven't thought of):

- Is this worth it?
- Is there a lot of overhead associated with validating a document upon 
insert/modify?
- What happens if a collection does not have an associated DTD, but a 
parent collection does?  Should that child collection enforce it's 
parent DTD if there is not one associated with it?
- What happens when a child collection has a DTD, and then it's parent 
has a different DTD associated with it?  Would the child's one "merge" 
with the parent's, or would it totally override it?

Perhaps associating a DTD with a collection, and enforcing documents to 
validate against it is not the best way of handling this idea.  What 
happens when a document internally references a DTD, and it is then 
inserted into a collection with a DTD attached to it?

So there's my RT.. I'm no expert in XML or Xindice (yet ;) ), so any 
ideas or thoughts or other mentorism are much appreciated :)


Tony