Jan Bares wrote:
> when I use <xref> in DocBook document, it should be enough to fill in the
> required linkend attribute to see the linked text (for <section> and it's
> <title>). It works fine for generated documents (HTML, WML), but XXE itself
> displays only the name of id instead of the text (for instance title of
> <section> when the id is on the <section>). I have to either add the
> xreflabel and duplicate the title text or created another id on <title> and
> use endterm attribute.
>
> Is this CSS limitation?
>
> Here is the code used to render xref in XXE (2.9p1):
>
> xref {
> content: icon(left-link)
> xpath("if(id(@linkend)/@xreflabel, id(@linkend)/@xreflabel, @linkend)");
> ...
> }
>
> xref[endterm] {
> content: icon(left-link) xpath("if(id(@endterm), id(@endterm), @endterm)");
> }
No, this is not a ``CSS limitation''. XXE behaves exactly as specified
in the 2 above rules (which are far from being standard CSS).
These 2 rules come from our understanding of
http://www.docbook.org/tdg/en/html/xref.html
-----------------------------------------------------------------------
Processing expectations
Under ordinary circumstances, the xref points to the some element with
its linkend attribute and the processing system generates appropriate
cross reference text. There are three ways for the author to influence
the generated text:
1. If the endterm attribute is specified on xref, the content of the
element pointed to by endterm will be used as the text of the
cross-reference.
2. Otherwise, if the object pointed to has a specified XRefLabel,
the content of that attribute will be used as the cross-reference text.
3. Finally, the author may specify a keyword (or other information)
in the xrefstyle attribute. Unlike endterm and xreflabel which have
rigid semantics, the content of the xrefstyle attribute is simply
additional information for the processing system. What effect it has, if
any, is dependent on the processing system.
-----------------------------------------------------------------------
If you or any other XXE user find better CSS rules (more expressive than
the 2 above rules, but still simple and efficient), do not hesitate to
suggest them. In such case, we'll add them to our DocBook CSS style sheet.