Annotation of Amaya/amaya/Template.S, revision 1.11

1.7       francesc    1:       { Structure Schema for XTiger Templates
                      2:          Francesc Campoy Flores     31/03/2006 }
1.1       tollenae    3: 
                      4:        
                      5: STRUCTURE Template;
                      6: 
                      7: DEFPRES TemplateP;
                      8: 
                      9: ATTR
1.7       francesc   10:   { generic attributes for internal use }
                     11:   Unknown_attribute = TEXT;    { to store an unknown attribute }
1.1       tollenae   12: 
                     13: CONST
                     14: 
1.7       francesc   15:   C_CR = '\12';
1.1       tollenae   16: 
                     17: STRUCT
                     18: 
1.11    ! francesc   19:   Template = CASE OF
1.9       vatton     20:       head;
                     21:       repeat;
                     22:       option;
                     23:       useEl;
                     24:       bag;
                     25:       attribute;
                     26:     END;
1.7       francesc   27: 
1.11    ! francesc   28:   head = LIST OF ( 
1.7       francesc   29:     Declaration = CASE OF
                     30:       component;
                     31:       union;
                     32:       import;
                     33:     END
1.11    ! francesc   34:    );
1.7       francesc   35: 
1.11    ! francesc   36:   component ( ATTR name = TEXT; title = TEXT ) = ANY - ( head, union, import );
        !            37:   union ( ATTR name; includeAt = TEXT; exclude = TEXT; title ) = CONSTANT C_CR; {It is always empty}
        !            38:   import ( ATTR src = TEXT ) = CONSTANT C_CR; {It is always empty}
1.9       vatton     39: 
1.11    ! francesc   40:   folder = BEGIN
        !            41:                ANY - ( head, union, import, component );
1.10      francesc   42:        END;
                     43: 
1.11    ! francesc   44:   repeat ( ATTR id = TEXT; minOccurs = TEXT; maxOccurs = TEXT; title )
        !            45:        = LIST OF ( Repetition = CASE OF
        !            46:                useEl;
        !            47:                option;
        !            48:                repeat;
        !            49:                bag; 
        !            50:                folder;
        !            51:                repeatMenu;             
        !            52:                END
        !            53:        );
        !            54: 
1.10      francesc   55: 
1.11    ! francesc   56:   option ( ATTR id )
1.10      francesc   57:        = BEGIN 
1.11    ! francesc   58:        ANY - ( head, union, import, component );
1.10      francesc   59:        optionMenu;
                     60:        END;
1.7       francesc   61:   
1.11    ! francesc   62:   useEl ( ATTR id; types = TEXT; currentType = TEXT; title )
1.9       vatton     63:      = BEGIN
                     64:         ANY;
1.10      francesc   65:         useMenu;        
1.11    ! francesc   66:        END - ( head, union, import, component );
1.7       francesc   67: 
1.11    ! francesc   68:   bag ( ATTR id; types ) 
1.10      francesc   69:      = BEGIN
                     70:         ANY;
                     71:         bagMenu;        
1.11    ! francesc   72:        END - ( head, union, import, component );
1.7       francesc   73: 
1.10      francesc   74:   useMenu              = CONSTANT C_CR; {Just a button}  
                     75:   bagMenu              = CONSTANT C_CR; {Just a button}  
                     76:   repeatMenu   = CONSTANT C_CR; {Just a button}  
                     77:   optionMenu   = CONSTANT C_CR; {Just a button}  
1.7       francesc   78: 
1.11    ! francesc   79:   attribute ( ATTR 
1.7       francesc   80:     name; 
1.10      francesc   81:     type = integerVal, decimal, string, listVal; 
1.7       francesc   82:     useAt = TEXT; 
1.10      francesc   83:     defaultAt = TEXT; 
                     84:     fixed = TEXT; 
                     85:     values = TEXT;
1.11    ! francesc   86:     title ) = CONSTANT C_CR; {It is always empty}
1.7       francesc   87: 
                     88: EXCEPT
1.11    ! francesc   89:     {Hiding unkown and language attributes}
        !            90:        Unknown_attribute       : Invisible;
        !            91:        Language                        : Invisible;
1.1       tollenae   92:        
1.10      francesc   93:        {Element buttons are not editable}
1.11    ! francesc   94:        useMenu         : NoCut, NoCreate, NoMove, NoResize, NoSelect;
        !            95:        bagMenu         : NoCut, NoCreate, NoMove, NoResize, NoSelect;
1.10      francesc   96:        optionMenu      : NoCut, NoCreate, NoMove, NoResize, NoSelect;
                     97:        repeatMenu      : NoCut, NoCreate, NoMove, NoResize, NoSelect;
1.1       tollenae   98: 
                     99: END

Webmaster