[xquery-talk] Is there any point of using xml:id with an xml db?

Michael Kay mike at saxonica.com
Thu May 5 07:17:23 PDT 2011


On 05/05/2011 13:44, Andrew Welch wrote:
> Hi,
>
> Is there any benefit to using xml:id with an xml database, over a
> plain old id attribute with a range index?  (lookup performance rather
> than uniqueness checking)
>
> Out of interest, if you did use xml:id and then create a range index
> for that, which would get used?
>
>
Well, it all rather depends on the implementation, doesn't it?

Saxon automatically builds an index for ID values, but it only uses it 
to support the id() function. Should change that, really, since using 
[@xml:id='abc'] is generally more robust.

Michael Kay
Saxonica


More information about the talk mailing list