Bug 63500 - xml.dcl bad for validation
Summary: xml.dcl bad for validation
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: sgml-common
Version: skipjack-beta2
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-15 04:46 UTC by Alexander Kourakos
Modified: 2007-04-18 16:42 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-04-24 16:01:44 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.