[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
re: IDs and databases (Was: determining ID-ness in XML)
Ron Bourret asks:
> Are they used in native XML databases for something at the database
> level -- that is, other than just ID attributes?
I'm not sure about the others, but Tamino generates "ino:id" attributes that
map onto its internal keys. My point was that it would be helpful to treat
these as IDs for XML purposes, e.g. doing a getElementById() call to find a
particular element in a subtree retrieved from the database.
Here's a concrete use case: I query the DB, get back a substantial list of
matching elements that the user must choose from. I use one or two values in
each element to populate a list box, with the value returned with the user
selects a specific value being the ino:id. The user selects one, now I have
to get the entire content of the selected element. I have the ino:id, so I
can easily get it from the DB, but I have to either do a brute-force search
or have built some data structure of my own to match that id up with a
specific element in the subtree I already retrieved. It would be convenient
-- not a big deal, just one less hassle -- if there was a way to tell DOM
(or XSLT, or whatever) that the ino:id attribute is an "ID" so that I can
just use getElementById() to find it.