Diff for /Amaya/amaya/HTML.trans between versions 1.25 and 1.26

version 1.25, 1999/12/07 16:12:21 version 1.26, 1999/12/23 10:12:38
Line 64 Line 64
 ! Transformation rules   ! Transformation rules 
 !!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!
   
 Address:(P{*+})+;  Address:(p{*+})+;
         {          {
         * > ADDRESS:*;          * > address:*;
         }          }
   
 !between lists  !between lists
 !!!!!!!!!!!!!!  !!!!!!!!!!!!!!
   
 Definition list:*{(LI{(list:*{(li2:LI)+}|other:*)+})+};  Definition list:*{(li{(list:*{(li2:li)+}|other:*)+})+};
         {          {
         other > DL:DT;          other > dl:dt;
         list > DL:DD;          list > dl:dd;
         li2 > DL.DD:;          li2 > dl.dd:;
         }          }
   
 Bulleted list:(DL{(DT|DD{(*)+})+})+;  Bulleted list:(dl{(dt|dd{(*)+})+})+;
         {          {
         DT > UL:LI;          dt > ul:li;
         * > UL.LI.UL:LI.*;          * > ul.li.ul:li.*;
         }          }
   
 Numbered list:(DL{(DT|DD{(*)+})+})+;  Numbered list:(dl{(dt|dd{(*)+})+})+;
         {          {
         DT > OL:LI;          dt > ol:li;
         * > OL.LI.OL:LI.*;          * > ol.li.ol:li.*;
         }          }
   
 Remove DL: (DL{(DT{(dtc:*)+}|DD{(ddc:*)+})+})+;  Remove dl: (dl{(dt{(dtc:*)+}|dd{(ddc:*)+})+})+;
         {          {
          dtc > :<* style="font-weight:bold">;           dtc > :<* style="font-weight:bold">;
          ddc > :*;           ddc > :*;
Line 101  Remove DL: (DL{(DT{(dtc:*)+}|DD{(ddc:*)+ Line 101  Remove DL: (DL{(DT{(dtc:*)+}|DD{(ddc:*)+
 !!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!
   
 Paragraphs:   Paragraphs: 
 (H1|H2|H3|H4|H5|H6|*{(LI{(il:*)+})+}),(H1|H2|H3|H4|H5|H6|P|*{(LI{(il:*)+})+})+;  (h1|h2|h3|h4|h5|h6|*{(li{(il:*)+})+}),(h1|h2|h3|h4|h5|h6|p|*{(li{(il:*)+})+})+;
         {           { 
         H1 > :P;          h1 > :p;
         H2 > :P;          h2 > :p;
         H3 > :P;          h3 > :p;
         H4 > :P;          h4 > :p;
         H5 > :P;          h5 > :p;
         H6 > :P;          h6 > :p;
         P > :P;          p > :p;
         il > :P;          il > :p;
         }          }
   
 ! Preformatted to/from paragraphs  ! Preformatted to/from paragraphs
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   
 !Preformatted: P+;  !Preformatted: p+;
 !       {  !       {
 !       P>:PRE;  !       p>:pre;
 !       }  !       }
   
 !Paragraph: PRE+;  !Paragraph: pre+;
 !       {  !       {
 !       PRE>:P;  !       pre>:p;
 !       }  !       }
   
   
   
   
 !Tables to/from lists  !Tables to/from lists
 !!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!
   
 Table: *{(lev1:LI{?(*{(lev2:LI)+}|elem:*)+})+};  Table: *{(lev1:li{?(*{(lev2:li)+}|elem:*)+})+};
         {          {
         lev1 > <TABLE border=1>:TR;          lev1 > <table border="1">:tr;
         elem > TABLE.TR:TD.*;          elem > table.tr:td.*;
         lev2 > TABLE.TR:TD;          lev2 > table.tr:td;
         }          }
   
 Table: DL{(DT|DD)+};  Table: dl{(dt|dd)+};
         {          {
         DT > <TABLE border=1>.TBODY:TR.TD;          dt > <table border="1">.tbody:tr.td;
         DD > TABLE.TBODY.TR:TD;          dd > table.tbody.tr:td;
         }          }
   
 Numbered List:TABLE{?CAPTION,(block:*{(TR{(TD|TH),?(TD2:TD|TH2:TH)+})+})+};  Numbered List:table{?caption,(block:*{(tr{(td|th),?(td2:td|th2:th)+})+})+};
         {          {
         CAPTION > :OL.LI.STRONG;          caption > :ol.li.strong;
         block > :OL;          block > :ol;
         TR > OL:LI;          tr > ol:li;
         TD > OL.LI:;          td > ol.li:;
         TH > OL.LI:;          th > ol.li:;
         TD2 >OL.LI.UL:LI;          td2 >ol.li.ul:li;
         TH2 >OL.LI.UL:LI;          th2 >ol.li.ul:li;
         }          }
   
 Bulleted List:TABLE{?CAPTION,(block:*{(TR{(TD|TH),?(TD2:TD|TH2:TH)+})+})+};  Bulleted List:table{?caption,(block:*{(tr{(td|th),?(td2:td|th2:th)+})+})+};
         {          {
         CAPTION > :UL.LI.STRONG;          caption > :ul.li.strong;
         block > :UL;          block > :ul;
         TR > UL:LI;          tr > ul:li;
         TD > UL.LI:;          td > ul.li:;
         TH > UL.LI:;          th > ul.li:;
         TD2 >UL.LI.UL:LI;          td2 >ul.li.ul:li;
         TH2 >UL.LI.UL:LI;          th2 >ul.li.ul:li;
         }          }
 Definition List:TABLE{?CAPTION,(block:*{(TR{(TD|TH),?(TD2:TD|TH2:TH)+})+})+};  Definition List:table{?caption,(block:*{(tr{(td|th),?(td2:td|th2:th)+})+})+};
         {          {
         CAPTION > :DL.DT;          caption > :dl.dt;
         block   > :DL;          block   > :dl;
         TD      > DL:DT;          td      > dl:dt;
         TH      > DL:DT;          th      > dl:dt;
         TD2     > DL:DD;          td2     > dl:dd;
         TH2     > DL:DD;          th2     > dl:dd;
         }          }
   
 ! List transformations  ! List transformations
 !!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!
   
 Remove one level: *{(LI{(cont:*)+})+};  Remove one level: *{(li{(cont:*)+})+};
         {          {
         cont > :*;          cont > :*;
         }          }
   
 Remove two levels: *{(LI{(*{?(LI{(Lev2:*)+})+})+})+};  Remove two levels: *{(li{(*{?(li{(lev2:*)+})+})+})+};
         {          {
         Lev2 > :*;          lev2 > :*;
         }          }
   
 Merge Items: LI,(LI2:LI)+;  Merge Items: li,(li2:li)+;
         {          {
         LI > LI:;          li > li:;
         LI2 > LI:;          li2 > li:;
         }          }
 Remove Paragraph level: LI{P{(cont:*)+},?(next:*)+};  Remove Paragraph level: li{p{(cont:*)+},?(next:*)+};
         {          {
         LI > LI:;          li > li:;
         cont > *;          cont > *;
         next > *;          next > *;
         }          }
   
 Split Items: (LI{a:*,(b:*)+})+;  Split Items: (li{a:*,(b:*)+})+;
         {          {
         a > :LI.*;          a > :li.*;
         b > :LI.*;          b > :li.*;
         }          }
   
 Merge Lists: UL{LI+},(UL{LI+})+;  Merge Lists: ul{li+},(ul{li+})+;
         {          {
         LI > UL:LI;          li > ul:li;
         }          }
   
 Merge Lists: OL{LI+},(OL{LI+})+;  Merge Lists: ol{li+},(ol{li+})+;
         {          {
         LI > OL:LI;          li > ol:li;
         }          }
   
 Merge Lists: DL{(DT|DD)+},(DL{(DT|DD)+})+;  Merge Lists: dl{(dt|dd)+},(dl{(dt|dd)+})+;
         {          {
         DT > DL:DT;          dt > dl:dt;
         DD > DL:DD;          dd > dl:dd;
         }          }
   
 ! Forms to/from elements  ! Forms to/from elements
Line 231  Form: *+; Line 229  Form: *+;
         *>Form:*;          *>Form:*;
         }          }
   
 Remove Form: FORM{*+};  Remove Form: form{*+};
         {          {
         *>:*;          *>:*;
         }          }
   
 Remove submenu: (OPTGROUP{*+})+;  Remove submenu: (optgroup{*+})+;
         {          {
         * > :*;          * > :*;
         }          }
Line 244  Remove submenu: (OPTGROUP{*+})+; Line 242  Remove submenu: (OPTGROUP{*+})+;
 ! Lists to/from elements  ! Lists to/from elements
 !!!!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!!!
   
 Bulleted list: (P|OL|MENU|DIR|PRE|FORM)+;  Bulleted list: (p|ol|menu|dir|pre|form)+;
         {          {
         P > UL:<LI style=P.style>;          p > ul:<li style=p.style>;
         OL> UL;          ol> ul;
         MENU> UL:LI.MENU;          menu> ul:li.menu;
         DIR> UL:LI.DIR;          dir> ul:li.dir;
         PRE> UL:LI.PRE;          pre> ul:li.pre;
         FORM> UL:LI.FORM;          form> ul:li.form;
         }          }
   
 Numbered list:(P|UL|MENU|DIR|PRE|FORM)+;  Numbered list:(p|ul|menu|dir|pre|form)+;
            {             {
         P > OL:LI;          p > ol:li;
         UL> OL;          ul> ol;
         MENU> OL:LI.MENU;          menu> ol:li.menu;
         DIR> OL:LI.DIR;          dir> ol:li.dir;
         PRE> OL:LI.PRE;          pre> ol:li.pre;
         FORM> OL:LI.FORM;          form> ol:li.form;
         }          }
   
 ! Tables to/from elements  ! Tables to/from elements
 !!!!!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!!!!
   
 !Table: (H:H1|H:H2|H:H3|H:H4|H:H5|H:H6|P),(H:H1|H:H2|H:H3|H:H4|H:H5|H:H6|*)+;  !Table: (h:h1|h:h2|h:h3|h:h4|h:h5|h:h6|p),(h:h1|h:h2|h:h3|h:h4|h:h5|h:h6|*)+;
 !       {  !       {
 !       P> <TABLE border=1>.TR.TD:P;  !       p> <table border="1">.tr.td:p;
 !       H> <TABLE border=1>:TR.TD.*;  !       h> <table border="1">:tr.td.*;
 !       *> <TABLE border=1>.TR:TD.*;  !       *> <table border="1">.tr:td.*;
 !       }  !       }
   
   
 Vertical Table: *+;  Vertical Table: *+;
         {          {
         *><TABLE border=1>:TR.TD.*;          *><table border="1">:tr.td.*;
         }          }
   
 Horizontal Table : *+;  Horizontal Table : *+;
         {          {
         *><TABLE border=1>.TR:TD.*;          *><table border="1">.tr:td.*;
         }          }
   
 Remove Table:TABLE{?CAPTION,?(body:*{(TR{(*{(?cell_content:*)+})+})+})+};  Remove Table:table{?caption,?(body:*{(tr{(*{(?cell_content:*)+})+})+})+};
         {          {
         CAPTION>H3;          caption>h3;
         cell_content>:*;          cell_content>:*;
         }          }
   
 Transpose Table:TABLE{TBODY{TR{(TD|TH)+}|(TR{td2:TD|th2:TH})+}};  Transpose Table:table{tbody{tr{(td|th)+}|(tr{td2:td|th2:th})+}};
         {          {
         TD><TABLE BORDER=TABLE.BORDER>:TR.TD;          td><table border=table.border>:tr.td;
         TH>TABLE:TR.TD;          th>table:tr.td;
         td2><TABLE BORDER=TABLE.BORDER>.TR:TD;          td2><table border=table.border>.tr:td;
         th2>TABLE.TR:TD;          th2>table.tr:td;
         }          }
   
 Heading Cell :?(TD|TH)+,TD,?(TD|TH)+;  Heading Cell :?(td|th)+,td,?(td|th)+;
         {          {
         TD>:TH;          td>:th;
         }          }
   
 Data Cell :?(TD|TH)+,TH,?(TD|TH)+;  Data Cell :?(td|th)+,th,?(td|th)+;
         {          {
         TH>:TD;          th>:td;
         }          }
   
 !headings to/from definitions  !headings to/from definitions
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   
 Definition list:((H1|H2|H3|H4|H5|H6),*+)+;  Definition list:((h1|h2|h3|h4|h5|h6),*+)+;
         {          {
         H1 > DL:DT;          h1 > dl:dt;
         H2 > DL:DT;          h2 > dl:dt;
         H2 > DL:DT;          h2 > dl:dt;
         H3 > DL:DT;          h3 > dl:dt;
         H4 > DL:DT;          h4 > dl:dt;
         H5 > DL:DT;          h5 > dl:dt;
         H6 > DL:DT;          h6 > dl:dt;
         * > DL.DD:*;          * > dl.dd:*;
         }          }
   
   
 Definition list:(H1,?HR,?(level1:*)+,?(H2,?(level2:*)+,?((H3|H4|H5|H6),(level3:*)+)+)+)+;  Definition list:(h1,?hr,?(level1:*)+,?(h2,?(level2:*)+,?((h3|h4|h5|h6),(level3:*)+)+)+)+;
         {          {
         H1 > DL:DT;          h1 > dl:dt;
         level1>DL.DD:*;          level1>dl.dd:*;
         H2 > DL.DD:DL.DT ;          h2 > dl.dd:dl.dt ;
         level2 > DL.DD.DL.DD:*;          level2 > dl.dd.dl.dd:*;
         H3 > DL.DD.DL.DD:DL.DT ;          h3 > dl.dd.dl.dd:dl.dt ;
         H4 > DL.DD.DL.DD:DL.DT ;          h4 > dl.dd.dl.dd:dl.dt ;
         H5 > DL.DD.DL.DD:DL.DT ;          h5 > dl.dd.dl.dd:dl.dt ;
         H6 > DL.DD.DL.DD:DL.DT ;          h6 > dl.dd.dl.dd:dl.dt ;
         level3 > DL.DD.DL.DD.DL.DD:*;          level3 > dl.dd.dl.dd.dl.dd:*;
         }          }
   
 Definition list:(H2,?HR,?(level1:*)+,(H3,?(level2:*)+,((H4|H5|H6),(level3:*)+)+)+)+;  Definition list:(h2,?hr,?(level1:*)+,(h3,?(level2:*)+,((h4|h5|h6),(level3:*)+)+)+)+;
         {          {
         H2 > DL:DT;          h2 > dl:dt;
         level1>DL.DD:*;          level1>dl.dd:*;
         H3 > DL.DD:DL.DT ;          h3 > dl.dd:dl.dt ;
         level2 > DL.DD.DL.DD:*;          level2 > dl.dd.dl.dd:*;
         H4 > DL.DD.DL.DD:DL.DT ;          h4 > dl.dd.dl.dd:dl.dt ;
         H5 > DL.DD.DL.DD:DL.DT ;          h5 > dl.dd.dl.dd:dl.dt ;
         H6 > DL.DD.DL.DD:DL.DT ;          h6 > dl.dd.dl.dd:dl.dt ;
         level3 > DL.DD.DL.DD.DL.DD:*;          level3 > dl.dd.dl.dd.dl.dd:*;
         }          }
   
   
   
 Definition list:(H3,?HR,?(level1:*)+,?(H4,?(level2:*)+,((H5|H6),(level3:*)+)+)+)+;  Definition list:(h3,?hr,?(level1:*)+,?(h4,?(level2:*)+,((h5|h6),(level3:*)+)+)+)+;
         {          {
         H3 > DL:DT;          h3 > dl:dt;
         level1>DL.DD:*;          level1>dl.dd:*;
         H4 > DL.DD:DL.DT ;          h4 > dl.dd:dl.dt ;
         level2 > DL.DD.DL.DD:*;          level2 > dl.dd.dl.dd:*;
         H5 > DL.DD.DL.DD:DL.DT ;          h5 > dl.dd.dl.dd:dl.dt ;
         H6 > DL.DD.DL.DD:DL.DT ;          h6 > dl.dd.dl.dd:dl.dt ;
         level3 > DL.DD.DL.DD.DL.DD:*;          level3 > dl.dd.dl.dd.dl.dd:*;
         }          }
   
 Multi level Definition list:(H4,?HR,?(level1:*)+,(H5,?(level2:*)+,((H6)+,(level3:*)+)+)+)+;  Multi level Definition list:(h4,?hr,?(level1:*)+,(h5,?(level2:*)+,((h6)+,(level3:*)+)+)+)+;
         {          {
         H4 > DL:DT;          h4 > dl:dt;
         level1>DL.DD:*;          level1>dl.dd:*;
         H5 > DL.DD:DL.DT ;          h5 > dl.dd:dl.dt ;
         level2 > DL.DD.DL.DD:*;          level2 > dl.dd.dl.dd:*;
         H6 > DL.DD.DL.DD:DL.DT ;          h6 > dl.dd.dl.dd:dl.dt ;
         level3 > DL.DD.DL.DD.DL.DD:*;          level3 > dl.dd.dl.dd.dl.dd:*;
         }          }
   
   
   
 Headings H1:(DL{(dt1:DT|DD{(DL{(dt2:DT|DD{(DL{(dt3:DT|DD{content:*})+}|content:*)+})+}|content:*)+})+}|HR)+;  Headings h1:(dl{(dt1:dt|dd{(dl{(dt2:dt|dd{(dl{(dt3:dt|dd{content:*})+}|content:*)+})+}|content:*)+})+}|hr)+;
         {          {
         dt1 > :H1;          dt1 > :h1;
         dt2 > :H2;          dt2 > :h2;
         dt3 > :H3;          dt3 > :h3;
         content > :*;          content > :*;
         }          }
   
 Headings H2:(DL{(dt1:DT|DD{(DL{(dt2:DT|DD{(DL{(dt3:DT|DD{content:*})+}|content:*)+})+}|content:*)+})+}|HR)+;  Headings h2:(dl{(dt1:dt|dd{(dl{(dt2:dt|dd{(dl{(dt3:dt|dd{content:*})+}|content:*)+})+}|content:*)+})+}|hr)+;
         {          {
         dt1 > :H2;          dt1 > :h2;
         dt2 > :H3;          dt2 > :h3;
         dt3 > :H4;          dt3 > :h4;
         content > :*;          content > :*;
         }          }
   
   
 Headings H3:(DL{(dt1:DT|DD{(DL{(dt2:DT|DD{(DL{(dt3:DT|DD{content:*})+}|content:*)+})+}|content:*)+})+}|HR)+;  Headings h3:(dl{(dt1:dt|dd{(dl{(dt2:dt|dd{(dl{(dt3:dt|dd{content:*})+}|content:*)+})+}|content:*)+})+}|hr)+;
         {          {
         dt1 > :H3;          dt1 > :h3;
         dt2 > :H4;          dt2 > :h4;
         dt3 > :H5;          dt3 > :h5;
         content > :*;          content > :*;
         }          }
   
 Definition list: P,*+;  Definition list: p,*+;
         {          {
         P > DL:DT;          p > dl:dt;
         * > DL.DD:*;          * > dl.dd:*;
         }          }
   
 Remove Div: (DIV{*+})+;  Remove Div: (div{*+})+;
         {          {
         * > :*;          * > :*;
         }          }
   
 Remove Center: (CENTER{*+})+;  Remove Center: (center{*+})+;
         {          {
         * > :*;          * > :*;
         }          }
   
 Remove Paragraph level: P{IMG};  Remove Paragraph level: p{img};
         {          {
         IMG > :*;          img > :*;
         }          }
   
 Remove BlockQuote: BLOCKQUOTE{*+};  Remove BlockQuote: blockquote{*+};
         {          {
         * > :*;          * > :*;
         }          }
   
 Remove FONT: FONT{*+};  Remove font: font{*+};
         {          {
         * > :*;          * > :*;
         }          }
   
 Remove SPAN: SPAN{*+};  Remove span: span{*+};
         {          {
         *>:*;          *>:*;
         }          }
   
 Remove Subscript: SUB{*+};  Remove Subscript: sub{*+};
         {          {
         * > :*;          * > :*;
         }          }
                   
 Remove Superscript: SUP{*+};  Remove Superscript: sup{*+};
         {          {
         * > :*;          * > :*;
         }          }
                   
 Remove Quotation: Q{*+};  Remove Quotation: q{*+};
         {          {
         * > :*;          * > :*;
         }          }
   
 Remove BiDi: BDO{*+};  Remove BiDi: bdo{*+};
         {          {
         * > :*;          * > :*;
         }          }
Line 460  Remove BiDi: BDO{*+}; Line 458  Remove BiDi: BDO{*+};
 ! Global Document transformation tests !  ! Global Document transformation tests !
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   
 DistrThot: BODY{*+}  DistrThot: body{*+}
         {          {
         BODY >  <TABLE border=0 with="100%">.TBODY.TR.<TD with="30%">.<A href="http://opera.inrialpes.fr/OPERA/Thot.en.html"><IMG src="thot.gif" alt="Thot Editor" border=0 align="middle">;          body >  <table border="0" with="100%">.tbody.tr.<td with="30%">.<a href="http://opera.inrialpes.fr/OPERA/Thot.en.html"><img src="thot.gif" alt="Thot Editor" border="0" align="middle">;
         BODY > TABLE.TBODY.TR.TD:<A href = "http://opera.inrialpes.fr">.<IMG src="opera.gif" alt="Opera project" border=0 align="middle">;          body > table.tbody.tr.td:<a href="http://opera.inrialpes.fr">.<img src="opera.gif" alt="Opera project" border="0" align="middle">;
         BODY > TABLE.TBODY.TR:TD.<IMG src="guide.gif" alt="Documentation" border=0 align="middle">;          body > table.tbody.tr:td.<img src="guide.gif" alt="Documentation" border="0" align="middle">;
         BODY > TABLE.TBODY.TR.TD:H1."Title of the page";          body > table.tbody.tr.td:h1."Title of the page";
         BODY > :<TABLE border=0 with="100%">.TBODY.TR.<TD with="30%">.H2.<A href="Index.html">."Home";          body > :<table border="0" with="100%">.tbody.tr.<td with="30%">.h2.<a href="Index.html">."Home";
         * > TABLE.TBODY.TR:TD.*;          * > table.tbody.tr:td.*;
         }          }
   

Removed from v.1.25  
changed lines
  Added in v.1.26


Webmaster