Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link not created in the XHTML output for a xref/@keyref element #1459

Closed
sorin-ristache opened this issue Feb 20, 2013 · 3 comments
Closed
Assignees
Labels
bug preprocess priority/medium Medium (or unknown) priority issue
Milestone

Comments

@sorin-ristache
Copy link

I try to insert a link by enclosing text with xref:

<xref keyref="video">video title here</xref>

The key is defined in the map as:

<keydef keys="video" href="videos/Change_Tracking.mp4" 
      format="mp4" processing-role="resource-only" navtitle="TITLE"/>

The problem is that the text "video title here" is rendered as plain text instead of link in XHTML output.

If I add the scope="external" attribute to the keydef the link is created correctly but now the video resource is not copied to the output dir anymore though I added the .mp4 extension to the resource list in file DITA-OT/lib/org.dita.dost.platform/plugin.properties.

@ghost ghost assigned jelovirt Jun 24, 2013
@jelovirt
Copy link
Member

Keyref processing skips this key because the target file doesn't exist. The code should not test if the target exists when format is not DITA.

@jelovirt
Copy link
Member

This is a bug in the processing logic. The spec says

attributes... are combined as for content references

Thus the format should be copied to the xref element. If the xref were to already have a format attribute, the attributes of referencing element (xref) will override the same attributes on the referenced element (keydef).

@jelovirt
Copy link
Member

Fixing this will change other keyref processing behaviour and may affect users who expect the old incorrect behaviour. For example, if you have

<topicref keys="blatexample" href="blatview.dita"/>

and

<xref keyref="blatexample" href="http://www.google.com" scope="external">Google</xref>

The old effective output was

<xref href="blatview.dita">Google</xref>

but after the fix the output will be

<xref href="blatview.dita" scope="external">Google</xref>

jelovirt added a commit to dita-ot/testsuite that referenced this issue Jun 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug preprocess priority/medium Medium (or unknown) priority issue
Projects
None yet
Development

No branches or pull requests

2 participants