1<!--
2/*************************************************************************
3 *
4  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
6  Copyright 2008 by Sun Microsystems, Inc.
7
8  OpenOffice.org - a multi-platform office productivity suite
9
10  $RCSfile: fastresources_wml.xsl,v $
11
12  $Revision: 1.3 $
13
14  This file is part of OpenOffice.org.
15
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.
19
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).
25
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.
30
31 ************************************************************************/
32
33-->
34<xsl:stylesheet
35    version="1.0"
36    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
37    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
38    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
39    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
40    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
41    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
42    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
43    xmlns:xlink="http://www.w3.org/1999/xlink"
44    xmlns:dc="http://purl.org/dc/elements/1.1/"
45    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
46    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
47    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
48    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
49    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
50    xmlns:math="http://www.w3.org/1998/Math/MathML"
51    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
52    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
53    xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
54    xmlns:ooo="http://openoffice.org/2004/office"
55    xmlns:ooow="http://openoffice.org/2004/writer"
56    xmlns:oooc="http://openoffice.org/2004/calc"
57    xmlns:dom="http://www.w3.org/2001/xml-events"
58    xmlns:xforms="http://www.w3.org/2002/xforms"
59    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
60    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
61    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
62    xmlns:rng="http://relaxng.org/ns/structure/1.0"
63    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
64    xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
65  <xsl:output method="text" />
66  <xsl:param name="prefix"/>
67
68  <xsl:include href="factorytools.xsl"/>
69
70  <!--
71      Generates constant definitions for attribute values.
72  -->
73  <xsl:template name="valueconstants">
74    <xsl:text>
75rtl::OUString </xsl:text>
76<xsl:call-template name="valuestringname">
77  <xsl:with-param name="string"></xsl:with-param>
78</xsl:call-template>
79<xsl:text>(RTL_CONSTASCII_USTRINGPARAM(""));</xsl:text>
80<xsl:for-each select="//rng:value[generate-id(key('value-with-content', text())[1]) = generate-id(.)]">
81  <xsl:text>
82rtl::OUString </xsl:text>
83<xsl:call-template name="valuestringname">
84  <xsl:with-param name="string" select="."/>
85</xsl:call-template>
86<xsl:text>(RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
87<xsl:value-of select="."/>
88<xsl:text>"));</xsl:text>
89</xsl:for-each>
90  </xsl:template>
91
92  <xsl:template match="/">
93    <xsl:text>
94#include "OOXMLFactory_values.hxx"</xsl:text>
95<xsl:call-template name="valueconstants"/>
96<xsl:text>&#xa;</xsl:text>
97  </xsl:template>
98</xsl:stylesheet>
99