If you are using XSLT, I would recommend setting up the key:
<xsl:key name="tents" match="base/tent" use="@key" />
Then you can get the <tent> inside the <base> with a specific key using
key('tents', $id)
Then you can do
key('tents', /root/bucket/tent/@key)/@color
or, if $bucket is a private <bucket> element,
key('tents', $bucket/tent/@key)/@color
Jenit source share