I have xml file with such structure:
...
<outer>
   ...
   <inner/>
   ...
</outer>
...
<outer>
   ...
   <inner/>
   ...
</outer>
...
Instead of "..." there exist other elements. How one could enumerate <inner/> elements using xslt? The output should be:
...
<outer>
   ...
   <inner>1</inner>
   ...
</outer>
...
<outer>
   ...
   <inner>2</inner>
   ...
</outer>
...
EDIT 1.
What if we need to count and copy only <outer copy="1">?
This doesn't work: