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