Bug 948169 - Always use xref instead of <!--INJECT -->
Summary: Always use xref instead of <!--INJECT -->
Keywords:
Status: NEW
Alias: None
Product: PressGang CCMS
Classification: Community
Component: CCMS-Core
Version: 1.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1012194
TreeView+ depends on / blocked
 
Reported: 2013-04-04 08:33 UTC by Eva Kopalova
Modified: 2023-02-21 23:20 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Eva Kopalova 2013-04-04 08:33:45 UTC
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"/>.

Comment 1 Matthew Casperson 2013-04-07 23:01:30 UTC
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.

Comment 3 Lee Newson 2013-10-01 05:01:00 UTC
Moving this back to NEW, since there is currently no planned action on this bug.

Comment 4 Ruediger Landmann 2013-10-08 01:07:32 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.