同じ章に複数のテーブル要素があります。また、複数の章があります。各テーブルに (Table : chapter# . Table#) のような名前を付けたいと思います。xmlファイルは次のようになります
<bookmap>
<chapter>
<table>This is first table of first chapter</table>
<table>This is second table of first chapter</table>
</chapter>
<chapter>
<table>This is first table of second chapter</table>
<table>This is second table of second chapter</table>
</chapter>
</bookmap>
ここでは、テーブル番号を取得するために XPATH 式が必要です。「count(preceding:chapter)+1」のような章番号を取得しています。同様に、テーブル番号の XPATH 式を取得しようとしています。これを達成するにはどうすればよいですか?