VirtualBox

source: vbox/trunk/src/libs/dita-ot-1.8.5/resource/messages.xsl@ 99005

Last change on this file since 99005 was 98584, checked in by vboxsync, 2 years ago

Docs: bugref:10302. Setting svn properties of DITA-OT library.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!-- This file is part of the DITA Open Toolkit project hosted on
3 Sourceforge.net. See the accompanying license.txt file for
4 applicable licenses.-->
5<!-- (c) Copyright IBM Corp. 2012 All Rights Reserved. -->
6<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
7
8 <xsl:output method="xml"
9 indent="no"
10 doctype-public="-//OASIS//DTD DITA Reference//EN"
11 doctype-system="reference.dtd"/>
12
13 <xsl:template match="/">
14 <xsl:comment>
15 This file is part of the DITA Open Toolkit project hosted on
16 Sourceforge.net. See the accompanying license.txt file for
17 applicable licenses.
18 </xsl:comment>
19 <xsl:comment>
20 This file is generated based on the message information shipped
21 in the DITA-OT, as defined in the file
22 DITA-OT/resource/messages.xml
23 To regenerate this topic, run the following command:
24 DITA-OT/doc/ant -f build.xml generate-msg-topic
25
26 Alternatively, you may use that same build file to
27 create a PDF, XHTML, or HTML Help version of the User Guide, which
28 will update the topic as part of the build. To rebuild all three,
29 just run the command
30 DITA-OT/doc/ant -f build.xml
31
32 To build only one style of doc, run that same build command, followed
33 by either "build-html", "build-pdf", or "build-htmlhelp". For example,
34 this command will rebuild the HTML documentation (including the updated
35 messages topic):
36 DITA-OT/doc/ant -f build.xml build-html
37 </xsl:comment>
38 <!-- The title, shortdesc, and overview section in this topic will all
39 be overwritten with "conref push", as long as it is built
40 with the full Readme map. The text here is provided as
41 a default in case the topic is generated on its own. -->
42 <reference id="msgs">
43 <title id="title">Error messages</title>
44 <shortdesc id="shortdesc">This topic defines all error messages generated by the DITA-OT.</shortdesc>
45 <refbody>
46 <section id="overview"><p>Plug-ins may be used to add additional error messages into the toolkit;
47for more information, see the Developer reference section of the User Guide.</p></section>
48 <simpletable>
49 <xsl:attribute name="relcolwidth">1.5* 1.8* 4* 4*</xsl:attribute>
50 <sthead>
51 <stentry>Message ID</stentry>
52 <stentry>Severity</stentry>
53 <stentry>Message text</stentry>
54 <stentry>Additional details</stentry>
55 </sthead>
56 <xsl:for-each select="/*/message">
57 <xsl:sort select="@id"/>
58 <strow id="{@id}">
59 <stentry><msgnum><xsl:value-of select="@id"/></msgnum></stentry>
60 <stentry>
61 <xsl:choose>
62 <xsl:when test="@type='INFO'">Informational</xsl:when>
63 <xsl:when test="@type='WARN'">Warning</xsl:when>
64 <xsl:when test="@type='ERROR'">Error</xsl:when>
65 <xsl:when test="@type='FATAL'">Fatal</xsl:when>
66 <xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
67 </xsl:choose>
68 </stentry>
69 <stentry>
70 <xsl:call-template name="format-message">
71 <xsl:with-param name="text" select="string(reason)"/>
72 </xsl:call-template>
73 <xsl:text> </xsl:text>
74 <xsl:call-template name="format-message">
75 <xsl:with-param name="text" select="string(response)"/>
76 </xsl:call-template>
77 </stentry>
78 <stentry id="{@id}-extra">&#xA0;</stentry>
79 </strow>
80 </xsl:for-each>
81 </simpletable>
82 </refbody>
83 </reference>
84 </xsl:template>
85
86 <xsl:template name="format-message">
87 <xsl:param name="text"/>
88 <xsl:choose>
89 <xsl:when test="contains($text, '%') and not(number(substring(substring-after($text, '%'), 1, 1)) = number('NaN'))">
90 <xsl:value-of select="substring-before($text, '%')"/>
91 <varname>
92 <xsl:text>%</xsl:text>
93 <xsl:value-of select="substring(substring-after($text, '%'), 1, 1)"/>
94 </varname>
95 <xsl:call-template name="format-message">
96 <xsl:with-param name="text" select="substring(substring-after($text, '%'), 2)"/>
97 </xsl:call-template>
98 </xsl:when>
99 <xsl:otherwise>
100 <xsl:value-of select="$text"/>
101 </xsl:otherwise>
102 </xsl:choose>
103 </xsl:template>
104
105 <!-- To create each as a nested topic -->
106 <!--
107 <xsl:for-each select="/*/message">
108 <reference id="{@id}">
109 <title><xsl:value-of select="@id"/></title>
110 <shortdesc><xsl:value-of select="reason"/></shortdesc>
111 <refbody>
112 <section><title>User response</title><p><xsl:value-of select="response"/></p></section>
113 </refbody>
114 </reference>
115 </xsl:for-each>
116 -->
117
118</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette