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

1.7       francesc    1:       { Structure Schema for XTiger Templates
1.19      vatton      2:         Francesc Campoy Flores & I. Vatton    January 2007 }
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.30      vatton     12:   xmlid = Text;                { id }
1.40    ! vatton     13:   Highlight = Yes_;    { to show the element corresponding to the
        !            14:                                           current selection in the source view }
        !            15:   SetInLine = Yes_;    { to force display: inline }
1.1       tollenae   16: 
                     17: CONST
                     18: 
1.7       francesc   19:   C_CR = '\12';
1.1       tollenae   20: 
                     21: STRUCT
                     22: 
1.29      kia        23:   Template ( ATTR version = TEXT; templateVersion = TEXT ) = LIST OF (TemplateObject);
                     24: 
                     25:   TemplateObject = CASE OF
1.9       vatton     26:       head;
                     27:       repeat;
1.32      vatton     28:       {option;}
1.9       vatton     29:       useEl;
1.17      vatton     30:       useSimple;
1.9       vatton     31:       bag;
                     32:       attribute;
1.29      kia        33:     END + (Comment\240, XMLPI);
1.7       francesc   34: 
1.29      kia        35:   head ( ATTR version; templateVersion ) = 
1.22      kia        36:     LIST OF ( Declaration = CASE OF
1.7       francesc   37:       component;
                     38:       union;
                     39:       import;
                     40:     END
1.11      francesc   41:    );
1.7       francesc   42: 
1.29      kia        43:   Comment\240 = LIST OF (Comment_line = TEXT) - (Comment\240);
                     44:   
                     45:   XMLPI (ATTR is_css = Text) = LIST OF (PI_line = TEXT);
                     46: 
1.22      kia        47:   component ( ATTR name = TEXT ) = ANY - ( head, union, import );
                     48:   union ( ATTR name; includeAt = TEXT; exclude = TEXT ) = CONSTANT C_CR; {It is always empty}
1.11      francesc   49:   import ( ATTR src = TEXT ) = CONSTANT C_CR; {It is always empty}
1.9       vatton     50: 
1.28      vatton     51:   repeat ( ATTR title = TEXT; minOccurs = TEXT; maxOccurs = TEXT) =
1.15      quint      52:        LIST OF ( Repetition =
                     53:                  CASE OF
                     54:                    useEl;
1.17      vatton     55:         useSimple;
1.32      vatton     56:                {option;}
1.15      quint      57:                    repeat;
1.18      vatton     58:                    bag;
1.15      quint      59:                    END);
1.11      francesc   60: 
1.10      francesc   61: 
1.32      vatton     62:   {option ( ATTR title )
                     63:        = ANY - ( head, union, import, component );}
1.7       francesc   64:   
1.32      vatton     65:   useEl ( ATTR option = option_set, option_unset; title; types = TEXT; currentType = TEXT;  prompt = Yes_ )
1.15      quint      66:      = ANY - ( head, union, import, component );
1.7       francesc   67: 
1.39      vatton     68:   useSimple ( ATTR option; title; types; currentType; prompt)
1.17      vatton     69:      = ANY - ( head, union, import, component );
                     70: 
1.24      vatton     71:   bag ( ATTR title; types ) 
1.21      vatton     72:      =  LIST OF (ANY) - ( head, union, import, component );
1.7       francesc   73: 
1.11      francesc   74:   attribute ( ATTR 
1.19      vatton     75:     ref_name = TEXT; 
1.27      kia        76:     type = number, string, listVal; 
                     77:     useAt = required, optional, prohibited;
1.10      francesc   78:     defaultAt = TEXT; 
                     79:     fixed = TEXT; 
                     80:     values = TEXT;
1.22      kia        81:     ) = CONSTANT C_CR; {It is always empty}
1.7       francesc   82: 
                     83: EXCEPT
1.36      vatton     84:   XMLPI:             ReturnCreateNL, NoSpellCheck, NoReplicate, NotAnElementNode;
                     85:   PI_line:           Hidden, MarkupPreserve;
                     86:   Comment\240:       ReturnCreateNL, NoSpellCheck, NoReplicate, NotAnElementNode;
                     87:   Comment_line:      Hidden, MarkupPreserve;
1.38      vatton     88:   useEl:             NoReplicate, NoBreakByReturn, NoCreate, ClickableSurface;
1.36      vatton     89:   component:         NewRoot;
1.38      vatton     90:   useSimple:         NoReplicate, NoBreakByReturn, NoCreate, ClickableSurface;
                     91:   repeat:            NoReplicate, NoBreakByReturn, NoCreate, ClickableSurface;
                     92:   bag:               NoReplicate, NoBreakByReturn, NoCreate, ParagraphBreak, ClickableSurface;
1.16      quint      93:   {Hiding unkown and language attributes}
1.36      vatton     94:   Highlight:        Invisible;
1.40    ! vatton     95:   SetInLine:        Invisible;
1.36      vatton     96:   Unknown_attribute:Invisible;
                     97:   Language:         Invisible;
                     98:   types :           GiveTypes, DuplicateAttr;
                     99:   option:           DuplicateAttr;
                    100:   currentType:      Invisible;
1.35      kia       101:   ref_name:                  GiveName;
1.36      vatton    102:   name:                                GiveName;
                    103:   title:            GiveName;
                    104:   prompt:           Invisible;
1.35      kia       105:   xmlid:                     CssId;
1.1       tollenae  106:        
                    107: END

Webmaster