Return-Path: X-Original-To: apmail-db-ddlutils-dev-archive@www.apache.org Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 706BD2265 for ; Thu, 5 May 2011 06:02:42 +0000 (UTC) Received: (qmail 7214 invoked by uid 500); 5 May 2011 06:02:42 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 7166 invoked by uid 500); 5 May 2011 06:02:39 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 7158 invoked by uid 500); 5 May 2011 06:02:37 -0000 Delivered-To: apmail-db-ddlutils-commits@db.apache.org Received: (qmail 7155 invoked by uid 99); 5 May 2011 06:02:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 06:02:37 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 May 2011 06:02:34 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 861E52388901; Thu, 5 May 2011 06:02:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1099692 - in /db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs: schema.xml site.xml Date: Thu, 05 May 2011 06:02:12 -0000 To: ddlutils-commits@db.apache.org From: tomdz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110505060212.861E52388901@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tomdz Date: Thu May 5 06:02:12 2011 New Revision: 1099692 URL: http://svn.apache.org/viewvc?rev=1099692&view=rev Log: Added documentation for the data schema (for DDLUTILS-245) Modified: db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/schema.xml db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/site.xml Modified: db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/schema.xml URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/schema.xml?rev=1099692&r1=1099691&r2=1099692&view=diff ============================================================================== --- db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/schema.xml (original) +++ db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/schema.xml Thu May 5 06:02:12 2011 @@ -20,13 +20,114 @@
- The schema used by DdlUtils + The data schema used by DdlUtils
- The schema used by DdlUtils -

Documenation of the

- Coming soon + The data schema used by DdlUtils +

+ DdlUtils uses a dynamic XML schema for representing data that tries to use table and column names as much as possible. + It follows the following rules for choosing the tags and attributes to represent the table of a given row: +

+
    +
  • + If the table name is a valid XML tag, then it will be used as the XML element for the row. E.g. + ...]]> +
  • +
  • + If the table name is not a valid XML tag, but it is shorter than 255 characters and does not contain characters that would be illegal + for an XML attribute, then the XML element will be table with an attribute table-name containing the name of the table. + E.g. + ...]]> + If the table name contains characters like the ampersand, then these will be escaped in the standard XML fashion (via entities): + ...]]> +
  • +
  • + If the table name is not a valid XML tag (not a valid tag or longer than 255 characters) and does not contain characters that would be illegal + for an XML attribute, then the XML element will be table with a sub element table-name containing the name of the table. + E.g. + + My Really Long Table Name ... + ... +]]> +
  • +
  • + If the table name contains characters that are illegal in XML, then the same format as above is used, but the value is also Base-64 encoded. An + additional attribute base64 with the value true signifies that the value is Base-64 encoded. E.g. + + TXlUYWJsZQ== + ... +]]> +
  • +
+

+ The rules for the columns are similar: +

+
    +
  • + If the column name is a valid XML attribute name and not equal to table-name or base64, and the value is shorter than + 255 characters and does not contain any characters invalid in XML, then an XML attribute will be used for the column. This is true regardless + of whether the table name is a valid tag: + ...]]> + or not: + ...]]> +
  • +
  • + If the column name is a valid XML attribute name and not equal to table-name or base64, but the value is not shorter + than 255 characters or it contains characters that are not allowed in XML documents, then instead a sub element will be used with the column + name as the tag name: + + ... + ... +]]> + or + + ... + ... +]]> + if the value needs to be Base-64 encoded because of illegal characters. +
  • +
  • + If the column name is not a valid XML attribute name and it is shorter than 255 characters and does not contain characters that would be illegal + for an XML attribute, or if the column name is equal to column-name or base64, then instead a sub element will be used + for the column name which will have an attribute column-name for the column name and the value as text content: + E.g. + + ... + ... +]]> + or + + ... + ... +]]> + if the value needs to be Base-64 encoded. +
  • +
  • + If the column name is not a valid XML attribute name or it is longer than 255 characters or it contains illegal characters, then instead + a sub element is used with the column name as the text content (base64 encoded if necessary). The value will be in a + corresponding sub element: + + + ... + ... + + ... +]]> +
  • +
Modified: db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/site.xml URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/site.xml?rev=1099692&r1=1099691&r2=1099692&view=diff ============================================================================== --- db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/site.xml (original) +++ db/ddlutils/trunk/src/main/doc/src/documentation/content/xdocs/site.xml Thu May 5 06:02:12 2011 @@ -66,6 +66,7 @@ See http://forrest.apache.org/docs/linki +