update dev300-m58
[ooovba.git] / officecfg / util / schema_trim.xsl
blobf7379d13f1176cf5ccd2ec1abe7ac57076fbfdb1
1 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2 <!--***********************************************************************
4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 Copyright 2008 by Sun Microsystems, Inc.
8 OpenOffice.org - a multi-platform office productivity suite
10 $RCSfile: schema_trim.xsl,v $
12 $Revision: 1.10 $
14 This file is part of OpenOffice.org.
16 OpenOffice.org is free software: you can redistribute it and/or modify
17 it under the terms of the GNU Lesser General Public License version 3
18 only, as published by the Free Software Foundation.
20 OpenOffice.org is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU Lesser General Public License version 3 for more details
24 (a copy is included in the LICENSE file that accompanied this code).
26 You should have received a copy of the GNU Lesser General Public License
27 version 3 along with OpenOffice.org. If not, see
28 <http://www.openoffice.org/license.html>
29 for a copy of the LGPLv3 License.
31 ************************************************************************ -->
33 <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
34 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
35 xmlns:xs="http://www.w3.org/2001/XMLSchema"
36 xmlns:oor="http://openoffice.org/2001/registry"
37 version="1.0">
39 <!-- Get the correct format -->
40 <xsl:output method="xml" indent="yes"/>
41 <xsl:namespace-alias stylesheet-prefix="xs" result-prefix="xs"></xsl:namespace-alias>
44 <!-- Remove all comments from the schema files -->
45 <xsl:template match="*|@*">
46 <xsl:copy>
47 <xsl:apply-templates select="*|@*"/>
48 </xsl:copy>
49 </xsl:template>
51 <!-- suppress the location of the schema -->
52 <xsl:template match = "@xsi:schemaLocation"/>
54 <!-- suppress the constraints of the schema
55 <xsl:template match = "constraints"/> -->
57 <!-- suppress all documentation items
58 <xsl:template match = "info"/> -->
60 <!-- suppress constraints for deprecated items -->
61 <xsl:template match = "constraints[../info/deprecated]"/>
63 <!-- suppress all documentation for deprecated items -->
64 <xsl:template match = "desc[../deprecated]"/>
65 <xsl:template match = "label[../deprecated]"/>
67 <!-- copy all other documentation with content -->
68 <xsl:template match="desc|label">
69 <xsl:copy>
70 <xsl:apply-templates select="@*"/>
71 <xsl:value-of select="."/>
72 </xsl:copy>
73 </xsl:template>
75 <!-- suppress all author items -->
76 <xsl:template match = "author"/>
78 <!-- suppress values, which are marked as nil -->
79 <xsl:template match="value[@xsi:nil='true']" />
81 <!-- copy all other values with content -->
82 <xsl:template match="value">
83 <xsl:copy>
84 <xsl:apply-templates select="*|@*"/>
85 <xsl:value-of select="."/>
86 </xsl:copy>
87 </xsl:template>
89 </xsl:transform>