(Q3) Find captions of figures that are referenced by <figref> elements in the chapter of "zoo.xml" with title "Frogs".

document("zoo.xml")/chapter[title = "Frogs"]
   //figref/@refid->fig/caption

XSLT equivalent to (Q3)

id(document("zoo.xml")/chapter[title = "Frogs"]//figref/@refid)[self::fig]/caption
<<<  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15    >>>