Maarten Nieber wrote:
>
> I have a question regarding xref. When I inserted xref, and pressed the
> "List of values..." button, I expected to see a list of chapters and
> sections that I can reference to. However, the list remained empty. Am I
> doing something wrong?
You need:
[1] Make sure that your document is not structurally invalid (no red
icon at the bottom/left of XXE's window).
[2] To add ID attributes to all the elements (chapters, sections, etc)
you may want to reference.
[3] Before clicking on "List of values...", make sure to select the
right IDREF attribute (e.g. "linkend" for an "xref" element).
> I also tried this with first inserting an 'anchor' in my text.
"anchor" elements are very rarely needed in DocBook because all elements
have an ID attribute and thus, may be used as an anchor.
However, if you insert an "anchor" element, do not forget to specify its
ID attribute ("id" attribute for DocBook 4, "xml:id" attribute for
DocBook 5).