Annotation of Amaya/amaya/SVG.S, revision 1.5

1.1       vatton      1: 
                      2:       { Thot structure schema for Scalable Vector Graphics }
                      3: 
                      4: STRUCTURE SVG;
                      5: 
                      6: DEFPRES SVGP;
                      7: 
                      8: ATTR
                      9: 
                     10:    { global attributes for all SVG elements }
                     11:    id = text;
                     12:    class = text;
                     13:    PseudoClass = Text;
                     14:    style_ = text;
                     15:    xml_space = xml_space_default, xml_space_preserve;
1.3       cvs        16:    { xml_base = Text; }
                     17:        
1.1       vatton     18:    { global attributes for internal processing }
1.2       cvs        19:    Unknown_attribute = text;
1.1       vatton     20:    Ghost_restruct = text;
                     21:    Highlight = Yes_;        { to show the SVG element corresponding to the
                     22:                              current selection in the source view }
                     23:    Namespace = text;        { for children of element foreignObject }
                     24:    IntEmptyShape = yes_, no_;
                     25: 
                     26: STRUCT
                     27: 
                     28:    SVG
1.5     ! cvs        29:        (ATTR font_family = text;
        !            30:              font_size = text;
        !            31:              font_style = normal_, italic, oblique_, inherit;
        !            32:              font_variant = normal_, small_caps, inherit;
        !            33:              font_weight = normal_, bold_, bolder, lighter, w100, w200, w300,
        !            34:                            w400, w500, w600, w700, w800, w900, inherit;
        !            35:              viewBox = text;
1.1       vatton     36:              x = text;
                     37:               y = text;
1.5     ! cvs        38:              width_ = text;
1.1       vatton     39:              height_ = text;
                     40:              Charset = text)
1.2       cvs        41:         = LIST OF (GraphicsElement) + (XMLcomment, XMLPI, Unknown_namespace);
1.1       vatton     42: 
                     43:    g
                     44:         (ATTR fill = text;
                     45:              stroke = text;
                     46:              stroke_width = text;
1.5     ! cvs        47:              font_family; font_size; font_style; font_variant; font_weight;
1.1       vatton     48:              transform = text)
                     49:         = LIST OF (GraphicsElement);
                     50: 
                     51:    defs
1.3       cvs        52:         (ATTR requiredFeatures = text;
                     53:              requiredExtensions = text;
                     54:              systemLanguage = text;
1.1       vatton     55:              externalResourcesRequired = false, true;
                     56:              fill;
                     57:              stroke;
                     58:              stroke_width;
1.5     ! cvs        59:              font_family; font_size; font_style; font_variant; font_weight;
1.1       vatton     60:              transform;
                     61:              { graphicsElementEvents })
                     62:         = LIST OF (GraphicsElement);
                     63: 
                     64:    path
                     65:        (ATTR externalResourcesRequired; 
                     66:              fill;
                     67:               stroke;
                     68:              stroke_width;
                     69:               transform;
                     70:              d = text;
                     71:              pathLength = text)
                     72:         = AGGREGATE
                     73:              desc; title; metadata;
                     74:              GRAPHICS;
                     75:              END;
                     76: 
                     77:    rect
                     78:         (ATTR transform;
                     79:              x;
                     80:               y;
                     81:               width_;
                     82:               height_;
                     83:              rx = text;
                     84:              ry = text;
                     85:              fill;
                     86:               stroke;
                     87:              stroke_width)
                     88:         = AGGREGATE
                     89:              desc; title; metadata;
                     90:              GRAPHICS;
                     91:              END;
                     92:        
                     93:    circle
                     94:         (ATTR transform;
                     95:              cx = text;
                     96:              cy = text;
                     97:               r = text;
                     98:              fill;
                     99:               stroke;
                    100:              stroke_width)
                    101:         = AGGREGATE
                    102:              desc; title; metadata;
                    103:              GRAPHICS;
                    104:              END;
                    105:        
                    106:    ellipse
                    107:         (ATTR transform;
                    108:              cx;
                    109:              cy;
                    110:              rx;
                    111:              ry;
                    112:              fill;
                    113:               stroke;
                    114:              stroke_width)
                    115:         = AGGREGATE
                    116:              desc; title; metadata;
                    117:              GRAPHICS;
                    118:              END;
                    119:        
                    120:    line_
                    121:         (ATTR transform;
                    122:              x1 = text;
                    123:              y1 = text;
                    124:               x2 = text;
                    125:              y2 = text;
                    126:              fill;
                    127:               stroke;
                    128:              stroke_width)
                    129:         = AGGREGATE
                    130:              desc; title; metadata;
                    131:              GRAPHICS;
                    132:              END;
                    133:        
                    134:    polyline
                    135:         (ATTR width_;
                    136:               height_;
                    137:              transform;
                    138:               points = text;
                    139:              fill;
                    140:               stroke;
                    141:              stroke_width)
                    142:         = AGGREGATE
                    143:              desc; title; metadata;
                    144:              GRAPHICS;
                    145:              END;
                    146:        
                    147:    polygon
                    148:         (ATTR width_;
                    149:               height_;
                    150:              transform;
                    151:               points;
                    152:              fill;
                    153:               stroke;
                    154:              stroke_width)
                    155:         = AGGREGATE
                    156:              desc; title; metadata;
                    157:              GRAPHICS;
                    158:              END;
                    159: 
                    160:    text_
1.5     ! cvs       161:         (ATTR font_family; font_size; font_style; font_variant; font_weight;
        !           162:              transform;
1.1       vatton    163:              x;
                    164:              y)
                    165:          = LIST OF (TextComponent);
                    166: 
                    167:    tspan
1.5     ! cvs       168:        (ATTR font_family; font_size; font_style; font_variant; font_weight;
        !           169:              x;
1.1       vatton    170:               y;
                    171:              dx = text;
                    172:              dy = text)
                    173:        = LIST OF (SpanElement);
                    174: 
                    175:    { tref }
                    176:    { textPath }
                    177:    { altGlyph }
                    178:    { altGlyphDef }
1.5     ! cvs       179:    { altGlyphItem }
        !           180:    { glyphRef }
1.1       vatton    181:    { font }
                    182:    { glyph }
                    183:    { missing-glyph }
                    184:    { hkern }
                    185:    { vkern }
                    186: 
                    187:    use_
                    188:         (ATTR xlink_href = text;
1.3       cvs       189:              requiredFeatures; requiredExtensions; systemLanguage;
1.1       vatton    190:              externalResourcesRequired;
                    191:              fill;
                    192:              stroke;
                    193:              stroke_width;
1.5     ! cvs       194:              font_family; font_size; font_style; font_variant; font_weight;
1.1       vatton    195:              transform;
                    196:              { graphicsElementEvents }
                    197:              x; 
                    198:              y;
                    199:               width_;
                    200:               height_)
                    201:         = AGGREGATE
                    202:               desc; title; metadata;
                    203:              END;
                    204:        
                    205:    image
                    206:        (ATTR xlink_href;
                    207:              transform;
                    208:              x; 
                    209:              y;
                    210:               width_;
                    211:               height_)
                    212:         = AGGREGATE
                    213:               desc; ? title; ? metadata;
                    214:               PICTURE;
                    215:               SVG_Image;
                    216:              END;
                    217: 
                    218:    symbol_
                    219:        (ATTR externalResourcesRequired;
                    220:              fill;
                    221:              stroke;
                    222:              stroke_width;
1.5     ! cvs       223:              font_family; font_size; font_style; font_variant; font_weight;
1.1       vatton    224:              viewBox;
                    225:              preserveAspectRatio = text; 
                    226:              { graphicsElementEvents })
                    227:         = LIST OF (GraphicsElement);
                    228:              
                    229:    { marker }
                    230:    
                    231:    desc = TEXT;
                    232:        
                    233:    title = TEXT;
                    234:        
                    235:    { clipPath }
                    236:    { mask }
                    237:    { linearGradient }
                    238:    { radialGradient }
                    239:    { stop }
                    240:    { pattern }
                    241: 
                    242:    a
                    243:         (ATTR xlink_href;
1.3       cvs       244:              requiredFeatures; requiredExtensions; systemLanguage;
1.1       vatton    245:              externalResourcesRequired;
                    246:              fill;
                    247:               stroke;
                    248:              stroke_width;
1.5     ! cvs       249:              font_family; font_size; font_style; font_variant; font_weight;
1.1       vatton    250:              transform;
                    251:              { graphicsElementEvents }
                    252:              target_ = text)
                    253:        = LIST OF (CASE OF
                    254:                      GraphicsElement; TextComponent;
                    255:                      END);
                    256: 
                    257:    { view }
                    258:    { animate }
                    259:    { set }
                    260:    { animateMotion }
                    261:    { animateColor }
                    262:    { animateTransform }
                    263: 
                    264:    script
                    265:        (ATTR externalResourcesRequired;
                    266:              type = text)
                    267:        = TEXT;
                    268: 
                    269:    style__
                    270:        (ATTR type;
                    271:              media = text;
                    272:              title_ = text)
                    273:        = TEXT;
                    274: 
                    275:    { color-profile }
                    276:    { color-profile-src }
                    277:    { font-face }
                    278:    { font-face-src }
                    279:    { font-face-uri }
                    280:    { font-face-format }
                    281:    { font-face-name }
                    282:    { definition-src }
                    283:    { cursor }
1.3       cvs       284:        
                    285:    switch
                    286:        (ATTR requiredFeatures; requiredExtensions; systemLanguage;
                    287:              externalResourcesRequired;
                    288:              { PresentationAttributes-All }
1.5     ! cvs       289:              font_family; font_size; font_style; font_variant; font_weight;
1.3       cvs       290:              transform;
                    291:              { graphicsElementEvents })
                    292:        = LIST OF (CASE OF
                    293:                      GraphicsElement; foreignObject;
                    294:                      END);
1.1       vatton    295: 
                    296:    foreignObject
                    297:         (ATTR transform;
                    298:              x; 
                    299:               y;
                    300:               width_;
                    301:               height_; 
                    302:               fill;
1.5     ! cvs       303:               stroke;
        !           304:              font_family; font_size; font_style; font_variant; font_weight)
1.1       vatton    305:        = BEGIN CASE OF
                    306:              HTML; MathML;
                    307:              END;
                    308:           END;
                    309:                      
                    310:    metadata = TEXT;
                    311: 
                    312:    { filter }
                    313:    { ... }
                    314: 
                    315:    GraphicsElement
                    316:        = CASE OF
1.3       cvs       317:              desc; title; metadata;
                    318:              defs;
1.1       vatton    319:              path; text_; rect; circle; ellipse; line_; polyline; polygon;
1.3       cvs       320:              use_; image; SVG; g; switch; a;
1.1       vatton    321:              script; style__; symbol_;
1.3       cvs       322:              XLink;
1.1       vatton    323:              END;
                    324: 
                    325:    TextComponent
                    326:        = CASE OF
                    327:              tspan;    { must be the first option, to allow the Return key
                    328:                          to create tspan elements }
                    329:              TEXT; 
                    330:              desc;
                    331:              title;
                    332:              metadata;
                    333:              END;
                    334: 
                    335:    SpanElement
                    336:        = CASE OF
                    337:              TEXT;
                    338:              tspan; 
                    339:              desc;
                    340:              title;
                    341:              metadata;
                    342:              END;
                    343:        
                    344:    SVG_Image = SVG;
                    345:    
                    346:    XMLcomment = LIST OF (XMLcomment_line = TEXT);
                    347: 
                    348:    XMLPI = LIST OF (XMLPI_line = TEXT);
                    349: 
1.2       cvs       350:    Unknown_namespace = TEXT;
                    351:        
1.1       vatton    352: EXCEPT
                    353: 
                    354:    SVG:                 IsDraw, MoveResize, NoMove;
                    355:    g:                   NoMove, NoResize, HighlightChildren, NoShowBox,
                    356:                         NoCreate;
                    357:    defs:                NoMove, NoResize, NoShowBox, NoCreate;
                    358:    rect:                MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    359:    circle:              MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    360:    ellipse:             MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    361:    line_:               MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    362:    polyline:            MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    363:    polygon:             MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    364:    path:               MoveResize, HighlightChildren, NoShowBox, NoCreate;
                    365:    text_:               MoveResize, NoResize, NoShowBox, ReturnCreateWithin,
                    366:                        NoCreate;
                    367:    tspan:              NoShowBox; 
                    368:    use_:               NoMove, NoResize, HighlightChildren, NoShowBox,
                    369:                        NoCreate;
                    370:    image:              MoveResize, HighlightChildren, NoShowBox;
                    371:    symbol_:            NoMove, NoResize,  HighlightChildren,NoShowBox,
                    372:                         NoCreate;
                    373:    a:                  NoMove, NoResize, HighlightChildren, NoShowBox,
                    374:                         NoCreate;
                    375:    script:             NoMove, NoResize, NoShowBox, NoCreate;
                    376:    style__:             NoMove, NoResize, NoShowBox, NoCreate;
1.4       cvs       377:    switch:              NoMove, NoResize, NoShowBox, NoCreate;
1.1       vatton    378:    foreignObject:       MoveResize, HighlightChildren, NoCreate;
1.4       cvs       379:    SVG_Image:           Hidden, SelectParent;
1.1       vatton    380:    GRAPHICS:           SelectParent;
                    381:    PICTURE:             NoMove, NoResize, SelectParent;
                    382:    TEXT:                NoMove, NoResize;
1.2       cvs       383:    Unknown_namespace:   NoCreate;
1.1       vatton    384: 
                    385:    id:                  CssId;
                    386:    class:               CssClass;
                    387:    PseudoClass:                Invisible, CssPseudoClass;
1.2       cvs       388:    Unknown_attribute:   Invisible;
1.1       vatton    389:    Highlight:          Invisible; 
                    390:    Ghost_restruct:      Invisible;
                    391:    Namespace:          Invisible;
                    392:    IntEmptyShape:       Invisible;
                    393: 
                    394: END
                    395: 
                    396: 
                    397: 

Webmaster