[xml] defaults in DTD defns?

Date view Thread view Subject view Author view

From: Paul D. Smith (pausmith@nortelnetworks.com)
Date: Tue Jan 23 2001 - 14:33:48 EST


Does libxml support default values in the DTD in any way (in addition to
recognizing them)?

Should it?

I have a DTD with default values and I kind of assumed that, if I didn't
supply a value in the XML file, libxml will fill in the default value
into the parse tree.

But, that doesn't seem to be happening.

Is there some approved/supported way of handling DEFAULT DTD values?

E.g.,

  <!ATTLIST Spec
             Name CDATA #REQUIRED
             Type (Normal|Abnormal) "Normal" >

then:

  <Spec Name="Sponge">

When I look at the parse tree, there doesn't seem to be any help for
getting the default value for the Type attribute.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <psmith@baynetworks.com>    HASMAT--HA Software Methods & Tools
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Jan 23 2001 - 14:43:39 EST