xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lefevre <lefev...@yahoo.com>
Subject How to allow empty attributes?
Date Tue, 18 Oct 2005 04:17:03 GMT
I have an XML file in which some attributes are set to
"", e.g., <entry id="4" type=""> and cannot find any
way to allow this in the DTD. The DTD specifies a list
of possible values for type and if I try to add "" to
the list, e.g., by writing <!ENTITY % type "(foo|bar|)">,
the parser complains that "the name token is required in
the enumerated type list for the "type" attribute
declaration.". Similarly if I try to make the attribute
implied rather than required I still get the error that
"" is not a valid value for type (I naively thought that
an empty attribute might be equated to a missing one).
So I am really stumped. Are empty attributes possible at
all?

FWIW the parser used is XOM, which uses Xerces2 underneath.


---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message