view xsls/security.xsls @ 71:c007b57d617c

The first line indentation in a paragraph which is used in Russian typographics isn't common for other languages. In HTML, even with Russian contents, paragraphs are usually separated with a vertical interval without the first line indentation. We will be following this convention as well.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 10 Oct 2011 08:23:43 +0000
parents 61e04fc01027
children ee725af08951
line wrap: on
line source

X:stylesheet {

X:output method="html" indent="no" encoding="utf-8";

X:strip-space elements = "*";

<!--
  -- a current directory of a XSLT script is where the script is stored,
  -- but not where XSLT processor has been started to run the script
  -->
X:param XML = "'../xml'";
X:param YEAR;

X:var LINK = "/article/@link";

X:include href = "dirname.xslt";
X:include href = "link.xslt";
X:include href = "style.xslt";
X:include href = "body.xslt";
X:include href = "menu.xslt";
X:include href = "content.xslt";


X:template = "/article" {
    <html><head>

    <title> !{@title} </title>

    !style ()

    </head>

    !body (lang="/article/@lang")

    </html>
}


X:template = "security" { <ul> !!; </ul> }


X:template = "security/item" {

    <li>
    <p>

    !{@title}<br/>

    X:if "@severity = 'major'" {
        X:text{Severity: } <b>!{@severity}</b><br/>
    } else {
        X:text{Severity: } !{@severity}<br/>
    }

    X:if "@cert" {
        <a>
        X:attribute "href" {
            X:text {http://www.kb.cert.org/vuls/id/} !{@cert}
        }
        X:text {VU#} !{@cert}
        </a>
    }

    X:if "@cve" {
        X:if "@cert" {
            X:text {&#xA0;&#xA0;}
        }
        <a>
        X:attribute "href" {
            X:text {http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-} !{@cve}
        }
        X:text {CVE-} !{@cve}
        </a>
    }

    X:if "@core" {
        X:if "@cert or @cve" {
            X:text {&#xA0;&#xA0;}
        }
        <a href="{@href}"> !{@core} </a>
    }

    X:if "@cert or @cve or @core" {
        <br/>
    }

    X:text {Not vulnerable: } !{@good} <br/>
    X:text {Vulnerable: } !{@vulnerable} <br/>

    X:if "@patch" {
        <a>
        X:attribute "href" {
            X:text {/download/} !{@patch}
        }
        X:text {The patch}
        </a>

        X:text {&#xA0;&#xA0;}

        <a>
        X:attribute "href" {
            X:text {/download/} !{@patch} X:text {.asc}
        }
        X:text {pgp}
        </a>
    }

    </p>
    </li>
}


}