[XML-SIG] Bug or Delusion
Mon, 25 Jan 1999 18:12:40 -0800 (PST)
I'm in the process of writing my first DTD, and am having bit of a
problem. I'm attempting to create valueless attributes (like <DL compact>
in html). Now my XML book has this statement:
For an XML document to be valid, whenever an element type with an
#IMPLIED attribute appears and does not have a value, the XML procesor
must report the missing value and continue processing.
In addition, in the ibtwsh.dtd (Itsy Bitsy Teeny Weeny Simple Hypertext
DTD), they have the 'compact' attribute defined like this:
<!ENTITY % compact "compact (compact) #IMPLIED">
<!-- Definition list -->
<!ELEMENT DL (DT|DD)+>
When I try something like this in my DTD...
c (c) #IMPLIED
And run the xvcmd over a test xml document. I get these errors:
xmysql.xml:4:10: Document root element 'package' does not match declared
xmysql.xml:40:9: '=' expected
xmysql.xml:40:11: One of '>' or '/>' expected
Parse complete, 3 error(s) and 0 warning(s)
The first error I've been getting, and just haven't gotten around to
tracking it down (the package element seems fine to me... but I don't
think this is relevant to the problem at hand).
Are these errors the systems way of reporting the missing value (as the
paragraph from my book states)? I thought that errors were fatal, and
things to be avoided. I was expecting mabey a warning.
BTW, Here's line 40:
This seems to either be a mistake in xmlproc, or I'm not understanding
this very well (probably the latter). If this is a mistake on my part, I'd
appreciate any tips/advice.
[firstname.lastname@example.org - http://taos.kavi.com/~jae/]
"A society that will trade a little liberty for a little order
will deserve neither and lose both."