Search code examples
ditadita-ot

How to import this dita 1.3 xml?


Could somebody help poor developer with upgrading to Dita 1.3 :)

I need to make dita-ot work with newer version of xml's I was given (example below). I need to adjust something in the library but I don't have any clue where to start. I've replaced the problematic bit just for example - //FOOBAR/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//FOOBAR//DTD DITA Concept//EN" "file:///D:/InfoShare/Web/Author/ASP/DocTypes/dita-sdl/1.3/dtd/technicalContent/dtd/sdlConcept.dtd">
<?ish ishref="GUID-874B737D-F63A-48C3-887A-571C38D5ED5A" version="1" lang="en-us"?>
<concept xml:lang="en-us" id="xs_help_me_contextually_please" rev="for Desktop" product="Foobar product">
   <title id="GUID-F92ED443-BE97-44C7-AB36-726B2A76ECF9">New DITA declaration topic without any new elements</title>
   <shortdesc id="GUID-8D7A677D-6782-4A65-96B4-F7F4B3CB5CCD">
      <ph>Short description of the topic.</ph>
   </shortdesc>
   <prolog>
      <metadata>
         <category>
            Content area
            <keyword>Templates</keyword>
         </category>
         <keywords>
            <indexterm id="GUID-32379B47-E4F9-4E00-A8A7-383584241D88">indexterm</indexterm>
         </keywords>
      </metadata>
   </prolog>
   <conbody>
      <p id="GUID-A2466389-DC06-4052-A0EE-8684F3C3D7D3">
         <ph>Text here.</ph>
      </p>
   </conbody>
</concept>

If I change FOOBAR TO OASIS, then it seems to work - at least it does not give any error. The command that I'm running is:

dita -i=/app/dita/in/foobar.ditamap -f=xhtml -o=/app/dita/out

The error it gives:

[gen-list] [DOTJ079E][ERROR] File 'file:/app/dita/in/xs_help_me_contextually_please.xml' could not be loaded. Ensure that grammar files for this document type are referenced and installed properly. Cannot load file: /D:/InfoShare/Web/Author/ASP/DocTypes/dita-sdl/1.3/dtd/technicalContent/dtd/sdlConcept.dtd (No such file or directory)
[move-meta] I/O error reported by XML parser processing file:/tmp/temp20191106165059386/in/xs_help_me_contextually_please.xml: /tmp/temp20191106165059386/in/xs_help_me_contextually_please.xml (No such file or directory)
[move-meta] file:/app/dita/in/foobar.ditamap:3:327: [DOTX026W][WARN]: Unable to retrieve linktext from target: 'xs_help_me_contextually_please.xml'. Using navigation title as fallback. 

Also I should add the technicalContent/dtd/sdlConcept.dtd (that I was also given) somewhere in the library but not sure where. Tried to put it in plugins/org.oasis-open.dita.v1_3 and thought it works but when removing the file and having //OAOSIS/ in the source xml, then it didn't give out any error either.

How can it all work if the path is file:///D:/InfoShare/Web/Author/ASP/Doc... that does not exist in the system where the import happens (Docker container). Is it just informational?

Very confused of all of this.

Thank you in advance!


Solution

  • It's hard to help you given what you have provided, but I can add some clarifying information:

    1. You are working with DITA source that either is (or has been stored) in the SDL CCMS. Depending on the age of the SDL product it has different names: Trisoft, SDL Live Content, SDL Tridion Docs.
    2. DITA 1.3 is backwards compatible with all previous versions of DITA, so you should not have to adjust any DITA source files. But -- if the DITA source uses different DTDs -- as any content stored in the SDL product does, you'll need those DTDs, as they are different than the OASIS DTDs that ship with DITA-OT.

    Hope this helps a little; you also might have better luck posting on the dita-users list at Yahoo!

    Best, Kris