Revision 4307
Added by ben leinfelder over 15 years ago
LoadScripts.xsl | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<xsl:stylesheet |
|
3 |
xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder" |
|
4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
5 |
exclude-result-prefixes="mb" version="1.0" > |
|
6 |
<!-- |
|
7 |
Description: Convert Mapbuilder Config to a list of buttons. |
|
8 |
Author: Mike Adair |
|
9 |
Licence: LGPL as per: http://www.gnu.org/copyleft/lesser.html |
|
10 |
|
|
11 |
ButtonBar.xsl,v 1.5 2004/03/25 21:25:43 madair1 Exp |
|
12 |
|| mb:widgets/* || mb:tools/* |
|
13 |
--> |
|
14 |
|
|
15 |
<xsl:output method="html" omit-xml-declaration="yes"/> |
|
16 |
|
|
17 |
<xsl:param name="baseDir">/mapbuilder/lib</xsl:param> |
|
18 |
|
|
19 |
<xsl:template match="/mb:MapbuilderConfig"> |
|
20 |
<xsl:apply-templates /> |
|
21 |
</xsl:template> |
|
22 |
|
|
23 |
<xsl:template match="mb:models/*"> |
|
24 |
<xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/model/<xsl:value-of select="name(.)"/>.js</xsl:variable> |
|
25 |
<script type="text/javascript" src="{$scriptfile}"></script> |
|
26 |
<xsl:apply-templates /> |
|
27 |
</xsl:template> |
|
28 |
|
|
29 |
<xsl:template match="mb:widgets/*"> |
|
30 |
<xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/widget/<xsl:value-of select="name(.)"/>.js</xsl:variable> |
|
31 |
<script type="text/javascript" src="{$scriptfile}"></script> |
|
32 |
<xsl:apply-templates select="mb:scriptfile"/> |
|
33 |
</xsl:template> |
|
34 |
|
|
35 |
<xsl:template match="mb:tools/*"> |
|
36 |
<xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/tool/<xsl:value-of select="name(.)"/>.js</xsl:variable> |
|
37 |
<script type="text/javascript" src="{$scriptfile}"></script> |
|
38 |
</xsl:template> |
|
39 |
|
|
40 |
<xsl:template match="mb:scriptfile"> |
|
41 |
<xsl:variable name="scriptfile"><xsl:value-of select="."/></xsl:variable> |
|
42 |
<script type="text/javascript" src="{$scriptfile}"></script> |
|
43 |
</xsl:template> |
|
44 |
|
|
45 |
<xsl:template match="text()|@*"/> |
|
46 |
|
|
47 |
</xsl:stylesheet> |
|
1 |
<?xml version="1.0"?> |
|
2 |
<xsl:stylesheet xmlns:mb="http://mapbuilder.sourceforge.net/mapbuilder" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="mb" version="1.0"><xsl:output method="html" omit-xml-declaration="yes"/><xsl:param name="baseDir">/mapbuilder/lib</xsl:param><xsl:template match="/mb:MapbuilderConfig"><xsl:apply-templates/></xsl:template><xsl:template match="mb:models/*"><xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/model/<xsl:value-of select="name(.)"/>.js</xsl:variable><script type="text/javascript" src="{$scriptfile}"/><xsl:apply-templates/></xsl:template><xsl:template match="mb:widgets/*"><xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/widget/<xsl:value-of select="name(.)"/>.js</xsl:variable><script type="text/javascript" src="{$scriptfile}"/><xsl:apply-templates select="mb:scriptfile"/></xsl:template><xsl:template match="mb:tools/*"><xsl:variable name="scriptfile"><xsl:value-of select="$baseDir"/>/tool/<xsl:value-of select="name(.)"/>.js</xsl:variable><script type="text/javascript" src="{$scriptfile}"/></xsl:template><xsl:template match="mb:scriptfile"><xsl:variable name="scriptfile"><xsl:value-of select="."/></xsl:variable><script type="text/javascript" src="{$scriptfile}"/></xsl:template><xsl:template match="text()|@*"/></xsl:stylesheet> |
Also available in: Unified diff
upgrade to MapBuilder 1.5rc2 - includes support for Firefox 3 compatibility (yes, it is also EOLed)