! Use of the transformation files (extension .trans)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! These files can be edited during a Thot session. They will be
! dynamically parsed when the transformation tool is required by
! the editor. So new transformations can be added while editing.
! Each file describes the transformation for the elements defined
! in the structure schema having the same name (Paragraphe.trans
! are the transformations for Paragraph elements defined in
! Paragraphe.S)
!
! Syntax of the transformation language
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! comments begin with !
!
! The file is a list of transformation rules, describing the context
! in wich the transformation is appliable, and rules to drive the
! transformation of context-matched elements.
!
! A tranformation rule has four parts :
! TransRule :== 'TRANS' Name ';'
! ['USES' Name < ',' Name ',' > ';' ] ! 'PATTERN' Pattern ';' ! 'RULES' Rule ';' <Rule ';'> ! 'END' ! ! - the name of the transformation; ! - the external structure schemas used in definition ! - a source pattern for the contexte and structure definition ! - and a list of rules each one terminated by a semi-colon ";"
!
! The name will appear in the transform menu.
!
! The pattern gives of a specific organization of the elements
! to be transformed: it contains type name (as they are defined in S schema)
! and SGML-like syntax
! for the composition operators:
! | for choice ! , for sibling ! + for sequence ! ? for option ! ( ) for grouping nodes
! The braces "{" "}" define the content of a node.
! The symbol "" is a token that matches any element type
! It is possible to rename a tag by preceeding it with a name
! followed by a colon ":"
!
! A rule expresses transformations to be applied to the elements
! identified in the pattern.
! A rule has two parts separated by the symbol ">":
! - a source tag
! - and a target tag list. This list is itself divided into
! two parts separated by a colon":":
!
the generation location path
! * and the list of tags to be generated
! The dot symbol "." is used for descending in the tree structure.
! if the special token star "*" ends the list of tags to be
! generated, the source elment tag is not changed but this element
! can be moved in a different place in the destination.
!
! Stephane.Bonhomme@inrialpes.fr - Oct. 1997
