M
Mike Dickens
hi,
i have a query regarding numbering one set of elements as filtered by another set.
eg if i have
<?xml version="1.0" encoding="ISO-8859-1"?>
<a>
<b i="1" j="aaaa"/>
<b i="2" j="bbbb"/>
<b i="3" j="aaaa"/>
<c i="1" j="xxxx"/>
<c i="2" j="yyyy"/>
<c i="3" j="zzzz"/>
</a>
and i want a numbered c/@j with the same @i as a, where a/@j = "aaaa", ie i get
<x>
<y i="1" j="xxxx"/>
<y i="2" j="zzzz"/>
</x>
(note the @i sequence is 1,2 not 1,3)
what would the xslt look like to do this?
thanks,
mike.
i have a query regarding numbering one set of elements as filtered by another set.
eg if i have
<?xml version="1.0" encoding="ISO-8859-1"?>
<a>
<b i="1" j="aaaa"/>
<b i="2" j="bbbb"/>
<b i="3" j="aaaa"/>
<c i="1" j="xxxx"/>
<c i="2" j="yyyy"/>
<c i="3" j="zzzz"/>
</a>
and i want a numbered c/@j with the same @i as a, where a/@j = "aaaa", ie i get
<x>
<y i="1" j="xxxx"/>
<y i="2" j="zzzz"/>
</x>
(note the @i sequence is 1,2 not 1,3)
what would the xslt look like to do this?
thanks,
mike.