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
  • Hi Chris,

    I may not be understanding everything you're trying to do, especially without any "context" of how these elements are being used in the XML document.

    Is the footnote element being used inside the XML for an XPP footnote, or is it being used in main text? I'm assuming that the footnote element is being used inside a footnote.

    If it's being used inside an XPP footnote, do you realize that the composing of the footnote will essentially do the "xref mark" of the footnote type for you and that your doing "-xpp-xref-mark: attr(id)" in the footnote element is actually creating a cross reference for a "spot" type using the same ID as is probably being used for the footnote? Is that what you want? You may be able to just delete this -xpp-xref-mark from your CSS.

    In any case, my thought on your actual question is that the things you are doing in cross_reference[] and cross_reference[]::before are out-of-order.

    I would think that the ::before with the <ri> of %refpg4 or %refnum is being executed by composition before the main element and so you would need to move the -xpp-xref-refer in the main element to the ::before element so that the "refer" is executed by composition first before the <ri> of the %refxxx system variable is being executed.

    As far as the <ri> of %refnum in the footnote::before element, that works because composition has set the %refxxx system variables as it composes the footnote (and not because you have done the -xpp-xref-mark in the main footnote element, because if that was the case you would have the same out-of-order situation where you have the <ri> in the ::before before you have the "mark").

    Anyway, those are my initial thoughts.

    Jonathan Dagresta
    RWS Group/
    XPP Development

  • Hi Jonathan

    Thanks, I will take another look, I thought I was following the example at the foot of page 4-41 of the CSS PDF but may not be fully understanding it! I am not around tomorrow so will probably not get to this until Friday.

    The (simplified XML) is this:

        <footnote id="00013707">
          <p>Text here.</p>
        </footnote>
        <footnote id="00013708">
          <p>Text here but see footnote <cross_reference ID="00013705"/>.</p></footnote>
        <footnote id="00013709">
          <p><Text here but see footnote <cross_reference ID="00013707"/>.</p>
        </footnote>

    The footnote numbers are being generated (see original post) and the cross references should report back the footnote being referred to by its ID.

Reply
  • Hi Jonathan

    Thanks, I will take another look, I thought I was following the example at the foot of page 4-41 of the CSS PDF but may not be fully understanding it! I am not around tomorrow so will probably not get to this until Friday.

    The (simplified XML) is this:

        <footnote id="00013707">
          <p>Text here.</p>
        </footnote>
        <footnote id="00013708">
          <p>Text here but see footnote <cross_reference ID="00013705"/>.</p></footnote>
        <footnote id="00013709">
          <p><Text here but see footnote <cross_reference ID="00013707"/>.</p>
        </footnote>

    The footnote numbers are being generated (see original post) and the cross references should report back the footnote being referred to by its ID.

Children