| 1 | |
|---|
| 2 | <!DOCTYPE xsl:stylesheet [ |
|---|
| 3 | <!ENTITY nbsp " "> |
|---|
| 4 | <!ENTITY acute "´"> |
|---|
| 5 | <!ENTITY dotwidth "20"> |
|---|
| 6 | <!ENTITY dotheight "16"> |
|---|
| 7 | <!ENTITY br "
"> |
|---|
| 8 | ]> |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | <!-- used to create ARB help in HTML format --> |
|---|
| 12 | |
|---|
| 13 | <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 14 | version="1.0" |
|---|
| 15 | > |
|---|
| 16 | |
|---|
| 17 | <!-- <xsl:output method="html" encoding="iso-8859-1" indent="no"/>--> |
|---|
| 18 | <xsl:output method="html" indent="no"/> |
|---|
| 19 | |
|---|
| 20 | <xsl:param name="myname"/> |
|---|
| 21 | <xsl:param name="xml_location"/> |
|---|
| 22 | |
|---|
| 23 | <!-- includes --> |
|---|
| 24 | |
|---|
| 25 | <xsl:include href="date.xsl"/> |
|---|
| 26 | |
|---|
| 27 | <xsl:variable name="rootpath"> |
|---|
| 28 | <xsl:choose> |
|---|
| 29 | <xsl:when test="string-length(substring-before($myname,'/'))>0">../</xsl:when> |
|---|
| 30 | <xsl:otherwise></xsl:otherwise> |
|---|
| 31 | </xsl:choose> |
|---|
| 32 | </xsl:variable> |
|---|
| 33 | |
|---|
| 34 | <xsl:variable name="postscriptpath"> |
|---|
| 35 | <xsl:value-of select="$rootpath"/><xsl:text>../help/</xsl:text> |
|---|
| 36 | </xsl:variable> |
|---|
| 37 | <xsl:variable name="pdfpath"><xsl:value-of select="$postscriptpath"/></xsl:variable> |
|---|
| 38 | |
|---|
| 39 | <xsl:variable name="tableBorder">0</xsl:variable> |
|---|
| 40 | |
|---|
| 41 | <xsl:variable name="author">ARB development</xsl:variable> |
|---|
| 42 | <xsl:variable name="maildomain">arb-home.de</xsl:variable> |
|---|
| 43 | |
|---|
| 44 | <xsl:variable name="fontColor">black</xsl:variable> |
|---|
| 45 | <xsl:variable name="backgroundColor">white</xsl:variable> |
|---|
| 46 | <xsl:variable name="linkColor">blue</xsl:variable> |
|---|
| 47 | <xsl:variable name="visitedLinkColor">green</xsl:variable> |
|---|
| 48 | <xsl:variable name="activeLinkColor">red</xsl:variable> |
|---|
| 49 | <xsl:variable name="externalLinkColor">#aa0088</xsl:variable> |
|---|
| 50 | |
|---|
| 51 | <xsl:variable name="lb"><xsl:text>&br;</xsl:text></xsl:variable> <!--used to detect line-breaks in XML--> |
|---|
| 52 | |
|---|
| 53 | <!-- =============== --> |
|---|
| 54 | <!-- warning --> |
|---|
| 55 | <!-- =============== --> |
|---|
| 56 | |
|---|
| 57 | <xsl:template name="error"> |
|---|
| 58 | <xsl:param name="text" select="'Unknown error'"/> |
|---|
| 59 | <xsl:message terminate="yes">Error: <xsl:value-of select="$text"/></xsl:message> |
|---|
| 60 | </xsl:template> |
|---|
| 61 | |
|---|
| 62 | <!-- ============ --> |
|---|
| 63 | <!-- LINKs --> |
|---|
| 64 | <!-- ============ --> |
|---|
| 65 | |
|---|
| 66 | <!--insert-link--> |
|---|
| 67 | <xsl:template name="insert-link"> |
|---|
| 68 | |
|---|
| 69 | <xsl:param name="address"/> |
|---|
| 70 | <xsl:param name="linktext"/> |
|---|
| 71 | |
|---|
| 72 | <xsl:variable name="external"> |
|---|
| 73 | <xsl:choose> |
|---|
| 74 | <xsl:when test="starts-with(substring-before($address,'.arb-home.de/'),'http://')">0</xsl:when><!--all arb-home-subdomains--> |
|---|
| 75 | <xsl:when test="starts-with($address,'http://arb-home.de/')">0</xsl:when> |
|---|
| 76 | <xsl:when test="starts-with($address,'http://')">1</xsl:when> |
|---|
| 77 | <xsl:otherwise>0</xsl:otherwise> |
|---|
| 78 | </xsl:choose> |
|---|
| 79 | </xsl:variable> |
|---|
| 80 | |
|---|
| 81 | <xsl:choose> |
|---|
| 82 | <xsl:when test="$external = 1"> |
|---|
| 83 | <!--if we have an external link -> create popup window--> |
|---|
| 84 | <A href="{$address}" target="_blank"><FONT color="{$externalLinkColor}"><xsl:value-of select="$linktext"/></FONT></A> |
|---|
| 85 | </xsl:when> |
|---|
| 86 | <xsl:otherwise> |
|---|
| 87 | <A href="{$address}"><xsl:value-of select="$linktext"/></A> |
|---|
| 88 | </xsl:otherwise> |
|---|
| 89 | </xsl:choose> |
|---|
| 90 | </xsl:template> |
|---|
| 91 | |
|---|
| 92 | <!--insert-email-link--> |
|---|
| 93 | <xsl:template name="insert-email-link"> |
|---|
| 94 | <xsl:param name="linktext"/> |
|---|
| 95 | <xsl:param name="address" select="arb"/> |
|---|
| 96 | <xsl:param name="subject"/> |
|---|
| 97 | |
|---|
| 98 | <xsl:variable name="add"> |
|---|
| 99 | <xsl:choose> |
|---|
| 100 | <xsl:when test="string-length(substring-before($address,'@'))>0"><xsl:value-of select="$address"/></xsl:when> |
|---|
| 101 | <xsl:otherwise><xsl:value-of select="$address"/>@<xsl:value-of select="$maildomain"/></xsl:otherwise> |
|---|
| 102 | </xsl:choose> |
|---|
| 103 | </xsl:variable> |
|---|
| 104 | <xsl:variable name="addsubj"> |
|---|
| 105 | <xsl:choose> |
|---|
| 106 | <xsl:when test="string-length($subject)>0"><xsl:value-of select="$add"/>?subject=<xsl:value-of select="$subject"/></xsl:when> |
|---|
| 107 | <xsl:otherwise><xsl:value-of select="$add"/></xsl:otherwise> |
|---|
| 108 | </xsl:choose> |
|---|
| 109 | </xsl:variable> |
|---|
| 110 | <A href="mailto:{$addsubj}"> |
|---|
| 111 | <xsl:choose> |
|---|
| 112 | <xsl:when test="string-length($linktext)>0"><xsl:value-of select="$linktext"/></xsl:when> |
|---|
| 113 | <xsl:otherwise><xsl:value-of select="$add"/></xsl:otherwise> |
|---|
| 114 | </xsl:choose> |
|---|
| 115 | </A> |
|---|
| 116 | </xsl:template> |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | <!-- ============================== --> |
|---|
| 120 | <!-- insert document header --> |
|---|
| 121 | <!-- ============================== --> |
|---|
| 122 | <xsl:template name="header" > |
|---|
| 123 | <xsl:param name="title" select="'Untitled'"/> |
|---|
| 124 | <xsl:comment>Generated from XML - XSLT-Stylesheet by Ralf Westram (ralf@arb-home.de) </xsl:comment> |
|---|
| 125 | <HEAD> |
|---|
| 126 | <META NAME="Author" CONTENT="{$author}"/> |
|---|
| 127 | <meta http-equiv="expires" content="86400"/> |
|---|
| 128 | <TITLE>ARB help: <xsl:value-of select="$title"/></TITLE> |
|---|
| 129 | <style type="text/css"> |
|---|
| 130 | <xsl:text> |
|---|
| 131 | div {<!--uncomment for layout fixes--><!-- border:1px solid #ffdddd; --> |
|---|
| 132 | margin-left:+10pt; |
|---|
| 133 | padding-top:3pt; padding-bottom:3pt; |
|---|
| 134 | } |
|---|
| 135 | ul,ol,pre { margin-top:0pt; margin-bottom:0pt; } |
|---|
| 136 | h2.section { background-color: whitesmoke; } |
|---|
| 137 | a.section { color: darkblue; text-decoration:none; } |
|---|
| 138 | tr.shaded, h2.section:target { background-color: #d8edff; } |
|---|
| 139 | h2 { padding:0px; padding-top:6px; padding-top:6px; margin:8px; } |
|---|
| 140 | h3 { font-weight:normal; padding:0px; padding-top:3pt; margin:0px; } |
|---|
| 141 | </xsl:text> |
|---|
| 142 | </style> |
|---|
| 143 | </HEAD> |
|---|
| 144 | </xsl:template> |
|---|
| 145 | |
|---|
| 146 | <!-- ======================== --> |
|---|
| 147 | <!-- link-to-document --> |
|---|
| 148 | <!-- ======================== --> |
|---|
| 149 | <xsl:template name="link-to-document"> |
|---|
| 150 | <xsl:param name="doc"/> |
|---|
| 151 | <xsl:param name="type"/> |
|---|
| 152 | <xsl:param name="missing"/> |
|---|
| 153 | <xsl:param name="quote"/> |
|---|
| 154 | |
|---|
| 155 | <xsl:choose> |
|---|
| 156 | <xsl:when test="$type='ps'"> |
|---|
| 157 | <A href="{concat($postscriptpath,$doc,'.gz')}"> |
|---|
| 158 | <xsl:value-of select="$doc"/> (Postscript) |
|---|
| 159 | </A> |
|---|
| 160 | </xsl:when> |
|---|
| 161 | <xsl:when test="$type='pdf'"> |
|---|
| 162 | <A href="{concat($pdfpath,$doc,'.gz')}"> |
|---|
| 163 | <xsl:value-of select="$doc"/> (PDF) |
|---|
| 164 | </A> |
|---|
| 165 | </xsl:when> |
|---|
| 166 | <xsl:when test="$type='hlp'"> |
|---|
| 167 | <xsl:variable name="docbase"> |
|---|
| 168 | <xsl:value-of select="substring-before($doc,'.hlp')"/> |
|---|
| 169 | </xsl:variable> |
|---|
| 170 | <A href="{concat($rootpath,$docbase)}.html"> |
|---|
| 171 | <xsl:choose> |
|---|
| 172 | <xsl:when test="$missing='1'"> |
|---|
| 173 | <FONT color="red"><xsl:value-of select="concat('Missing Link to ',$doc)"/></FONT> |
|---|
| 174 | </xsl:when> |
|---|
| 175 | <xsl:otherwise> |
|---|
| 176 | <xsl:for-each select="document(concat($xml_location,'/',$docbase,'.xml'))"> |
|---|
| 177 | <xsl:for-each select="PAGE/TITLE"> |
|---|
| 178 | <xsl:if test="$quote='1'">´</xsl:if> |
|---|
| 179 | <xsl:copy-of select="normalize-space(text())"/> |
|---|
| 180 | <xsl:if test="$quote='1'">´</xsl:if> |
|---|
| 181 | </xsl:for-each> |
|---|
| 182 | </xsl:for-each> |
|---|
| 183 | </xsl:otherwise> |
|---|
| 184 | </xsl:choose> |
|---|
| 185 | </A> |
|---|
| 186 | </xsl:when> |
|---|
| 187 | <xsl:otherwise> |
|---|
| 188 | <xsl:call-template name="error"><xsl:with-param name="text">Unhandled document link type '<xsl:value-of select="$type"/>' in link-to-document</xsl:with-param></xsl:call-template> |
|---|
| 189 | </xsl:otherwise> |
|---|
| 190 | </xsl:choose> |
|---|
| 191 | </xsl:template> |
|---|
| 192 | |
|---|
| 193 | <!-- =============== --> |
|---|
| 194 | <!-- uplinks --> |
|---|
| 195 | <!-- =============== --> |
|---|
| 196 | |
|---|
| 197 | <xsl:template match="UP" mode="uplinks"> |
|---|
| 198 | <LI> |
|---|
| 199 | <xsl:call-template name="link-to-document"> |
|---|
| 200 | <xsl:with-param name="doc" select="@dest"/> |
|---|
| 201 | <xsl:with-param name="type" select="@type"/> |
|---|
| 202 | <xsl:with-param name="missing" select="@missing"/> |
|---|
| 203 | </xsl:call-template> |
|---|
| 204 | </LI> |
|---|
| 205 | </xsl:template> |
|---|
| 206 | |
|---|
| 207 | <xsl:template match="*" mode="uplinks"> |
|---|
| 208 | <xsl:call-template name="error"><xsl:with-param name="text">Unwanted match in mode 'uplinks'</xsl:with-param></xsl:call-template> |
|---|
| 209 | </xsl:template> |
|---|
| 210 | |
|---|
| 211 | <!-- ================ --> |
|---|
| 212 | <!-- sublinks --> |
|---|
| 213 | <!-- ================ --> |
|---|
| 214 | |
|---|
| 215 | <xsl:template match="SUB" mode="sublinks"> |
|---|
| 216 | <LI> |
|---|
| 217 | <xsl:call-template name="link-to-document"> |
|---|
| 218 | <xsl:with-param name="doc" select="@dest"/> |
|---|
| 219 | <xsl:with-param name="type" select="@type"/> |
|---|
| 220 | <xsl:with-param name="missing" select="@missing"/> |
|---|
| 221 | </xsl:call-template> |
|---|
| 222 | </LI> |
|---|
| 223 | </xsl:template> |
|---|
| 224 | |
|---|
| 225 | <xsl:template match="*" mode="sublinks"> |
|---|
| 226 | <xsl:call-template name="error"><xsl:with-param name="text">Unwanted match in mode 'sublinks'</xsl:with-param></xsl:call-template> |
|---|
| 227 | </xsl:template> |
|---|
| 228 | |
|---|
| 229 | <!-- =================== --> |
|---|
| 230 | <!-- reflow mode --> |
|---|
| 231 | <!-- =================== --> |
|---|
| 232 | |
|---|
| 233 | <xsl:template match="text()" mode="reflow"> |
|---|
| 234 | <xsl:variable name="normaltext"><xsl:value-of select="normalize-space(.)"/></xsl:variable> |
|---|
| 235 | <xsl:choose> |
|---|
| 236 | <xsl:when test="string-length($normaltext)='0'"></xsl:when><!--skip whitespace-only text-nodes--> |
|---|
| 237 | <xsl:otherwise> |
|---|
| 238 | <xsl:variable name="first"><xsl:value-of select="normalize-space(substring(.,1,1))"/></xsl:variable> |
|---|
| 239 | <xsl:variable name="last"><xsl:value-of select="normalize-space(substring(.,string-length(.)))"/></xsl:variable> |
|---|
| 240 | <xsl:if test="string-length($first)='0'"><!--if text starts with whitespace ..--> |
|---|
| 241 | <xsl:variable name="prevtag"><xsl:copy-of select="name(preceding-sibling::*[1])"/></xsl:variable> |
|---|
| 242 | <xsl:if test="$prevtag='LINK'"><!--.. and preceding-sibling is a LINK -> keep one space--> |
|---|
| 243 | <xsl:text> </xsl:text> |
|---|
| 244 | </xsl:if> |
|---|
| 245 | </xsl:if> |
|---|
| 246 | |
|---|
| 247 | <xsl:value-of select="$normaltext"/> |
|---|
| 248 | |
|---|
| 249 | <xsl:if test="string-length($last)='0'"><!--if text ends with whitespace ..--> |
|---|
| 250 | <xsl:variable name="nexttag"><xsl:copy-of select="name(following-sibling::*[1])"/></xsl:variable> |
|---|
| 251 | <xsl:if test="$nexttag='LINK'"><!--.. and following-sibling is a LINK -> keep one space--> |
|---|
| 252 | <xsl:text> </xsl:text> |
|---|
| 253 | </xsl:if> |
|---|
| 254 | </xsl:if> |
|---|
| 255 | </xsl:otherwise> |
|---|
| 256 | </xsl:choose> |
|---|
| 257 | </xsl:template> |
|---|
| 258 | |
|---|
| 259 | <xsl:template match="LINK" mode="reflow"> |
|---|
| 260 | <xsl:apply-templates select="." mode="link-recursion"/> |
|---|
| 261 | </xsl:template> |
|---|
| 262 | <xsl:template match="*" mode="reflow"> |
|---|
| 263 | <xsl:call-template name="error"><xsl:with-param name="text">Illegal TAG <xsl:value-of select="name()"/> in mode ´reflow´</xsl:with-param></xsl:call-template> |
|---|
| 264 | </xsl:template> |
|---|
| 265 | |
|---|
| 266 | <!-- ========================= --> |
|---|
| 267 | <!-- preformatted mode --> |
|---|
| 268 | <!-- ========================= --> |
|---|
| 269 | |
|---|
| 270 | <!-- <xsl:template match="text()" mode="preformatted-old"><PRE><FONT color="navy"><xsl:value-of select="substring-after(.,$lb)"/></FONT></PRE></xsl:template>--> |
|---|
| 271 | |
|---|
| 272 | <xsl:template match="text()" mode="preformatted"> |
|---|
| 273 | <xsl:variable name="before_lf"><xsl:value-of select="substring-before(.,$lb)"/></xsl:variable> |
|---|
| 274 | |
|---|
| 275 | <xsl:choose> |
|---|
| 276 | <xsl:when test="normalize-space($before_lf)=''"> |
|---|
| 277 | <xsl:variable name="after_lf"><xsl:value-of select="substring-after(.,$lb)"/></xsl:variable> |
|---|
| 278 | <xsl:choose> |
|---|
| 279 | <xsl:when test="normalize-space($after_lf)=''"><xsl:value-of select="."/></xsl:when> |
|---|
| 280 | <xsl:otherwise><xsl:value-of select="$after_lf"/></xsl:otherwise> |
|---|
| 281 | </xsl:choose> |
|---|
| 282 | </xsl:when> |
|---|
| 283 | <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise> |
|---|
| 284 | </xsl:choose> |
|---|
| 285 | </xsl:template> |
|---|
| 286 | <xsl:template match="LINK" mode="preformatted"> |
|---|
| 287 | <xsl:apply-templates select="." mode="link-recursion"/> |
|---|
| 288 | </xsl:template> |
|---|
| 289 | <xsl:template match="*" mode="preformatted"> |
|---|
| 290 | <xsl:call-template name="error"><xsl:with-param name="text">Illegal TAG <xsl:value-of select="name()"/> in mode ´preformatted´</xsl:with-param></xsl:call-template> |
|---|
| 291 | </xsl:template> |
|---|
| 292 | |
|---|
| 293 | |
|---|
| 294 | <xsl:template match="LINK" mode="link-recursion"> |
|---|
| 295 | <xsl:variable name="quoted"> |
|---|
| 296 | <xsl:choose> |
|---|
| 297 | <xsl:when test="@quoted='0'">0</xsl:when> |
|---|
| 298 | <xsl:otherwise>1</xsl:otherwise> |
|---|
| 299 | </xsl:choose> |
|---|
| 300 | </xsl:variable> |
|---|
| 301 | <xsl:choose> |
|---|
| 302 | <xsl:when test="@type='hlp' or @type='ps' or @type='pdf'"> |
|---|
| 303 | <xsl:call-template name="link-to-document"> |
|---|
| 304 | <xsl:with-param name="doc" select="@dest"/> |
|---|
| 305 | <xsl:with-param name="type" select="@type"/> |
|---|
| 306 | <xsl:with-param name="missing" select="@missing"/> |
|---|
| 307 | <xsl:with-param name="quote" select="$quoted"/> |
|---|
| 308 | </xsl:call-template> |
|---|
| 309 | </xsl:when> |
|---|
| 310 | <xsl:when test="@type='www'"> |
|---|
| 311 | <xsl:call-template name="insert-link"> |
|---|
| 312 | <xsl:with-param name="linktext"><xsl:value-of select="@dest"/></xsl:with-param> |
|---|
| 313 | <xsl:with-param name="address"><xsl:value-of select="@dest"/></xsl:with-param> |
|---|
| 314 | </xsl:call-template> |
|---|
| 315 | </xsl:when> |
|---|
| 316 | <xsl:when test="@type='ticket'"> |
|---|
| 317 | <xsl:variable name="number" select="substring-after(@dest,'#')"/> |
|---|
| 318 | <xsl:call-template name="insert-link"> |
|---|
| 319 | <xsl:with-param name="linktext"><xsl:value-of select="@dest"/></xsl:with-param> |
|---|
| 320 | <xsl:with-param name="address">http://bugs.arb-home.de/ticket/<xsl:value-of select="$number"/></xsl:with-param> |
|---|
| 321 | </xsl:call-template> |
|---|
| 322 | </xsl:when> |
|---|
| 323 | <xsl:when test="@type='email'"> |
|---|
| 324 | <xsl:call-template name="insert-email-link"> |
|---|
| 325 | <xsl:with-param name="linktext"><xsl:value-of select="@dest"/></xsl:with-param> |
|---|
| 326 | <xsl:with-param name="address"><xsl:value-of select="@dest"/></xsl:with-param> |
|---|
| 327 | <xsl:with-param name="subject" select="concat('Concerning helppage ',$myname)"/> |
|---|
| 328 | </xsl:call-template> |
|---|
| 329 | </xsl:when> |
|---|
| 330 | <xsl:otherwise> |
|---|
| 331 | <xsl:call-template name="error"><xsl:with-param name="text">Unknown link type '<xsl:value-of select="@type"/>'</xsl:with-param></xsl:call-template> |
|---|
| 332 | </xsl:otherwise> |
|---|
| 333 | </xsl:choose> |
|---|
| 334 | </xsl:template> |
|---|
| 335 | |
|---|
| 336 | <xsl:template match="T" mode="condensed"> |
|---|
| 337 | <xsl:choose> |
|---|
| 338 | <xsl:when test="@reflow='1'"> |
|---|
| 339 | <xsl:apply-templates mode="reflow"/> |
|---|
| 340 | </xsl:when> |
|---|
| 341 | <xsl:otherwise> |
|---|
| 342 | <PRE><FONT color="navy" size="-1"><xsl:apply-templates mode="preformatted"/></FONT></PRE> |
|---|
| 343 | </xsl:otherwise> |
|---|
| 344 | </xsl:choose> |
|---|
| 345 | </xsl:template> |
|---|
| 346 | |
|---|
| 347 | <xsl:template match="*" mode="condensed"> |
|---|
| 348 | <xsl:apply-templates select="."/> |
|---|
| 349 | </xsl:template> |
|---|
| 350 | |
|---|
| 351 | <xsl:template match="T"> |
|---|
| 352 | <xsl:choose> |
|---|
| 353 | <xsl:when test="@reflow='1'"> |
|---|
| 354 | <H3><xsl:apply-templates mode="reflow"/></H3> |
|---|
| 355 | </xsl:when> |
|---|
| 356 | <xsl:otherwise> |
|---|
| 357 | <PRE><FONT color="navy" size="-1"><xsl:apply-templates mode="preformatted"/></FONT></PRE> |
|---|
| 358 | </xsl:otherwise> |
|---|
| 359 | </xsl:choose> |
|---|
| 360 | </xsl:template> |
|---|
| 361 | |
|---|
| 362 | |
|---|
| 363 | <xsl:template match="ENTRY"> |
|---|
| 364 | <LI> |
|---|
| 365 | <xsl:apply-templates mode="condensed"/> |
|---|
| 366 | </LI> |
|---|
| 367 | </xsl:template> |
|---|
| 368 | |
|---|
| 369 | <xsl:template match="P"> |
|---|
| 370 | <DIV><xsl:apply-templates mode="condensed"/></DIV> |
|---|
| 371 | </xsl:template> |
|---|
| 372 | |
|---|
| 373 | <xsl:template match="ENUM"> |
|---|
| 374 | <xsl:variable name="enumval"><xsl:value-of select="ENTRY[1]/@enumerated"/></xsl:variable> |
|---|
| 375 | <xsl:variable name="type"> |
|---|
| 376 | <xsl:choose> |
|---|
| 377 | <xsl:when test="$enumval='a'">a</xsl:when> |
|---|
| 378 | <xsl:when test="$enumval='A'">A</xsl:when> |
|---|
| 379 | <xsl:otherwise>1</xsl:otherwise><!--fallback to 1. 2. 3. ..--> |
|---|
| 380 | </xsl:choose> |
|---|
| 381 | </xsl:variable> |
|---|
| 382 | |
|---|
| 383 | <xsl:choose> |
|---|
| 384 | <xsl:when test="$type='1'"> |
|---|
| 385 | <OL> |
|---|
| 386 | <xsl:apply-templates/> |
|---|
| 387 | </OL> |
|---|
| 388 | </xsl:when> |
|---|
| 389 | <xsl:otherwise> |
|---|
| 390 | <OL type="{$type}"> |
|---|
| 391 | <xsl:apply-templates/> |
|---|
| 392 | </OL> |
|---|
| 393 | </xsl:otherwise> |
|---|
| 394 | </xsl:choose> |
|---|
| 395 | |
|---|
| 396 | <BR/> |
|---|
| 397 | </xsl:template> |
|---|
| 398 | <xsl:template match="LIST"> |
|---|
| 399 | <UL> |
|---|
| 400 | <xsl:apply-templates/> |
|---|
| 401 | </UL> |
|---|
| 402 | <BR/> |
|---|
| 403 | </xsl:template> |
|---|
| 404 | |
|---|
| 405 | <xsl:template match="P" mode="top-level"><DIV><xsl:apply-templates/></DIV></xsl:template> |
|---|
| 406 | <xsl:template match="T|ENUM|LIST" mode="top-level"><xsl:apply-templates select="."/></xsl:template> |
|---|
| 407 | |
|---|
| 408 | <xsl:template match="SECTION" mode="main"> |
|---|
| 409 | <xsl:variable name="anchor"><xsl:value-of select="translate(@name,' ','_')"/></xsl:variable> |
|---|
| 410 | <H2 class="section" id="{$anchor}"><A class="section" href="#{$anchor}"><xsl:value-of select="@name"/></A></H2> |
|---|
| 411 | <TABLE width="100%" border="{$tableBorder}"> |
|---|
| 412 | <TR> |
|---|
| 413 | <TD align="right"> |
|---|
| 414 | <TABLE width="97%" border="{$tableBorder}"> |
|---|
| 415 | <TR> |
|---|
| 416 | <TD> |
|---|
| 417 | <xsl:apply-templates mode="top-level"/> |
|---|
| 418 | </TD> |
|---|
| 419 | </TR> |
|---|
| 420 | <TR><TD> </TD></TR> |
|---|
| 421 | </TABLE> |
|---|
| 422 | </TD> |
|---|
| 423 | </TR> |
|---|
| 424 | </TABLE> |
|---|
| 425 | </xsl:template> |
|---|
| 426 | |
|---|
| 427 | <xsl:template match="SECTION" mode="content"> |
|---|
| 428 | <xsl:variable name="anchor"><xsl:value-of select="translate(@name,' ','_')"/></xsl:variable> |
|---|
| 429 | <LI><A href="#{$anchor}"><xsl:value-of select="@name"/></A></LI> |
|---|
| 430 | </xsl:template> |
|---|
| 431 | |
|---|
| 432 | <!-- ================================ --> |
|---|
| 433 | <!-- PAGE document wide layout --> |
|---|
| 434 | <!-- ================================ --> |
|---|
| 435 | |
|---|
| 436 | <xsl:template match="PAGE"> |
|---|
| 437 | <HTML> |
|---|
| 438 | <xsl:variable name="title"> |
|---|
| 439 | <xsl:for-each select="TITLE"><xsl:value-of select="text()"/></xsl:for-each> |
|---|
| 440 | </xsl:variable> |
|---|
| 441 | <xsl:variable name="subtitle"> |
|---|
| 442 | <xsl:for-each select="SUBTITLE"><xsl:value-of select="text()"/></xsl:for-each> |
|---|
| 443 | </xsl:variable> |
|---|
| 444 | <xsl:call-template name="header"> |
|---|
| 445 | <xsl:with-param name="title" select="$title"/> |
|---|
| 446 | </xsl:call-template> |
|---|
| 447 | <BODY LEFTMARGIN="10" TEXT="{$fontColor}" BGCOLOR="{$backgroundColor}" LINK="{$linkColor}" VLINK="{$visitedLinkColor}" ALINK="{$activeLinkColor}"> |
|---|
| 448 | <TABLE width="95%"> |
|---|
| 449 | <TR> |
|---|
| 450 | <TD align="left" valign="top"> |
|---|
| 451 | <!-- Search Google --> |
|---|
| 452 | <FORM method="GET" action="http://www.google.com/search" name="google"> |
|---|
| 453 | <A HREF="http://www.google.com"> |
|---|
| 454 | <IMG SRC="Logo_25wht.gif" width="75" height="32" border="0" ALT="Google" align="absmiddle"/> |
|---|
| 455 | </A> |
|---|
| 456 | <INPUT TYPE="hidden" name="q"/> |
|---|
| 457 | <INPUT TYPE="hidden" name="hl" value="en"/> |
|---|
| 458 | <INPUT TYPE="hidden" name="as_sitesearch" value="help.arb-home.de"/> |
|---|
| 459 | <INPUT TYPE="text" name="q2" size="31" maxlength="255"/> |
|---|
| 460 | <INPUT type="submit" name="btnG" VALUE="Search help" onClick="google.q.value=google.q2.value;return true;"/> |
|---|
| 461 | <INPUT type="submit" name="btnG" VALUE="Search site" onClick="google.as_sitesearch.value='arb-home.de';google.q.value=google.q2.value;return true;"/> |
|---|
| 462 | </FORM> |
|---|
| 463 | <!-- Search Google --> |
|---|
| 464 | </TD> |
|---|
| 465 | <TD valign="top" align="right"> |
|---|
| 466 | <FONT size="-1"> |
|---|
| 467 | <NOBR>More docs on the |
|---|
| 468 | <xsl:call-template name="insert-link"> |
|---|
| 469 | <xsl:with-param name="linktext" select="'ARB website'"/> |
|---|
| 470 | <xsl:with-param name="address" select="'http://rtfm.arb-home.de/'"/> |
|---|
| 471 | </xsl:call-template>.</NOBR><BR/> |
|---|
| 472 | See also <A href="{concat($rootpath,'help_index')}.html">index</A> of helppages.<BR/> |
|---|
| 473 | Last update on <xsl:value-of select="$date"/>. |
|---|
| 474 | </FONT> |
|---|
| 475 | </TD> |
|---|
| 476 | </TR> |
|---|
| 477 | </TABLE> |
|---|
| 478 | <TABLE border="{$tableBorder}" width="98%" align="center"> |
|---|
| 479 | <TR class="shaded"> |
|---|
| 480 | <xsl:text> |
|---|
| 481 | </xsl:text> |
|---|
| 482 | <TD valign="top" width="50%">Main topics:<BR/> |
|---|
| 483 | <UL> |
|---|
| 484 | <xsl:apply-templates select="UP" mode="uplinks"/> |
|---|
| 485 | </UL> |
|---|
| 486 | </TD> |
|---|
| 487 | <xsl:text> |
|---|
| 488 | </xsl:text> |
|---|
| 489 | <TD valign="top">Related topics:<BR/> |
|---|
| 490 | <UL> |
|---|
| 491 | <xsl:apply-templates select="SUB" mode="sublinks"/> |
|---|
| 492 | </UL> |
|---|
| 493 | </TD> |
|---|
| 494 | <xsl:text> |
|---|
| 495 | </xsl:text> |
|---|
| 496 | </TR> |
|---|
| 497 | <TR> |
|---|
| 498 | <TD colspan="2"> |
|---|
| 499 | <H1><xsl:value-of select="$title"/></H1> |
|---|
| 500 | <xsl:choose> |
|---|
| 501 | <xsl:when test="normalize-space($subtitle)=''"></xsl:when> |
|---|
| 502 | <xsl:otherwise> |
|---|
| 503 | <!-- subtitle is displayed above the section links --> |
|---|
| 504 | <H2 class="subtitle"><xsl:value-of select="$subtitle"/></H2> |
|---|
| 505 | </xsl:otherwise> |
|---|
| 506 | </xsl:choose> |
|---|
| 507 | <UL><xsl:apply-templates select="SECTION" mode="content"/></UL> |
|---|
| 508 | <xsl:apply-templates select="SECTION" mode="main"/> |
|---|
| 509 | </TD> |
|---|
| 510 | </TR> |
|---|
| 511 | </TABLE> |
|---|
| 512 | </BODY> |
|---|
| 513 | </HTML> |
|---|
| 514 | </xsl:template> |
|---|
| 515 | |
|---|
| 516 | <!-- ============ --> |
|---|
| 517 | <!-- text() (should be last template) --> |
|---|
| 518 | <!-- ============ --> |
|---|
| 519 | |
|---|
| 520 | <xsl:template match="text()|*"> |
|---|
| 521 | <xsl:choose> |
|---|
| 522 | <!-- tags--> |
|---|
| 523 | <xsl:when test="string-length(name())>0"> |
|---|
| 524 | <xsl:call-template name="error"><xsl:with-param name="text">Unhandled TAG <xsl:value-of select="name()"/></xsl:with-param></xsl:call-template> |
|---|
| 525 | </xsl:when> |
|---|
| 526 | <!-- text() --> |
|---|
| 527 | <xsl:otherwise> |
|---|
| 528 | <xsl:variable name="self"><xsl:value-of select="."/></xsl:variable> |
|---|
| 529 | <xsl:choose> |
|---|
| 530 | <!--allow empty text--> |
|---|
| 531 | <xsl:when test="normalize-space($self)=''"></xsl:when> |
|---|
| 532 | <xsl:otherwise> |
|---|
| 533 | <!-- {<xsl:value-of select="."/>}--> |
|---|
| 534 | <xsl:call-template name="error"><xsl:with-param name="text">Unexpected text</xsl:with-param></xsl:call-template> |
|---|
| 535 | </xsl:otherwise> |
|---|
| 536 | </xsl:choose> |
|---|
| 537 | </xsl:otherwise> |
|---|
| 538 | </xsl:choose> |
|---|
| 539 | </xsl:template> |
|---|
| 540 | |
|---|
| 541 | |
|---|
| 542 | </xsl:transform> |
|---|
| 543 | |
|---|