Validating topic via MSXML4 using DITA 1.3 DTD

Post here questions and problems related to editing and publishing DITA content.
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Validating topic via MSXML4 using DITA 1.3 DTD

Post by tmakita »

Hi All,

This may be not concern editing or publishing DITA content. But it concerns DITA content validation.

I have been developing DITA 1.3 specializations by RELAX NG and now I began making DTD specializations. In my validation testing Xerces works well because it uses catalog files. However validating with MSXML4 fails with strange error.

So I back to basic testing. When I make following DITA topics and validate it with MSXML4, it reports validation error.

[test-dtd-topic.dita]

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd">
<topic id="topic_uhz_gdp_pt">
<title>Topic example</title>
<body>
<p>Paragraph with <ph>ph</ph></p>
</body>
</topic>
[Error message]

Code: Select all

System ID: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Main validation file: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Schema: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd
Engine name: MSXML4.0
Severity: info
Description: Executing: "C:\Program Files\Oxygen XML Editor 18/msValidator.exe" C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita -dtd

System ID: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\svg\svg11\svg11-flat-20110816.dtd
Main validation file: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Schema: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd
Engine name: MSXML4.0
Severity: fatal
Description: Parameter entity must be defined before it is used.
Start location: 55:2

System ID: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\svg\svg11\svg11-flat-20110816.dtd
Main validation file: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Schema: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd
Engine name: MSXML4.0
Severity: info
Description: Validation done.

System ID: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Main validation file: C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-topic.dita
Schema: C:\Program Files\Oxygen XML Editor 18\frameworks\dita\DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd
Engine name: MSXML4.0
Severity: info
Description: Process MSXML4.0 exit code = 0
The reported message is very vague. So I used following .vbs file and invoked from Windows 10 command prompt (32bit).

Code: Select all

if WScript.Arguments.Count < 1 then
MsgBox "missing XML file parameter!"
else
call parse()
end if

Sub parse()
Dim objParser
Dim objParserError

Set objParser = CreateObject("MSXML2.DOMDocument.3.0")
objParser.async = False
objParser.validateOnParse = True
objParser.resolveExternals = True
objParser.SetProperty "ProhibitDTD", False
If Not (objParser.Load(WScript.Arguments(0))) Then
Set objParserError = objParser.parseError
With objParserError
stMsg = "#### VALIDATION ERROR ###"& vbCrLf
stMsg = stMsg & "Error code: " & hex(.errorCode) & vbCrLf
stMsg = stMsg & "Reason: " & .reason & vbCrLf
stMsg = stMsg & "Line: " & .Line & vbCrLf
stMsg = stMsg & "Line position: " & .linepos & vbCrLf
stMsg = stMsg & "Source text: " & .srcText & vbCrLf
stMsg = stMsg & "URL: " & .URL & vbCrLf
End With
WScript.StdOut.Write stMsg
else
WScript.StdOut.Write "Validation succeeded!"& vbCrLf
End If
Set objParser = Nothing
end sub
The result is as follows:

Code: Select all

C:\WINDOWS\SysWOW64>cscript C:\Users\toshi\OneDrive\Documents\DITA-test\validate
4.vbs C:\Users\toshi\OneDrive\Documents\DITA-test\test-dtd-tppic.dita
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

#### VALIDATION ERROR ###
Error code: C00CE00A
Reason: Parameter entity must be defined before it is used.

Line: 55
Line position: 2
Source text: %svg-prefw-redecl.mod;]]>
URL: file:///C:/Program Files/Oxygen XML Editor 18/frameworks/dita/DITA-OT2.x/pl
ugins/org.oasis-open.dita.v1_3/dtd/technicalContent/dtd/svg/svg11/svg11-flat-201
10816.dtd
Does anyone has succeeded to validate your topic via MSXML4 using DITA 1.3 DTD? Or is this known problem?

Any information is welcome.

Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Validating topic via MSXML4 using DITA 1.3 DTD

Post by tmakita »

For your reference, this error does not changed even if I tested the following topic. This topic uses the newest DITA-OT.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"D:\DITA-OT\dita-ot-2.3.3\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\topic.dtd">
<topic id="topic_uhz_gdp_pt">
<title>Topic example</title>
<body>
<p>Paragraph with <ph>ph</ph></p>
</body>
</topic>
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Radu
Posts: 9057
Joined: Fri Jul 09, 2004 5:18 pm

Re: Validating topic via MSXML4 using DITA 1.3 DTD

Post by Radu »

Dear Toshihiko Makita,

The forum is a more static place, users mostly follow the threads that they started so if you want an opinion from the community you should write on the DITA Users List if the problem is DITA specific or on the Oxygen users list if the problem also involves Oxygen.
I looked a little bit into this and MSXML seems to be right, in the DTD svg11-flat-20110816.dtd there is a parameter entity reference %svg-prefw-redecl.mod; but the parameter entity is not defined anywhere. So it probably depends on how each XML parser handles this type of problem, probably Xerces ignores it completely.
I think Eliot Kimber is the one who added this DTD in the set of DITA OT DTDs in order to support inline SVGs.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
tmakita
Posts: 100
Joined: Fri Apr 08, 2011 7:58 am

Re: Validating topic via MSXML4 using DITA 1.3 DTD

Post by tmakita »

Hi Radu,

Thank you for your reply and investigation.
Yes, I will post this problem to dita-users as the common problem of DITA 1.3 DTD.

Regards,
--
/*--------------------------------------------------
Toshihiko Makita
Development Group. Antenna House, Inc. Ina Branch
Web site:
http://www.antenna.co.jp/
http://www.antennahouse.com/
--------------------------------------------------*/
Post Reply