messagingappbase/smilparser/SMILdtd/tsrc/ScriptCommands.txt
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 Note that the log file is best viewed by pasting its contents into Word,
       
     2 so that the 'newlines' are properly formatted.
       
     3 
       
     4 The script file is looked for in directory c:\MsgTest\SMIL_DOM and is expected to be called script.txt
       
     5 
       
     6 
       
     7 Script Commands
       
     8 ---------------
       
     9 
       
    10 Create a new DOM tree (document + smil) & make the smil the current element.
       
    11 Command: createdomtree
       
    12 
       
    13 Delete the DOM tree
       
    14 Command: deletedomtree
       
    15 
       
    16 Create an element of a specified type, and add it to the end of the current
       
    17 element’s child list.
       
    18 Command: create <element type> append
       
    19 
       
    20 Create an element of a specified type, and insert it at a numerically defined
       
    21 position in the current element’s child list.
       
    22 Command: create <element type> insert n
       
    23 Use n = -3 for start of list (specified with NULL parameter), and no element to insert.
       
    24 Use n = -2 for start of list (specified with pointer to first child), and no element to insert.
       
    25 Use n = -1 for invalid pointer specifying place to insert.
       
    26 Use n = 0 for start of list (specified with NULL parameter)
       
    27 Use n = 1 for start of list (specified with pointer to first child)
       
    28 Then n = 2 for second child etc.
       
    29 
       
    30 Create an element of a specified type and use it to replace a numerically defined
       
    31 child element in the current element’s child list. Delete the old child.
       
    32 Command: create <element type> replace n
       
    33 Use n = -2 for start of list, and no element to insert.
       
    34 Use n = -1 for invalid pointer specifying child to replace.
       
    35 Use n = 0 for NULL, in place of pointer to child to replace.
       
    36 Use n = 1 for start of list
       
    37 Then n = 2 for second child etc.
       
    38 
       
    39 Remove a child element, defined by a numeric position, in the current element’s
       
    40 list of children. Then delete it.
       
    41 Command: deletechild n
       
    42 Use n = -1 for invalid pointer specifying child to remove.
       
    43 Use n = 0 for NULL, in place of pointer to child to remove.
       
    44 Use n = 1 for start of list
       
    45 Then n = 2 for second child etc.
       
    46 
       
    47 Navigate up the object tree to the current element’s parent.
       
    48 Command: parent
       
    49 
       
    50 Navigate to the element at the root of the DOM tree (smil).
       
    51 Command: rootsmil
       
    52 
       
    53 Navigate to the first child of the current element.
       
    54 Command: firstchild
       
    55 
       
    56 Navigate to the last child of the current element.
       
    57 Command: lastchild
       
    58 
       
    59 Navigate to the next sibling of the current element.
       
    60 Command: nextsibling
       
    61 
       
    62 Navigate to the previous sibling of the current element.
       
    63 Command: prevsibling
       
    64 
       
    65 Navigate to the first child, of specified element type, belonging to the current element.
       
    66 Command: first <element type>
       
    67 
       
    68 Navigate to the last child, of specified element type, belonging to the current element.
       
    69 Command: last <element type>
       
    70 
       
    71 Navigate to the next sibling, of specified element type, from a current
       
    72 element of the same type.
       
    73 Command: next <element type>
       
    74 
       
    75 Navigate to the previous sibling, of specified element type, from a current
       
    76 element of the same type.
       
    77 Command: prev <element type>
       
    78 
       
    79 Set an attribute value of the current element (referring to the attribute by name).
       
    80 Command: setatt <attribute name> "<attribute value>"
       
    81 
       
    82 Get an attribute value of the current element if it is set (referring to the attribute
       
    83 by name).
       
    84 Command: getatt <attribute name>
       
    85 
       
    86 Unset an attribute for the current element (referring to the attribute by name).
       
    87 Command: unsetatt <attribute name>
       
    88 
       
    89 Check the child elements of the current element.
       
    90 Command: legalchildren
       
    91 
       
    92 There are commands to set, display and unset the id attributes of elements using the explicit id attribute
       
    93 access functions.  These commands are provided because they use a different set of routines to the GetAttribute
       
    94 route using a named attribute (they should give the same result as using a named 'id' attribute of course).
       
    95 These commands only use the id attribute because it is commn to all elements (except for meta).  Other atributes are
       
    96 not provided because the test code is slightly cumbersome.
       
    97 
       
    98 Get the current value of the id attribute (or state if it is unset) for the current element.
       
    99 Command: getid
       
   100 
       
   101 Set the current value of the id attribute for the current element.
       
   102 Command: setid<value>
       
   103 
       
   104 Unset the id attribute for the current element.
       
   105 Command: removeid
       
   106