Let's say I have an XML hierarchy that looks similar to this:
<Animal>
<Kingdom>
<Phylum>
<Class></Class>
<Class></Class>
</Phylum>
<Phylum>
<Class></Class>
<Class></Class>
</Phylum>
</Kingdom>
<Kingdom>
<Phylum>
<Class></Class>
<Class></Class>
</Phylum>
</Kingdom>
</Animal>
(etc.)
Likewise, I have ASP.NET code using nested repeaters, something like this:
<asp:Repeater ID="ShowKingdom" runat="server" DataSource="(SomeDataSource)">
<ItemTemplate>
<asp:TextBox ID="txtKingdom" runat="server" XPath="/*[local-name()='Animal']/*[local-name()='Kingdom'][{0}]">
<asp:Repeater ID="ShowPhylum" runat="server" OnItemDataBound="(SomeDataBinder)">
<ItemTemplate>
<asp:TextBox ID="txtKingdom" runat="server" XPath="/*[local-name()='Animal']/*[local-name()='Kingdom'][{0}]/*[local-name()='Phylum'][???]">
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
My problem: how do I specify the node index selector "[???]" for the XPath inside the nested repeater?!?
Note: my language is VB within ASP.NET.
Edit: I've tried using a different index "[{1}]" (gives me an index out-of-bounds error), a relative Xpath "[local-name()='Phylum']" (no "/*" preceding it -- does not recognize the node/path), and tinkering with the nested repeater data source (it either doesn't recognize the XPath or crashes).
Obviously, I haven't been able to get any of these to work. Do I need to consider another approach?
Edit #2: Another thing I tried that does not want to work: for the nested repeater:
DataSource="<%# XPathSelect('Phylum')%>"