Validating topic via MSXML4 using DITA 1.3 DTD
Posted: Mon Oct 10, 2016 3:29 pm
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]
[Error message]
The reported message is very vague. So I used following .vbs file and invoked from Windows 10 command prompt (32bit).
The result is as follows:
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/
--------------------------------------------------*/
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>
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
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
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
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/
--------------------------------------------------*/