Dita validate

90 views
Skip to first unread message

Sambasiva Rao

unread,
Jun 26, 2019, 3:35:39 AM6/26/19
to DITA-OT Users

Hi,


I am trying to validate the dita files using ant validate command. Some how, the validation got failed. Below are the details with error messages.


Could you guide any clue to fix the validation errors.


Thanks in advance,

Samba.


C:\dita-ot-2.4.6\Fusion2Dita>ant validate -Dargs.input.dir="C:\dita-ot-2.4.6\Fusion2Dita\Ditas_Output" -Dlogfile="C:\dita-ot-2.4.6\Fusion2Dita\logs\validation.log"
Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre1.8.0_211\lib\tools.jar
Buildfile: C:\dita-ot-2.4.6\Fusion2Dita\build.xml

validate:
     [echo] Validating all xmls in directory "C:\dita-ot-2.4.6\Fusion2Dita\Ditas_Output"

BUILD FAILED
C:\dita-ot-2.4.6\Fusion2Dita\build.xml:503: Could not validate document C:\dita-ot-2.4.6\Fusion2Dita\Ditas_Output\Explained_20030741c.dita

Total time: 0 seconds

Please find the attached log file.

Caused by: java.io.FileNotFoundException: C:\dita-ot-2.4.6\Fusion2Dita\Ditas_Output\topic.dtd (The system cannot find the file specified)

I tried to copy topic.dtd from somewhere in plug-in folder structure, but it't giving different error message as below,

Caused by: java.io.FileNotFoundException: C:\dita-ot-2.4.6\base\dtd\highlightDomain.ent (The system cannot find the path specified)


Sambasiva Rao

unread,
Jun 26, 2019, 4:02:47 AM6/26/19
to DITA-OT Users
Please find the attached dita file.
Explained_20030741c.dita

Joe Williams

unread,
Jun 26, 2019, 7:52:54 AM6/26/19
to DITA-OT Users
Just looking at the example, there is a superfluous <body> element that shouldn't be there (you can only have one body per topic) and the bareSubject is not a DITA element.

Sambasiva Rao

unread,
Jun 27, 2019, 6:08:13 AM6/27/19
to DITA-OT Users
Thanks Joe!
Agree..You are right. There is body element with in a body element and bareSubject which is not a dita element.

But the error message I am getting is not related to the body element or bareSubject. It is unable to find topic.dtd file in the validation process.

Could you suggest me the process to validate a dita/dimap on Winodw? i.e where to put the dita files on local? is there any specific location to keep the dita files to be validated? Please provide the command to be executed to validate  dita files.

Thanks,
Samba.
Reply all
Reply to author
Forward
0 new messages