CSS Cross Referencing

Hi All

I have the following code in my CSS:

cross_reference[ID*="ALDF_"] {
	-xpp-xref-refer: attr(ID) foot this none;
}

cross_reference[ID*="ALDF_"]::before {
	content: -xpp-macro(ri, '%refpg4');
}

footnote {
	display: block;
	-xpp-xref-mark: attr(id);
}

footnote::before {
	content: -xpp-macro(i1, '16pt') -xpp-macro(sup) -xpp-macro(ri, '%refnum') -xpp-macro(reset) "\2009";
}

And this works fine - however if I change %refpg4 to %refnum each cross reference reports the "current" footnote %refnum rather than the one the the id reference is pointing to.

Just to reassure you the footnote has an attribute id= but the cross ref has ID=.

Any suggestions very welcome!

Chris

Parents
  • Chris,

    I am not sure about this, but I would think that if you do: -xpp-xref-refer: attr(ID) foot this none; the ID will contain the full value of the attribute = ALDF_0001307 and not the id of the footnote (=001307) you want to refer to.(even if you did do an attribute selection like [ID*="ADLF_"])
    But hey I could be wrong.

    Also I think think that %refnum will always give you back the number of the current footnote.
    See macro doc: %refnum Footnote or pickup sequence number.

    So you will have to do this in another way...
    Some clever xyPerl might do the trick in which you collect the footnote ids and the number of footnotes associated with it (and maybe write it out continuously)
    And on the next compose, first you read back the hash you have written out and then you could read out the footnote number that is associated with the footnote id.
    (could work in 1 go if the reference to a footnote always happens after the referenced footnote has been composed) 

    Oh and in a similar way that you could also store the text that is associated with the ID of the cross ref elements.
    (your example is a bit confusing as the cross_reference element is referring to a different footnote but contains at the same time the text you want to output?) 

Reply
  • Chris,

    I am not sure about this, but I would think that if you do: -xpp-xref-refer: attr(ID) foot this none; the ID will contain the full value of the attribute = ALDF_0001307 and not the id of the footnote (=001307) you want to refer to.(even if you did do an attribute selection like [ID*="ADLF_"])
    But hey I could be wrong.

    Also I think think that %refnum will always give you back the number of the current footnote.
    See macro doc: %refnum Footnote or pickup sequence number.

    So you will have to do this in another way...
    Some clever xyPerl might do the trick in which you collect the footnote ids and the number of footnotes associated with it (and maybe write it out continuously)
    And on the next compose, first you read back the hash you have written out and then you could read out the footnote number that is associated with the footnote id.
    (could work in 1 go if the reference to a footnote always happens after the referenced footnote has been composed) 

    Oh and in a similar way that you could also store the text that is associated with the ID of the cross ref elements.
    (your example is a bit confusing as the cross_reference element is referring to a different footnote but contains at the same time the text you want to output?) 

Children
No Data