Hi Hussein, Thanks a lot for your help. I modified the xhtmlUtil.xls as you suggested and now it works fine.
Best regards Martin Schild -----Ursprüngliche Nachricht----- Von: Hussein Shafie [mailto:[email protected]] Gesendet: Freitag, 13. Januar 2017 18:01 An: Schild Martin <[email protected]> Cc: '[email protected]' <[email protected]>; [email protected] Betreff: Re: [XXE] DITA to WebHelp - Link to external file On 01/13/2017 04:23 PM, Schild Martin wrote: > > > In my DITA-file, I have a xref-element, which is linking to an > external file. > > The value of the href-attribute: Beispiele/DEMO-STRINGSPLIT.FF > > The value of the type-element: text/plain Unlike what happens in HTML, the type attribute of an xref element does not specify the MIME type of the link target. Something like type="text/plain" is thus simply ignored. See http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/langRef/attributes/thetypeattribute.html Instead please specify attribute format="txt". See http://docs.oasis-open.org/dita/dita/v1.3/errata01/os/complete/part2-tech-content/langRef/attributes/theformatattribute.html > > > > In the generated WebHelp-file (html) the link looks like this: <a > class="xref" href="Beispiele/DEMO-STRINGSPLIT.FF" > target="_blank">Direktlink auf F-Script</a> > > This link works, but on some machines I got an error (not found) because > the type is missing. > > > > I think, the link should look like this: <a class="xref" > href="Beispiele/DEMO-STRINGSPLIT.FF" type="text/plain" > target="_blank">Direktlink auf F-Script</a> > > If I edit the generated html-file in this way, the link works on all > machines. But I think, this is not a practicable solution ;-) > > > > Which attributes have I to set, to got a link with the type="text/plain"? > For now, <xref format="txt"> is not converted to <a type="text/plain">. This is probably a bug that we'll fix in the next release of XMLmind DITA Converter. If you want to fix this bug yourself, please modify <xsl:template name="scopeAttribute"> found in: <XXE_install_dir>/addon/config/dita/xsl/xhtml/xhtmlUtil.xsl Replacing stock template: --- <xsl:template name="scopeAttribute"> <!-- No need to lookup for @scope: the preprocessor has cascaded this attribute in the related-links section. --> <xsl:if test="@scope eq 'external' and $xhtmlVersion ne '1.1'"> <xsl:attribute name="target">_blank</xsl:attribute> </xsl:if> </xsl:template> --- by: --- <xsl:template name="scopeAttribute"> <!-- No need to lookup for @scope: the preprocessor has cascaded this attribute in the related-links section. --> <xsl:if test="@scope eq 'external' and $xhtmlVersion ne '1.1'"> <xsl:attribute name="target">_blank</xsl:attribute> </xsl:if> <xsl:if test="@format eq 'txt'"> <xsl:attribute name="type">text/plain</xsl:attribute> </xsl:if> </xsl:template> --- should be considered as being a quick and dirty fix. I've not tested this change but it should work OK. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

