2015-05-11 43 views
0

有什么办法可以引用DITA的外部文档吗?
根据一些准则,它应该很容易通过(within <map>) <keydef> keys=keyID(within <task>) <link>keyref=keyID, 但验证者根本不接受它。引用DITA地图的外部链接

我打算引用XLSX表:如果您展现keydef是在地图那么它看起来是正确的

<title>SpringerMaterials Content Enrichment - Annotation Guide - V01.00</title> 
<keydef keys="protocolFile" href="examples/VIII6A3_CV_prototype.xlsx" format="xlsx" scope="external"/> 

回答

0

在一个主题中,您可以使用指向关键:

<p>See <xref keyref="protocolFile">Sample Protocol Data</xref>... 

什么验证消息你好吗?

+0

不幸验证说: XML分析器报告了以下错误:: .ditamap第42行:元素类型“map”的内容必须匹配“(title ?, topicmeta ?,(anchor | data-about | )。 因此似乎不被允许在地图内,这让我感到惊讶。 亲切的问候 – Martin

0

看来你的地图无效。希望这个例子可以帮助你。

myMap.ditamap

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> 
<map> 
<title>Title of Your Map</title> 

    <!-- Reference to the Topic --> 
    <topicref keys="myTopic"/> 

    <!-- Your Keymap --> 
    <mapref href="myKeymap.ditamap" format="ditamap"/> 
</map> 

myKeymap.ditamap

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd"> 
<map> 
<title>My Keymap</title> 

    <keydef keys="myTopic" href="myTopic.dita"/> 
    <keydef keys="myFile" href="myFile.xlsx" navtitle="myFile" scope="external" format="xlsx"/> 
</map> 

myTopic.dita

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd"> 
<topic id="myTopic"> 
    <title>myTopic</title> 
    <body> 
    <p>This is a link to myFile.xlsx: <xref keyref="myFile"/>.</p> 
    </body> 
</topic>