Page 1 of 1
DITA map targets
Posted: Mon Dec 13, 2010 1:22 pm
by EJB
I've been trying to follow the Help instructions on how to create a DITA map for a large single file DITA publication. The source XML file is the entire book wrapped in a <dita> element and subdivided into child <topic> elements; it is valid against the DITA schema in Oxygen.
I would like to create a map referencing certain <topic> elements in the XML file in order to recreate the book's original hierarchy.
According to
this topic in the help, when I go to Insert a reference into my DITA map, I should see something in the Target drop-down after selecting my XML file. But the drop-down list is blank so I'm not sure how to insert references into the map.
Can someone point me in the right direction to troubleshoot this?
Thanks!
Re: DITA map targets
Posted: Mon Dec 13, 2010 2:00 pm
by Radu
Hi,
What Oxygen version are you using?
When inserting a Topic Reference and selecting a target in the
Insert Reference dialog the
Target combo should contain all topic IDs specified in the target file.
Does your DITA composite have a valid DTD association specified on it like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dita PUBLIC "-//OASIS//DTD DITA Composite//EN" "http://docs.oasis-open.org/dita/v1.1/OS/dtd/ditabase.dtd">
<dita>
.....
</dita>
If Oxygen recognizes an XML file as DITA (looking at the root element name) it has some default DTDs it uses for validation and content completion (if the XML file does not specify any).
But XML files without DTDs specified on them are not valid DITA files and this is possibly why the reference does not find valid targets in the file.
Regarding your use case:
You will probably have to split the DITA composite into individual topic files on disk at some stage (probably using XSLT). It is painful as it involves a lot of broken links but Oxygen 12 contains a powerful DITA Map
Validate and check for completeness action which should find the problems.
Regards,
Radu
Re: DITA map targets
Posted: Tue Dec 14, 2010 6:04 pm
by EJB
Thank you very much - it was indeed the missing DTD that was causing this problem! We're trying to get away from using DTDs in general, so I'd only generated a schema reference in the file, but I'll make sure it has a DOCTYPE declaration from now on.
Re: DITA map targets
Posted: Tue Dec 14, 2010 6:32 pm
by Radu
Hi,
I gave you a sample of specifying the DTD as it is the most used schema for DITA.
It's also perfectly OK to specify an associated XML Schema like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<dita xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:oasis:names:tc:dita:xsd:ditabase.xsd">
.....................
</dita>
But we also had a limitation in Oxygen 11.2 or older which involved not being able to properly detect the topic IDs from a DITA files which specified an XML Schema reference (and no DTD).
This bug was fixed in Oxygen 12.0 so it is also possible that your Composite was well specified from the beginning but you encountered this Oxygen 11.2 bug.
Regards,
Radu