update dev300-m58
[ooovba.git] / officecfg / util / sanity.xsl
blob995f90c9ef8277042a86933090d8b89e845f5e73
1 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
3 <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5 xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 xmlns:oor="http://openoffice.org/2001/registry"
7 version="1.0">
9 <xsl:output method="text" indent="no" encoding="ISO-8859-1"/>
11 <xsl:namespace-alias stylesheet-prefix="xs" result-prefix="xs"></xsl:namespace-alias>
13 <!-- match root -->
14 <xsl:template match="/">
15 <xsl:apply-templates/>
16 </xsl:template>
18 <!-- match all elements that could possibly contain info/desc elements -->
19 <xsl:template match="group|set|node-ref|prop|enumeration|length|minLength|maxLength|minInclusive|maxInclusive|minExclusive|maxExclusive|whiteSpace">
21 <xsl:if test="1>string-length(info/desc)">
22 <!-- print TPF's path to current node -->
23 <xsl:message terminate="yes">
25 <!-- print linefeed -->
26 <xsl:text>&#10;</xsl:text>
27 <xsl:text>ERROR: No info/desc element specified or string length of info/desc element is 0.</xsl:text>
28 <xsl:text>&#10;</xsl:text>
29 <xsl:text> There has to be a reasonable description to be specified for any item.</xsl:text>
30 <xsl:text>&#10;</xsl:text>
32 <xsl:text> - path: </xsl:text>
33 <xsl:for-each select="ancestor-or-self::*"><xsl:text>/</xsl:text>
34 <xsl:value-of select="local-name(.)"/>
35 <xsl:choose>
36 <xsl:when test="@oor:name">[<xsl:value-of select="@oor:name"/>]</xsl:when>
37 <xsl:when test="@oor:value">[<xsl:value-of select="@oor:value"/>]</xsl:when>
38 </xsl:choose>
39 </xsl:for-each>
41 <xsl:text>&#10;</xsl:text>
42 <xsl:text> - author: </xsl:text>
44 <xsl:for-each select="ancestor-or-self::*">
45 <!-- print element name -->
46 <xsl:if test="info/author">
47 <!-- print arrow -->
48 <xsl:text>-></xsl:text>
49 <xsl:value-of select="info/author"/>
50 </xsl:if>
51 </xsl:for-each>
53 </xsl:message>
55 </xsl:if>
57 <xsl:apply-templates/>
59 </xsl:template>
61 </xsl:transform>