There are other (much better) schema languages than DTDs, and other tool-specific ways of associating schemas with documents, besides embedded and externally referenced DTDs.
Even without a schema, tools can rightfully transform the XML in any way allowed by the standard, like normalizing newlines in attributes to spaces, etc. I'm using the <oXygen/> XML editor, which inserts the following processing instruction to associate an xml file with a Relax NG schema: <?oxygen RNGSchema="http://www.NutritionQuest.com/xml/alive.rnc" type="compact"?> Kid is useful for generating any kind of XML -- it's not just limited to XHTML and HTML. I'm using Kid to process XML documents with macros and conditionals into a special purpose application specific XML format, and then running the resulting documents through another set of Kid macros to render them into HTML. I'm using oXygen with a Relax NG schema, to edit Kid templates written in the special purpose XML format, which may also contain embedded xhtml. The Relax NG schema defines the XML format of the documents, which is designed for writing personalized questionnaires with conditional and dynamically computed content. The schema is written in the Relax NG compact notation, which is quite easy to read and maintain (compared to the XML format). The tool automatically displays the documentation comments for elements and attributes defined in the schema, when you click on an element in the editor. oXygen validates all the constraints of the schema (structure, attributes, data types, etc) as you type and edit the XML. The schema is here: http://www.NutritionQuest.com/xml/alive.rnc Pointing oXygen (or other tools like XMLBuddy) at a schema allows it to support editing structured XML documents with automatic validation, documentation, pop-up prompting and completion over valid elements, attributes and values, collapsible outline editing, dynamically generated editor user interfaces with special widgets according to the type of the attribute (like date pickers to edit dates, checkboxes for booleans, popup menus with enumerated type values, etc). Bitflux is an interesting open source, browser based, WYSIWYG XML editing tool (but it only runs in Firefox). It understands Relax NG schema, and supports structured editing of XHTML and user defined XML documents described by Relax NG. (Bitflux only supports the Relax NG XML syntax, but tools like "trang" can easily translate back and forth between the compact notation and XML, without losing any information.) http://bxe.oscom.org/ -Don -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Karl Guertin Sent: Thursday, December 29, 2005 3:59 PM To: [email protected] Subject: [TurboGears] Re: XML ignorable white space On 12/29/05, Don Hopkins <[EMAIL PROTECTED]> wrote: > Actually, an element node that's not defined to allow mixed content (tags + > text) and contains only white space (or comments and processing > instructions) is the same as an empty node, for the purposes of validation. I thought that only applied if the document has a DTD and that if no DTD was present, all whitespace was significant... Ah well, learn something new every day.

