I am finding it still somewhat difficult to understand what you mean but here goes:
You have a 50 record set which you need to output into a page with a combo box in the top for navigation and regular anchors along the way.
I assume that the outputting of hte records is also part of the dynamism of the page so it would look something like this:
//acquire record set
<record_outputter_tag numrecs="5">
</record_outputter_tag>
in order to make the tag more flexible -
you should provide a number of records variable (with perhaps a default value). In this example, you wouldnt need an anchor tag since the anchors would be automatically generated by the tag:
output combobox and generate n/numrecs links where n is the number of records and numrecs is the number of records between anchors
output record 1
output record 2
output record 3
output record 4
output record 5
anchor1
output record 6
output record 7
output record 8
output record 9
output record 10
anchor2
etc etc
I cant see how you could provide hard coded links unless you are controlling atomically the output of the records - in this case, you dont exactly need to write a special tag to output anchors?
Let me see - what alternatives might you want? I can imagine a scenario where you want to control the output of the records - in this case you could provide additional anchors to the combo box by nesting special anchor tags which add themselves to the list of links:
e.g.
<combo_generator>
<output_record no="1"/>
<anchor name="name1"/>
<output_record no="2"/>
<output_record no="3"/>
<output_record no="4"/>
<anchor name="name2"/>
<output_record no="5"/>
<output_record no="6"/>
<output_record no="7"/>
</combo_generator>
Combo generator has a collection which holds the links that should go in the combo box. Each anchor tag adds its name as a link (value #name2 for example) to the collection by calling getParent to get the combo generator and then casting the result to add itself to the collection of links. Each of the tags then also outputs its anchor into the generators output writer.
the combo generator in this case would be responsible for picking up the links only. When the end of the combo generator is reached, it outputs a combo box followed by the records and anchors output by the nested tags.
Finally, hard coded anchors could be added through nested tags too - if you want to be able to pick up HTML anchors in the page automatically, you can either parse the contents of the page for the character sequence that matches a link - or you could require explicit adding of the links by using an <add_anchor name="somename"/> nested tag - such as
<combo_generator>
<add_anchor name="somename" position="4"/>
<add_anchor name="somename2" position="7"/>
<output_record no="1"/>
<anchor name="name1"/>
<output_record no="2"/>
<output_record no="3"/>
<output_record no="4"/>
<anchor name="name2"/>
<output_record no="5"/>
<output_record no="6"/>
<output_record no="7"/>
</combo_generator>
IN the example above I am assuming that somewhere in the page or perhaps within the tag, there is a n anchor that is called somename (and another one called somename2) that need to be added to the combo box. The extra thing I've done is to allow the web developer to specify where in the combo's list of links the link should turn up. This assumes a very good understanding of what is going to end up on the page though.
If none of this is helpful that feel free to write back