2015-05-11 38 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>