view xsls/style.xsls @ 1009:135920b5c61d

Marked strings with entities in japanese translation as literal. This allows to preserve information and produce correct output if the XML parser expands entities on input. The markup is similar to english and russian versions of the document.
author Vladimir Homutov <vl@nginx.com>
date Mon, 11 Nov 2013 11:54:16 +0400
parents 8af7fe0794b0
children 2d49e9ef39c3
line wrap: on
line source

<!--
  Copyright (C) Igor Sysoev
  Copyright (C) Nginx, Inc.
  -->

X:stylesheet {

X:template style (lang) {

    <style type="text/css">!{ normalize-space('
        body              { font-family:    Georgia, serif; }
        p                 { text-align:     justify; }
        table.news p      { margin-top:     0; }
        table.news td     { vertical-align: baseline; }
        table.news .date  { text-align:     right;
                            padding-right:  0.5em;
                            white-space:    nowrap; }
        table.donors td   { vertical-align: baseline; }
        table.donors li   { text-align:     left; }
        div.directive     { background:     #EEEEEE;
                            padding:        10pt 10pt 10pt 0; }
        div.directive td  { vertical-align: baseline; }
        div.directive pre { padding:        0;
                            margin:         0; }
        div.directive p   { margin:         5pt 0 0 0;
                            font-size:      80%; }
        div#banner        { background:     #EEEEEE;
                            padding:        10pt 10pt 10pt 0; }
        a.notrans         { color:          gray;
                            text-decoration:none; }
        span.initial      { font-size:      200%;
                            float:          left;
                            padding-right:  10pt;}
        li                { text-align:     justify;
                            padding-top:    0.5em; }
        .compact li       { padding-top:    0; }
        dt                { padding-top:    0.5em; }
        .compact dt       { padding-top:    0; }
        dd                { text-align:     justify; }
        td.list           { background:     #EEEEEE; }
        blockquote.note   { text-align:     justify;
                            background:     #EEEEEE;
                            border:         none;
                            margin:         1em;
                            padding:        0.5em; }
        blockquote.example {
                            background:     transparent;
                            border:         none;
                            margin:         1em;
                            padding:        0.5em; }
        blockquote.example pre {
                            padding:        0;
                            margin:         0; }
        sup               { font-size:      50%; }
        ') }

    X:if "$lang = 'he'" {
        !{ normalize-space('
        pre               { text-align:     left;
                            direction:      ltr; }
        code              { direction:      ltr;
                            unicode-bidi:   embed; }
        .ltr              { direction:      ltr;
                            unicode-bidi:   embed; }
        ') }
    }

    X:if "$lang = 'cn'" {
        !{ normalize-space('
        p                 { text-align:     left; }
        li                { text-align:     left; }
        dd                { text-align:     left; }
        blockquote.note   { text-align:     left; }
        ') }
    }

    </style>
}

}