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