1 | <?xml version="1.0"?>
|
---|
2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
3 | xmlns:ng="http://docbook.org/docbook-ng"
|
---|
4 | xmlns:db="http://docbook.org/ns/docbook"
|
---|
5 | xmlns:exsl="http://exslt.org/common" version="1.0"
|
---|
6 | exclude-result-prefixes="exsl db ng">
|
---|
7 |
|
---|
8 | <!--
|
---|
9 | ********************************************************************************
|
---|
10 | $Id: eclipse3.xsl 9149 2011-11-12 00:12:07Z bobstayton $
|
---|
11 |
|
---|
12 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
13 | See ../README or http://docbook.sf.net/release/xsl/current/ for
|
---|
14 | copyright and other information.
|
---|
15 |
|
---|
16 | * Copyright (c) 2008 Standards for Technology in Automotive Retail and others.
|
---|
17 | * All rights reserved. This program and the accompanying materials
|
---|
18 | * are made available under the terms of the Eclipse Public License v1.0
|
---|
19 | * which accompanies this distribution, and is available at
|
---|
20 | * http://www.eclipse.org/legal/epl-v10.html
|
---|
21 | *
|
---|
22 | * Contributors:
|
---|
23 | * David Carver - STAR - Extended existing eclipse.xsl file to produce valid
|
---|
24 | * eclipse 3.3 plugin.xml with a manifest file.
|
---|
25 | *******************************************************************************
|
---|
26 | -->
|
---|
27 |
|
---|
28 | <xsl:import href="eclipse.xsl"/>
|
---|
29 |
|
---|
30 | <xsl:param name="eclipse.manifest">1</xsl:param>
|
---|
31 | <xsl:param name="create.plugin.xml">1</xsl:param>
|
---|
32 |
|
---|
33 | <xsl:template name="plugin.xml">
|
---|
34 | <xsl:if test="$create.plugin.xml != 0">
|
---|
35 | <xsl:call-template name="write.chunk">
|
---|
36 | <xsl:with-param name="filename">
|
---|
37 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
38 | <xsl:value-of select="$chunk.base.dir" />
|
---|
39 | </xsl:if>
|
---|
40 | <xsl:value-of select="'plugin.xml'" />
|
---|
41 | </xsl:with-param>
|
---|
42 | <xsl:with-param name="method" select="'xml'" />
|
---|
43 | <xsl:with-param name="encoding" select="'utf-8'" />
|
---|
44 | <xsl:with-param name="indent" select="'yes'" />
|
---|
45 | <xsl:with-param name="quiet" select="$chunk.quietly"/>
|
---|
46 | <xsl:with-param name="content">
|
---|
47 | <xsl:choose>
|
---|
48 |
|
---|
49 | <xsl:when test="$eclipse.manifest = '1'">
|
---|
50 | <plugin>
|
---|
51 | <extension point="org.eclipse.help.toc">
|
---|
52 | <toc file="toc.xml" primary="true" />
|
---|
53 | </extension>
|
---|
54 | <xsl:if test="$generate.index = 1">
|
---|
55 | <extension point="org.eclipse.help.index">
|
---|
56 | <index file="index.xml"/>
|
---|
57 | </extension>
|
---|
58 | </xsl:if>
|
---|
59 | </plugin>
|
---|
60 | <xsl:call-template name="write.chunk">
|
---|
61 | <xsl:with-param name="filename">
|
---|
62 | <xsl:if test="$manifest.in.base.dir != 0">
|
---|
63 | <xsl:value-of select="$chunk.base.dir" />
|
---|
64 | </xsl:if>
|
---|
65 | <xsl:value-of select="'META-INF/'" />
|
---|
66 | <xsl:value-of select="'MANIFEST.MF'" />
|
---|
67 | </xsl:with-param>
|
---|
68 | <xsl:with-param name="method" select="'text'" />
|
---|
69 | <xsl:with-param name="encoding" select="'utf-8'" />
|
---|
70 | <xsl:with-param name="quiet" select="$chunk.quietly"/>
|
---|
71 | <xsl:with-param name="content">
|
---|
72 | <xsl:call-template name="manifest.content"/>
|
---|
73 | </xsl:with-param>
|
---|
74 | </xsl:call-template>
|
---|
75 | </xsl:when>
|
---|
76 |
|
---|
77 | <xsl:otherwise>
|
---|
78 | <plugin name="{$eclipse.plugin.name}" id="{$eclipse.plugin.id}"
|
---|
79 | version="1.0" provider-name="{$eclipse.plugin.provider}">
|
---|
80 | <extension point="org.eclipse.help.toc">
|
---|
81 | <toc file="toc.xml" primary="true" />
|
---|
82 | </extension>
|
---|
83 | <xsl:if test="$generate.index = 1">
|
---|
84 | <extension point="org.eclipse.help.index">
|
---|
85 | <index file="index.xml"/>
|
---|
86 | </extension>
|
---|
87 | </xsl:if>
|
---|
88 | </plugin>
|
---|
89 | </xsl:otherwise>
|
---|
90 |
|
---|
91 | </xsl:choose>
|
---|
92 | </xsl:with-param>
|
---|
93 | </xsl:call-template>
|
---|
94 | </xsl:if>
|
---|
95 | </xsl:template>
|
---|
96 |
|
---|
97 | <xsl:template name="manifest.content">
|
---|
98 | <xsl:text>Manifest-Version: 1.0</xsl:text>
|
---|
99 | <xsl:text>
</xsl:text>
|
---|
100 | <xsl:text>Bundle-Version: 1.0</xsl:text>
|
---|
101 | <xsl:text>
</xsl:text>
|
---|
102 | <xsl:text>Bundle-Name: </xsl:text><xsl:value-of select="$eclipse.plugin.name"/>
|
---|
103 | <xsl:text>
</xsl:text>
|
---|
104 | <xsl:text>Bundle-SymbolicName: </xsl:text><xsl:value-of select="$eclipse.plugin.id"/>
|
---|
105 | <xsl:text>
</xsl:text>
|
---|
106 | <xsl:text>Bundle-Vendor: </xsl:text><xsl:value-of select="$eclipse.plugin.provider"/>
|
---|
107 | <xsl:text>
</xsl:text>
|
---|
108 | </xsl:template>
|
---|
109 |
|
---|
110 | </xsl:stylesheet>
|
---|
111 |
|
---|