<listings>
<property rln="r317080" firm="f102" agent="a2140">
<street>2638 Maple Avenue</street>
<city>Padua</city>
<state>WI</state>
<zip>53701</zip>
<price>229000</price>
<style>2 Story Contemporary, Transitional</style>
<sqfeet>2328</sqfeet>
<bathrooms>2 1/2</bathrooms>
<bedrooms>4</bedrooms>
<garage>2 car, attached</garage>
<age>22</age>
<description>Very nice home on a one block dead end street with woods nearby.
Very special location for quiet and privacy! Home features open floor plan with
large rooms - new patio doors to pretty yard. updates: shingles, vinyl siding,
refrig and dishwasher, garage door. Fireplace in family room flanked by great
built-ins. add first floor laundry and award winning Padua schools.
</description>
</property>
<property ...>
<city>Broxton</city>
...
</property>
<property ...>
<city>Cutler</city>
...
</property>
<property ...>
<city>Argyle</city>
...
</property>
<property ...>
<city>Stratmore</city>
...
</property>
<property ...>
<city>Padua</city>
...
</property>
<property ...>
<city>Oseola</city>
...
</property>
<property ...>
<city>Fenmore</city>
...
</property>
<property ...>
<city>Cutler</city>
...
</property>
<property ...>
<city>Padua</city>
...
</property>
<property ...>
<city>Cutler</city>
...
</property>
<property ...>
<city>Oseola</city>
...
</property>
</listings>
私の教科書 (Patrick Carey による XML 第 2 版) では、「Muenchian Grouping」を使用して一意の選択を見つける例を示しています。私が理解していない部分は次のとおりです。
例の進行で、ここに到達します: " property[generate-id()=generate-id(key("cityNames", "Cutler" )[1])] " '[1]' のインデックスにより、選択の最初の 'Cutler'。上記の XML を指定すると、「Cutler」が返されます
ここで、例は次のように進みます: " property[generate-id()=generate-id(key("cityNames", city )[1])] " これは、これが最初のものだけを見つけることを示しています (したがって一意)キー内の各都市の。都市全体の独自の価値のグループを作成します。上記の XML を指定すると、"Argyle Broxton Cutler Fenmore Padua Stratmore Oseola" が返されます(倍数がないことに注意してください)。
さて、私の質問は次のとおりです。2 番目のステートメントが 1 つだけではなく、値の範囲を返すのはなぜですか?
ありがとう