1<!--***********************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 ***********************************************************-->
21<xsl:stylesheet
22    version="1.0"
23    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
24    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
25    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
26    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
27    xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
28    xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
29    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
30    xmlns:xlink="http://www.w3.org/1999/xlink"
31    xmlns:dc="http://purl.org/dc/elements/1.1/"
32    xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
33    xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
34    xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
35    xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
36    xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
37    xmlns:math="http://www.w3.org/1998/Math/MathML"
38    xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
39    xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
40    xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
41    xmlns:ooo="http://openoffice.org/2004/office"
42    xmlns:ooow="http://openoffice.org/2004/writer"
43    xmlns:oooc="http://openoffice.org/2004/calc"
44    xmlns:dom="http://www.w3.org/2001/xml-events"
45    xmlns:xforms="http://www.w3.org/2002/xforms"
46    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
47    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
48    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
49    xmlns:rng="http://relaxng.org/ns/structure/1.0"
50    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
51    xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
52  <xsl:output method="text" />
53  <xsl:param name="prefix"/>
54
55  <xsl:include href="factorytools.xsl"/>
56
57  <!--
58      Generates constant definitions for attribute values.
59  -->
60  <xsl:template name="valueconstants">
61    <xsl:text>
62rtl::OUString </xsl:text>
63<xsl:call-template name="valuestringname">
64  <xsl:with-param name="string"></xsl:with-param>
65</xsl:call-template>
66<xsl:text>(RTL_CONSTASCII_USTRINGPARAM(""));</xsl:text>
67<xsl:for-each select="//rng:value[generate-id(key('value-with-content', text())[1]) = generate-id(.)]">
68  <xsl:text>
69rtl::OUString </xsl:text>
70<xsl:call-template name="valuestringname">
71  <xsl:with-param name="string" select="."/>
72</xsl:call-template>
73<xsl:text>(RTL_CONSTASCII_USTRINGPARAM("</xsl:text>
74<xsl:value-of select="."/>
75<xsl:text>"));</xsl:text>
76</xsl:for-each>
77  </xsl:template>
78
79  <xsl:template match="/">
80    <xsl:text>
81#include "OOXMLFactory_values.hxx"</xsl:text>
82<xsl:call-template name="valueconstants"/>
83<xsl:text>&#xa;</xsl:text>
84  </xsl:template>
85</xsl:stylesheet>
86