Forum Bugs

href="#xyz" not working with name attribute

Ralle
I'm trying to parse some wikipedia articles into a pdf.
The wiki generated TOC is just great, and i'd like to use this:

#toc a[href]::after {
content: leader('.') target-counter(attr(href), page);
font-style: normal;
}

To display the page numbers. Problem is it doesn't work. It evaluates target-counter(attr(href), page) to 1 for whatever link it is.
I did some testing and found out prince does just fine if the href="#xyz" is paired with an id="xyz" but it fails when name="xyz" which is how wikipedia is built.
I don't know if it's a bug, a known limit or maybe a feature. In either case some ideas on how to achive my goal would be greatly appreciated :)

Maybe a hack for prince? or some way cool css'ing?
mikeday
It should be possible to link to <a name="foo"></a> anchors in most situations, however the name attribute will not work on other elements (eg. on <h1> or <div>) while the id attribute will. Do you have a situation in which <a id=""> works but <a name=""> doesn't?