Bug 63500

Summary: xml.dcl bad for validation
Product: [Retired] Red Hat Public Beta Reporter: Alexander Kourakos <awk>
Component: sgml-commonAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: skipjack-beta2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-04-24 16:01:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Kourakos 2002-04-15 04:46:56 UTC
Description of problem:

If the /usr/share/sgml/xml.dcl file is used for validation, ie:

  nsgmls -s -v /usr/share/sgml/xml.dcl myfile.xml

it will silently ignore some mistakes, because the .dcl file has IMPLYDEF 
set to YES for everything. For example if you add an attribute to an element 
that isn't supposed to have any, it won't report it.

I got the expected results with /usr/share/doc/openjade-1.3/xml.dcl from 
openjade-1.3-6. I don't know which is the "best" or official version but I 
believe the one included with openjade should be used.


Steps to Reproduce:

nsgmls -v -s /usr/share/sgml/xml.dcl test.xml

test.xml is the following:
-------------------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE test [
  <!ELEMENT test EMPTY>
  <!ATTLIST test cat CDATA #IMPLIED>
]>
<test dog="spot"/>
------------------------------------------------------------------


Actual Results:
nsgmls:I: OpenSP version "1.3.4"



Expected Results:
nsgmls:I: OpenSP version "1.3.4"
nsgmls:test.xml:6:10:E: there is no attribute "dog"

Comment 1 Tim Waugh 2002-05-16 14:00:42 UTC
Fixed in 0.6.3-10.