|-
| valign='top' | '''Summary'''
|Returns all attribute nodes that have {{Mono|$string}} as their string value. If available, the value index is used to speed up evaluation.<br />If {{Mono|$attname}} is specified, the resulting attribute nodes are filtered by their attribute name.
|-
| valign='top' | '''Examples'''
|
* {{Mono|db:attribute("DB", "QUERY", "id")/..}} returns the parents of all {{Mono|id}} attribute nodes of the database {{Mono|DB}} that have {{Mono|QUERY}} as string value.
|}
==db:attribute-range==
{|
|-
| valign='top' width='90' | '''Signatures'''
|{{Mono|'''db:attribute-range'''($db as item(), $min as xs:string, $max as xs:string) as text()*}}<br/>{{Mono|'''db:attribute-range'''($db as item(), $min as xs:string, $max as xs:string, $attname as xs:string) as attribute()*}}
|-
| valign='top' | '''Summary'''
|Returns all attribute the string values of which that are larger than or equal to {{Mono|$min}} and smaller than or equal to {{Mono|$max}}. If available, the value index is used to speed up evaluation.
|-
| valign='top' | '''Examples'''
|
* {{Mono|db:attribute-range("DB", "id456", "id473", 'id)}} returns all {{Mono|@id}} attributes of the database {{Mono|DB}} that have a string value in between {{Mono|id456}} and {{Mono|id473}}.
|}