2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2008 by Sun Microsystems, Inc.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * $RCSfile: resourceids.xsl,v $
14 * This file is part of OpenOffice.org.
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.
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).
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.
31 ************************************************************************/
34 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform" xmlns:
office=
"urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:
style=
"urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:
text=
"urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:
table=
"urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:
draw=
"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:
fo=
"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:
xlink=
"http://www.w3.org/1999/xlink" xmlns:
dc=
"http://purl.org/dc/elements/1.1/" xmlns:
meta=
"urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:
number=
"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:
svg=
"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:
chart=
"urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:
dr3d=
"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:
math=
"http://www.w3.org/1998/Math/MathML" xmlns:
form=
"urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:
script=
"urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:
config=
"urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:
ooo=
"http://openoffice.org/2004/office" xmlns:
ooow=
"http://openoffice.org/2004/writer" xmlns:
oooc=
"http://openoffice.org/2004/calc" xmlns:
dom=
"http://www.w3.org/2001/xml-events" xmlns:
xforms=
"http://www.w3.org/2002/xforms" xmlns:
xsd=
"http://www.w3.org/2001/XMLSchema" xmlns:
xsi=
"http://www.w3.org/2001/XMLSchema-instance" xmlns:
rdf=
"http://www.w3.org/1999/02/22-rdf-syntax-ns#"
35 xmlns:
rdfs=
"http://www.w3.org/2000/01/rdf-schema#" xmlns:UML = 'org.omg.xmi.namespace.UML' xml:
space=
"default">
36 <xsl:output method=
"text" />
38 <!-- Key all attributes with the same name and same value -->
39 <xsl:key name=
"same-valued-tagged-data"
40 match=
"UML:TaggedValue.dataValue" use=
"." />
42 <xsl:template match=
"/">
45 /*************************************************************************
47 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
49 * Copyright
2008 by Sun Microsystems, Inc.
51 * OpenOffice.org - a multi-platform office productivity suite
53 * $RCSfile: resourceids.xsl,v $
57 * This file is part of OpenOffice.org.
59 * OpenOffice.org is free software: you can redistribute it and/or modify
60 * it under the terms of the GNU Lesser General Public License version
3
61 * only, as published by the Free Software Foundation.
63 * OpenOffice.org is distributed in the hope that it will be useful,
64 * but WITHOUT ANY WARRANTY; without even the implied warranty of
65 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
66 * GNU Lesser General Public License version
3 for more details
67 * (a copy is included in the LICENSE file that accompanied this code).
69 * You should have received a copy of the GNU Lesser General Public License
70 * version
3 along with OpenOffice.org. If not, see
71 * http://www.openoffice.org/license.html
72 * for a copy of the LGPLv3 License.
74 ************************************************************************/
77 THIS FILE IS GENERATED AUTOMATICALLY! DO NOT EDIT!
80 #ifndef INCLUDED_RESOURCESIDS
81 #define INCLUDED_RESOURCESIDS
83 #include
<sal/types.h
>
84 #include
<resourcemodel/WW8ResourceModel.hxx
>
86 namespace writerfilter {
90 /* Attributes */
</xsl:text>
91 <xsl:for-each select='.//UML:Attribute[@name!=
"reserved"][count(.//UML:Stereotype[@xmi.
idref=
"noqname"]) =
0]'
>
92 <xsl:variable name=
"pos" select=
"position()"/>
93 <xsl:for-each select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.
idref=
"attrid"]'
>
95 <xsl:when test='generate-id(UML:TaggedValue.dataValue) != generate-id(key(
"same-valued-tagged-data", UML:TaggedValue.dataValue)[
1])'
/>
96 <!-- <xsl:when test='.//UML:TaggedValue.dataValue = preceding::*//UML:TaggedValue.dataValue'/>-->
100 <xsl:call-template name='idtoqname'
>
101 <xsl:with-param name='id'
><xsl:value-of select='.//UML:TaggedValue.dataValue'
/></xsl:with-param>
103 <xsl:text> =
</xsl:text>
104 <xsl:variable name=
"id" select=
"10000 + $pos"/>
105 <xsl:value-of select='$id'
/>
106 <xsl:text>; //
0x
</xsl:text>
107 <xsl:call-template name=
"dectohex">
108 <xsl:with-param name=
"number" select=
"$id"/>
116 /* Operations */
</xsl:text>
117 <xsl:for-each select='.//UML:Operation[@name!=
"reserved"][count(.//UML:Stereotype[@xmi.
idref=
"noqname"]) =
0]'
>
118 <xsl:variable name=
"pos" select=
"position()"/>
119 <xsl:for-each select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.
idref=
"opid"]'
>
121 <xsl:when test='generate-id(UML:TaggedValue.dataValue) != generate-id(key(
"same-valued-tagged-data", UML:TaggedValue.dataValue)[
1])'
/>
125 <xsl:call-template name='idtoqname'
>
126 <xsl:with-param name='id'
><xsl:value-of select='.//UML:TaggedValue.dataValue'
/></xsl:with-param>
128 <xsl:text> =
</xsl:text>
129 <xsl:variable name=
"id" select=
"20000 + $pos"/>
130 <xsl:value-of select='$id'
/>
131 <xsl:text>; //
0x
</xsl:text>
132 <xsl:call-template name=
"dectohex">
133 <xsl:with-param name=
"number" select=
"$id"/>
141 /* Classes */
</xsl:text>
142 <xsl:for-each select='.//UML:Class[@name!=
"reserved"]'
>
143 <xsl:variable name=
"pos" select=
"position()"/>
144 <xsl:for-each select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.
idref=
"classid"]'
>
146 <xsl:when test='.//UML:Stereotype[@xmi.
idref=
"noqname"]'
/>
147 <xsl:when test='generate-id(UML:TaggedValue.dataValue) != generate-id(key(
"same-valued-tagged-data", UML:TaggedValue.dataValue)[
1])'
/>
151 <xsl:call-template name='idtoqname'
>
152 <xsl:with-param name='id'
><xsl:value-of select='.//UML:TaggedValue.dataValue'
/></xsl:with-param>
154 <xsl:text> =
</xsl:text>
155 <xsl:value-of select='
30000 + $pos'
/>
156 <xsl:text>; //
0x
</xsl:text>
157 <xsl:call-template name=
"dectohex">
158 <xsl:with-param name=
"number" select=
"30000 + position()"/>
169 <xsl:for-each select='.//UML:Class[.//UML:Stereotype/@xmi.
idref=
"dffopt"]'
>
170 <xsl:variable name =
"optname">
171 <xsl:value-of select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.
idref=
"optname"]/UML:TaggedValue.dataValue'
/>
173 <xsl:variable name=
"fopid">
174 <xsl:for-each select='.//UML:TaggedValue[.//UML:TagDefinition/@xmi.
idref=
"fopid"]'
>
175 <xsl:value-of select='UML:TaggedValue.dataValue'
/>
180 <xsl:call-template name=
"idtoqname">
181 <xsl:with-param name=
"id"><xsl:value-of select=
"$optname"/></xsl:with-param>
183 <xsl:text> =
</xsl:text>
184 <xsl:value-of select=
"$fopid"/>
185 <xsl:text>; //
0x
</xsl:text>
186 <xsl:call-template name=
"dectohex">
187 <xsl:with-param name=
"number" select=
"$fopid"/>
196 #endif // INCLUDED_RESOURCESIDS

</xsl:text></out>
199 <xsl:template name='idtoqname'
>
200 <xsl:param name='id'
/>LN_
<xsl:value-of select='substring-after($id,
":")'
/>
203 <xsl:template name='dectohex'
>
204 <xsl:param name=
"number"/>
205 <xsl:if test=
"$number > 16">
206 <xsl:call-template name=
"dectohex">
207 <xsl:with-param name=
"number" select=
"floor($number div 16)"/>
210 <xsl:value-of select=
"substring('0123456789abcdef', $number mod 16 + 1, 1)"/>