Description of problem: Would it be possible to reference a topic straight away with the xref tag? Having a non-standard text in a docbook xml is a rather strange procedure. Version-Release number of selected component (if applicable): Now, to reference a topic, you need to write: For more details see <!-- InjectTitle: 1234 -->. I would expect: For more details see <xref linkend="1234"/>.
This is something that requires further discussion. I'm not a fan of the comments, but we have also been asked to look at injecting content that doesn't have a direct mapping to XML or Docbook vocabularies. For example, injecting code from a git repo into a <programlisting>. <programlisting> has no notion of including content from an external source, so we will ether have to use comment markers again, or re-purpose existing XML elements (with something like <programlisting><xi:include href="ClassA.java" xpointer="lines 3 - 18"/></programlisting>). Neither comments or re-purposed XML elements are a neat solution. I suspect comments preserve the integrity of the source XML more than using XML elements that kind-of match what we want.
Moving this back to NEW, since there is currently no planned action on this bug.
DocBook content being migrated to PressGang from other databases or version-control systems is likely to contain xrefs, perhaps many xrefs. When these xrefs are to formal elements below the <section> level, they're preserved and function as expected; however xrefs to the section level and above all break because PressGang strips the id. The injection mechanism as currently implemented is less than optimal because the XML is no longer easily usable outside of PressGang. More significantly, because the injection mechanism relies on XML comments, automating the conversion of content that might include xrefs inside existing XML comments is difficult. xrefs certainly interfere with reusability. When PressGang validates a topic map, it should probably warn the user about the presence of xrefs in the topics it contains, and ask for what to do. Options might include: * include the target topic in the topic map as well * exclude the topic * modify the topic to exclude the xref (probably by forking it) Handling xrefs in this way makes PressGang immensely more useful and attractive to a larger variety of documentation projects.