Bump version to 4.1-6
[LibreOffice.git] / writerfilter / source / ooxml / factoryinc.xsl
blobf08c01973b3ac9e9e032b16ae2dab0adf03bd163
1 <!--
2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 -->
18 <xsl:stylesheet
19 version="1.0"
20 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
21 xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
22 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
23 xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
24 xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
25 xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
26 xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
27 xmlns:xlink="http://www.w3.org/1999/xlink"
28 xmlns:dc="http://purl.org/dc/elements/1.1/"
29 xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
30 xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
31 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
32 xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
33 xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
34 xmlns:math="http://www.w3.org/1998/Math/MathML"
35 xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
36 xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
37 xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
38 xmlns:ooo="http://openoffice.org/2004/office"
39 xmlns:ooow="http://openoffice.org/2004/writer"
40 xmlns:oooc="http://openoffice.org/2004/calc"
41 xmlns:dom="http://www.w3.org/2001/xml-events"
42 xmlns:xforms="http://www.w3.org/2002/xforms"
43 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
44 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
45 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
46 xmlns:rng="http://relaxng.org/ns/structure/1.0"
47 xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
48 xmlns:UML = 'org.omg.xmi.namespace.UML' xml:space="default">
49 <xsl:output method="text" />
50 <xsl:param name="prefix"/>
52 <xsl:include href="factorytools.xsl"/>
54 <xsl:template name="factorynamespaceiddecls">
55 <xsl:for-each select="/model/namespace">
56 <xsl:sort select="@name"/>
57 <xsl:text>
58 extern const Id </xsl:text>
59 <xsl:call-template name="idfornamespace"/>
60 <xsl:text>;</xsl:text>
61 </xsl:for-each>
62 </xsl:template>
64 <xsl:template name="factorynamespaceidimpls">
65 <xsl:for-each select="/model/namespace">
66 <xsl:sort select="@name"/>
67 <xsl:text>
68 const Id </xsl:text>
69 <xsl:call-template name="idfornamespace"/>
70 <xsl:text> = </xsl:text>
71 <xsl:value-of select="position()"/>
72 <xsl:text> &lt;&lt; 16;</xsl:text>
73 </xsl:for-each>
74 </xsl:template>
76 <xsl:template match="/">
77 <xsl:text>
78 #ifndef OOXML_FACTORY_GENERATED_HXX
79 #define OOXML_FACTORY_GENERATED_HXX
81 namespace writerfilter {
82 namespace ooxml {
84 /// @cond GENERATED
85 </xsl:text>
86 <xsl:call-template name="factorynamespaceidimpls"/>
87 <xsl:call-template name="factorydefineidimpls"/>
88 <xsl:text>
89 /// @endcond
92 #endif // OOXML_FACTORY_GENERATED_HXX
93 </xsl:text>
94 </xsl:template>
96 </xsl:stylesheet>