[Zope] XMLDocument question

Jim Harrison jhrsn@pop.pitt.edu
Thu, 02 Dec 1999 13:00:29 -0500


Martijn Faassen at m.faassen@vet.uu.nl wrote:

>> What's the strategy behind the id notation approach to access? It's pretty
>> unwieldy given that you must view the document's display in the management
>> interface to see what ids are there, and ids change when the document is
>> edited. Is there a way to use the tag names in a url to target particular
>> parts of the document?
> 
> Hm, XMLWidgets may not do what you want exactly but it does allow a way
> to target tag names (and specific tags). Look it up at:

Thanks for the tip--I haven't had a chance yet to look at the examples, but
I'll try to review it over the weekend. The release notes suggest that
XMLWidgets may address some of my issues.

After a little thought, the answer to my simplistic question above is that
XML documents may (often) have repeating elements at a given level of the
hierarchy. When that is the case, a url using element names will not be able
to target a unique location in the document. Duh.

It would still be interesting to consider using node ids that are a bit more
informative than the current ones. Say, the tag name concatenated with the
numerical position of the tag in the sequence of similar tags at that level.

Jim
________________________________________________________________________
James H. Harrison, Jr., MD, PhD
University of Pittsburgh Health System
C920 PUH, 200 Lothrop Street
Pittsburgh, PA 15213

jhrsn@pop.pitt.edu | voice: 412-647-5529 | fax: 412-647-9588

"If you want sense, you'll have to make it yourself!!"-Norton Juster
________________________________________________________________________