[Laszlo-dev] For Review: Change 20081022-dda-a Summary: Improvements to XML Schemabuilder, use it as default

Donald Anderson dda at ddanderson.com
Wed Oct 22 13:42:34 PDT 2008

Change 20081022-dda-a by dda at lester.local on 2008-10-22 13:07:21 EDT
     in /Users/dda/laszlo/src/svn/openlaszlo/trunk-d
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Improvements to XML Schemabuilder, use it as default

New Features:

Bugs Fixed: LPP-3508 (Generate LZX Schema from js2doc output),  
LPP-2300 (PARTIAL) (Update laszlo namespace)

Technical Reviewer: hminsky (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)


Release Notes:

     This change set extends the XML schemabuilder in several ways  
described below.
     The output finally is usable as a schema, and is undoubtedly more  
accurate, so
     schema/lfc.lzx has been turned into an automatically generated  
file by this changeset.

     There should be no visible behavioral changes made by this  
changeset, its purpose
     is to make the LFC more maintainable, and to allow for future  

     Changes specific to the schemabuilder:

     - Create classes in output in 'superclass order' - needed by the  
reader of this schema.

     - Use the javadoc access in the class if it is not available from  
the element (attribute/method/event),
       if there is no access there, use the unitid's access (that is,  
the javadoc at the top of each file).

     - the default inheritance is from Instance, not Object.

     - add class attributes

     - handle default values, enum types, and 'class' allocation for  

     - convert types (boolean->Boolean, etc.)

     - Added an attribute on <library> to show a version number.  This  
satisfies the
       next step for LPP-2300.  The version number is based on day/hr/ 
min/sec of build
       and looks like this:
         <library version="20081022143456">

     - Adds a facility to merge in pieces of the schema in order to  
add, modify, or remove items.
       The part merged in is hand-maintained and is called lfc- 
undeclared.lzx (to represent
       parts of the schema that are not declared in the LFC javadoc).   
For any
       piece of the schema to be overridden or added to, a parallel  
fragment of the schema
       is created in lfc-undeclared.lzx, the parts to be inserted  
appear in <insert>, parts
       to be deleted in <delete> or existing items can be changed with  
<replace>.  These
       instructions are merged with (and override) information derived  
       so we ultimately have full control over the schema.  However  
many entries in
       lfc-undeclared represent items that are improperly declared in  
javadoc and
       could be cleaned up.  Since I was sometimes conservative in  
preserving parts
       of lfc.lzx, some parts of this file represent out of date  
information (just as
       the old lfc.lzx may have been out of date).  Even some TODO's  
from the original
       lfc.lzx have been preserved.

        => As a long term goal, we should seek to eliminate all or  
most of the items in lfc-undeclared.lzx .
           Some items, like <containsElements> could only be removed  
by extending javadoc to contain
           this information, and that would be a good thing.

    Elsewhere, these changes are made:

      - In utils/FileUtils.java: A fix to recognize encoding="UTF-8",  
which was broken.

      - In js2doc, some improvements to error messages to help  

     weather, lzpix (all platforms)
     hello (SWF9)
     smokecheck (SWF8, DHTML)

D      WEB-INF/lps/schema/lfc.lzx
A      WEB-INF/lps/schema/lfc-undeclared.lzx
M      WEB-INF/lps/schema/build.xml
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/ 
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/JS2Doc.java
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/Main.java
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/JS2DocUtils.java
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java
M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/ 
M      WEB-INF/lps/server/src/org/openlaszlo/utils/FileUtils.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081022-dda-a.tar


Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20081022/b7d3f292/attachment.html

More information about the Laszlo-dev mailing list