Altova Mailing List Archives

Empty attributes

From: Olivier Lefevre <lefevrol@-----.--->
To: xmlschema-dev@--.---
Date: 10/19/2005 5:06:00 AM
any DTD-focused newsgroup or mailing list.

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 the type attribute (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.

From mike@s... Wed Oct 19 08:24:25 2005
Received: from lisa.w


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.