/*====================================================================* * * void xmlschema (); * * node.h * * print an XML schema on stdout that is compatible with function * xmledit; the schema should be used to validate files before any * attempt is make to parse them; * * Motley Tools by Charles Maier; * Copyright (c) 2001-2006 by Charles Maier Associates; * Licensed under the Internet Software Consortium License; * *--------------------------------------------------------------------*/ #ifndef XMLSCHEMA_SOURCE #define XMLSCHEMA_SOURCE #include "../nodes/node.h" #include "../tools/format.h" void xmlschema () { unsigned margin = 0; output (margin, "", XML_VERSION, XML_CHARSET); output (margin++, "", XML_SCHEMA, "qualified"); output (margin++, "", DATA_OBJECT); output (margin++, ""); #if 0 output (margin, "", DATA_NAME); output (margin, "", DATA_TEXT); #endif output (margin++, ""); output (margin, "", DATA_MEMBER); output (margin--, ""); output (margin--, ""); output (margin--, ""); output (margin++, "", DATA_MEMBER); output (margin++, ""); output (margin, "", DATA_NAME); #if 0 output (margin, "", DATA_TEXT); #endif output (margin++, ""); output (margin++, ""); output (margin, "", DATA_OFFSET); output (margin, "", DATA_LENGTH); output (margin--, ""); output (margin++, ""); output (margin, "", DATA_STRUCT); output (margin, "", DATA_STRING); output (margin, "", DATA_HUGE); output (margin, "", DATA_LONG); output (margin, "", DATA_WORD); output (margin, "", DATA_BYTE); output (margin--, ""); output (margin--, ""); output (margin--, ""); output (margin--, ""); output (margin, "", DATA_LENGTH); output (margin, "", DATA_OFFSET); output (margin++, "", DATA_STRUCT); output (margin++, ""); #if 0 output (margin, "", DATA_NAME); output (margin, "", DATA_TEXT); #endif output (margin++, ""); output (margin, "", DATA_BYTE); output (margin, "", DATA_MEMORY); output (margin--, ""); output (margin--, ""); output (margin--, ""); output (margin, "", DATA_STRING); output (margin, "", DATA_MEMORY); output (margin, "", DATA_HUGE); output (margin, "", DATA_LONG); output (margin, "", DATA_WORD); output (margin, "", DATA_BYTE); output (margin--, ""); return; } #endif