Return-Path: Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 62371 invoked by uid 500); 8 May 2001 17:24:01 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: general@xml.apache.org Delivered-To: mailing list general@xml.apache.org Received: (qmail 62317 invoked from network); 8 May 2001 17:23:50 -0000 Message-ID: From: William Bagby To: "XML Mailing List (E-mail)" Subject: Setting defaults in DTD Date: Tue, 8 May 2001 13:17:22 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N I'm still sort of a novice when it comes to DTD's, so please bear with me... I have an element called which contains one or more 's, each with a unique type attribute. Additionally, each contains the same elements. Here's an example: Felix black Fido brown Tweety yellow which has the corresponding DTD: What I'd like to do is specify a default based on what type of it is, for example, the default name for a "cat" is Felix, and so on. Unless I am mistaken, there is no way to do this. So, I restructured the XML so that each child of is distinct: Felix black Fido brown Tweety yellow This has it's own drawbacks, not the least of which is a rather unruly DTD, and it still doesn't allow for defaults. So I try again: OK, now I'm getting somewhere. Now I can specify defaults. But my DTD is still unruly, and it seems a terrible waste to have different elements when they are really the same element with different characteristics. Is there a simple and elegant solution to this problem? I'm of course making the assumption that one of you has run into this problem before. Please help me... William --------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org