Annotation of Amaya/amaya/Template.S, revision 1.31
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.1 tollenae 13:
14: CONST
15:
1.7 francesc 16: C_CR = '\12';
1.1 tollenae 17:
18: STRUCT
19:
1.29 kia 20: Template ( ATTR version = TEXT; templateVersion = TEXT ) = LIST OF (TemplateObject);
21:
22: TemplateObject = CASE OF
1.9 vatton 23: head;
24: repeat;
25: option;
26: useEl;
1.17 vatton 27: useSimple;
1.9 vatton 28: bag;
29: attribute;
1.29 kia 30: END + (Comment\240, XMLPI);
1.7 francesc 31:
1.29 kia 32: head ( ATTR version; templateVersion ) =
1.22 kia 33: LIST OF ( Declaration = CASE OF
1.7 francesc 34: component;
35: union;
36: import;
37: END
1.11 francesc 38: );
1.7 francesc 39:
1.29 kia 40: Comment\240 = LIST OF (Comment_line = TEXT) - (Comment\240);
41:
42: XMLPI (ATTR is_css = Text) = LIST OF (PI_line = TEXT);
43:
1.22 kia 44: component ( ATTR name = TEXT ) = ANY - ( head, union, import );
45: union ( ATTR name; includeAt = TEXT; exclude = TEXT ) = CONSTANT C_CR; {It is always empty}
1.11 francesc 46: import ( ATTR src = TEXT ) = CONSTANT C_CR; {It is always empty}
1.9 vatton 47:
1.28 vatton 48: repeat ( ATTR title = TEXT; minOccurs = TEXT; maxOccurs = TEXT) =
1.15 quint 49: LIST OF ( Repetition =
50: CASE OF
51: useEl;
1.17 vatton 52: useSimple;
1.15 quint 53: option;
54: repeat;
1.18 vatton 55: bag;
1.15 quint 56: END);
1.11 francesc 57:
1.10 francesc 58:
1.24 vatton 59: option ( ATTR title )
1.15 quint 60: = ANY - ( head, union, import, component );
1.7 francesc 61:
1.26 vatton 62: useEl ( ATTR title; types = TEXT; currentType = TEXT; prompt = Yes_ )
1.15 quint 63: = ANY - ( head, union, import, component );
1.7 francesc 64:
1.26 vatton 65: useSimple ( ATTR title; types; prompt)
1.17 vatton 66: = ANY - ( head, union, import, component );
67:
1.24 vatton 68: bag ( ATTR title; types )
1.21 vatton 69: = LIST OF (ANY) - ( head, union, import, component );
1.7 francesc 70:
1.11 francesc 71: attribute ( ATTR
1.19 vatton 72: ref_name = TEXT;
1.27 kia 73: type = number, string, listVal;
74: useAt = required, optional, prohibited;
1.10 francesc 75: defaultAt = TEXT;
76: fixed = TEXT;
77: values = TEXT;
1.22 kia 78: ) = CONSTANT C_CR; {It is always empty}
1.7 francesc 79:
80: EXCEPT
1.29 kia 81: XMLPI: ReturnCreateNL, NoSpellCheck, NoReplicate, NotAnElementNode;
1.30 vatton 82: PI_line: Hidden, MarkupPreserve;
1.29 kia 83: Comment\240: ReturnCreateNL, NoSpellCheck, NoReplicate, NotAnElementNode;
84: Comment_line: Hidden, MarkupPreserve;
1.25 kia 85: useEl: NoReplicate, NoBreakByReturn;
86: useSimple: NoReplicate, NoBreakByReturn;
1.21 vatton 87: repeat: NoReplicate, NoBreakByReturn, NoCreate;
88: option: NoReplicate, NoBreakByReturn, NoCreate;
89: bag: NoReplicate, NoBreakByReturn, NoCreate, ParagraphBreak;
1.16 quint 90: {Hiding unkown and language attributes}
1.19 vatton 91: Unknown_attribute: Invisible;
92: Language: Invisible;
1.31 ! vatton 93: types : GiveTypes, DuplicateAttr;
1.22 kia 94: currentType: Invisible;
1.24 vatton 95: title: GiveName;
1.23 vatton 96: ref_name: GiveName;
97: name: GiveName;
1.26 vatton 98: prompt: Invisible;
1.30 vatton 99: xmlid: CssId;
1.1 tollenae 100:
101: END
Webmaster