homepage.en.yhtml2
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 28 Apr 2021 23:40:51 +0200
changeset 78 0b05c2bce9e4
parent 0 76005e62091d
permissions -rw-r--r--
Fix expension of macros in pointers with default values.

For example :

in xsl decl widget_class(%name, *clsname="%nameWidget", match="widget[@type='%name']", mode="widget_class") alias template {
| class `text **clsname` extends Widget{
content;
| }
};

widget_class('Input');

gives now :

<xsl:template match="widget[@type='Input']" mode="widget_class">
<xsl:text>class </xsl:text>
<xsl:text>InputWidget</xsl:text>
<xsl:text> extends Widget{
</xsl:text>
<xsl:text>}
</xsl:text>
</xsl:template>

Without the fix, <xsl:text>InputWidget</xsl:text> would be <xsl:text>%nameWidget</xsl:text>
0
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     3
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     4
decl pageContent alias body {
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     5
    a name=top;
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     6
    include heading.en.yhtml2;
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     7
    div id=entries
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     8
        content;
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
     9
};
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    10
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    11
decl page(*title, lang="en", xml:lang="en", xmlns="http://www.w3.org/1999/xhtml") alias html {
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    12
    head {
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    13
        title *title;
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    14
        meta http-equiv="Content-Type", content="text/html;charset=UTF-8";
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    15
        link rel=stylesheet, type="text/css", href="format.css";
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    16
    }
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    17
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    18
    pageContent
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    19
        content;
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    20
};
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    21
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    22
define operator "¬\s*(.*?)\s+(.*?)\s*¬" as a href="%1" > %2
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    23
define operator "«(.*?)»" as code > %1
76005e62091d initial commit
Volker Birk <vb@pep-project.org>
parents:
diff changeset
    24
define operator "ƒ(\S+)" as em > %1