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
  • I don't think I agree with Bart's conclusions.

    Chris already mentioned that the ID (and I assume id) attribute values are actually both ALDF_###### values and it was just that Chris over-simplified the XML snippet he gave. Yes, the attr(ID) and attr(id) values will be the full ALDF_###### attribute values (and not any subset being matched with the attribute selector), but as long as they match in both elements this should be fine.

    And although the description of the %refnum system variable does not explicitly mention the <rf> macro (as it does with %refpage and %refpg1 - %refpg6), if you go to the documentation for the <rf> macro it does mention in the Comments that "it stores the pickup and footnote reference numbers in %refnum". Doing -xpp-xref-refer should be the equivalent of doing an <rf>.

    I'm still not seeing why it's not working for you. If you don't have any success, you might need to open a ticket and submit a sample.

    Jonathan Dagresta
    RWS Group/
    XPP Development

  • I agree with Jonathan's comments above - the documentation specifically mentions %refnum - I will do some more playing tomorrow and report back - suffice it to say that %refpg4 is working perfectly with the above CSS and "real" data - its only when I substitute %refpg4 with %refnum that it changes behavior and only reports the "current " %refnum rather than the one that is referenced in the cross-reference macro.

    As Bart says I may need to use Perl (either on import or interactively) to sort the outputting of text - the files are very large and I am worried about the limit of 255 text registers. However I think the %refnum should work out the box as per the CSS and XyMacro documentation.

Reply
  • I agree with Jonathan's comments above - the documentation specifically mentions %refnum - I will do some more playing tomorrow and report back - suffice it to say that %refpg4 is working perfectly with the above CSS and "real" data - its only when I substitute %refpg4 with %refnum that it changes behavior and only reports the "current " %refnum rather than the one that is referenced in the cross-reference macro.

    As Bart says I may need to use Perl (either on import or interactively) to sort the outputting of text - the files are very large and I am worried about the limit of 255 text registers. However I think the %refnum should work out the box as per the CSS and XyMacro documentation.

Children