Я выполняю эту функцию в xquery
declare function local:f(){
for $Restaurant in collection("Guide")/Restaurants/Restaurant
return
<Restaurants>
{local:f()/Nom}
{local:f()/Adresse}
{local:f()/Telephone}
</Restaurants>
};
это то, что я получаю в результате функции:
<Restaurants>
<Nom>La ferme Saint-Simon </Nom>
<Nom>La Romantique </Nom>
<Adresse>
<Num> 6 </Num>
<Rue> rue Saint Simon </Rue>
<Zip> 75007 </Zip>
<Ville> Paris </Ville>
</Adresse>
<Adresse>
<Num> 8 </Num>
<Rue> Avenue A.Piat </Rue>
<Zip> 14000 </Zip>
<Ville> Cabourg </Ville>
</Adresse>
<Telephone> 01 45 48 35 74 </Telephone>
<Telephone> 01 45 48 35 75 </Telephone>
<Telephone> 02 31 24 10 92 </Telephone>
</Restaurants>
Я хочу изменить отображение на что-то вроде этого:
<Restaurant>
<Nom>La ferme Saint-Simon </Nom>
<Adresse>
<Num> 6 </Num>
<Rue> rue Saint Simon </Rue>
<Zip> 75007 </Zip>
<Ville> Paris </Ville>
</Adresse>
<Telephone> 01 45 48 35 74 </Telephone>
</Restaurant>
<Restaurant>
<Nom>La ferme Saint-Simon </Nom>
<Adresse>
<Num> 6 </Num>
<Rue> rue Saint Simon </Rue>
<Zip> 75007 </Zip>
<Ville> Paris </Ville>
</Adresse>
<Telephone> 01 45 48 35 74 </Telephone>
</Restaurant>
любая помощь, пожалуйста, я только начал изучать xquery?