Salome HOME
bos #26458 Versioning of sources via git commit id (sha1)
[modules/yacs.git] / doc / opml.xslt
1 <?xml version="1.0" encoding="ISO-8859-1"?>\r
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">\r
3 <xsl:output method = "html" version = "4.0" encoding="ISO-8859-1" indent = "no" />\r
4 <xsl:strip-space elements = "*" />\r
5 \r
6 <xsl:variable name="markerNormal">&#9658;</xsl:variable>\r
7 <xsl:variable name="markerComment">&#8810;</xsl:variable>\r
8 <xsl:variable name="markerLink">&#9788;</xsl:variable>\r
9 \r
10 <xsl:template match = "/opml" >\r
11 <html>\r
12   <script language="JavaScript" src="http://www.netcrucible.com/xslt/opml.js" />\r
13   <link rel="stylesheet" href="http://www.netcrucible.com/xslt/opml.css" />\r
14   <head><title><xsl:value-of select="head/title" /></title></head>\r
15   <body>\r
16     <div id="outlineRoot" class="outlineRoot">\r
17         <xsl:for-each select="head/*" >\r
18         <span class="outlineAttribute" title="{name()}"><xsl:value-of select="." /></span>\r
19         </xsl:for-each>\r
20         <xsl:apply-templates select="body"/>\r
21     </div>\r
22     <span id="markerNormal" style="display:none"><xsl:value-of select="$markerNormal" /></span>\r
23     <span id="markerComment" style="display:none"><xsl:value-of select="$markerComment" /></span>\r
24     <span id="markerLink" style="display:none"><xsl:value-of select="$markerLink" /></span>\r
25   </body>\r
26 </html>\r
27 </xsl:template>\r
28 \r
29 <xsl:template match = "outline" >\r
30   <div class="outline">\r
31        <xsl:attribute name="style">\r
32          <xsl:if test="parent::outline">display:none</xsl:if>       \r
33        </xsl:attribute>\r
34        <xsl:for-each select="@*[name() !='text']" >\r
35        <span class="outlineAttribute" title="{name()}"><xsl:value-of select="." /></span>\r
36        </xsl:for-each>\r
37        <span>\r
38             <xsl:attribute name="class">\r
39               <xsl:choose>\r
40                 <xsl:when test="./*">markerClosed</xsl:when>\r
41                 <xsl:when test="contains(@url,'.opml') or contains(@url,'.OPML')">markerClosed</xsl:when>\r
42                 <xsl:otherwise>markerOpen</xsl:otherwise>\r
43               </xsl:choose>\r
44             </xsl:attribute>\r
45             <xsl:choose>\r
46                 <xsl:when test="@isComment = 'true'"><xsl:value-of select="$markerComment" /></xsl:when>\r
47                 <xsl:when test="@type = 'link' and not(contains(@url,'.opml') or contains(@url,'.OPML'))"><xsl:value-of select="$markerLink" /></xsl:when>\r
48                 <xsl:otherwise><xsl:value-of select="$markerNormal" /></xsl:otherwise>\r
49             </xsl:choose>\r
50        </span>\r
51        <span class="outlineText">\r
52        <xsl:value-of select = "@text" disable-output-escaping = "yes" /></span>\r
53        <xsl:apply-templates />\r
54   </div>\r
55 </xsl:template>\r
56 \r
57 </xsl:stylesheet>\r