home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <html xmlns:osm="http://osmosis.gr/osml/1.0">
- <head>
- <osm:pageTitle>
- <osm:text>Custom Example</osm:text>
- </osm:pageTitle>
- </head>
- <body contentID="content">
- <p class="title">
- <osm:text>Custom Example</osm:text>
- </p>
- <p class="paratitle">Custom elements</p>
- <p>It is possible to create any custom element. This element have to belong to osm: namespace</p>
- <p class="paratitle">For example</p>
- <p>We want to create an element that display an alert msg on click.</p>
- <p>The element:</p>
- <pre><![CDATA[<button caption="click here" msg="this is an alert message!!!"/> ]]></pre>
- <p>The xslt transformation saved in custombutton.xsl [osml/plugins/custombuttom.xsl]</p>
- <pre><![CDATA[
- <xsl:template match="osm:custombutton">
- <input type="button">
- <xsl:attribute name="value"><xsl:value-of select="@caption"/></xsl:attribute>
- <xsl:attribute name="onclick">alert('<xsl:value-of select="@msg"/>')</xsl:attribute>
- </input>
- </xsl:template>
- ]]></pre>
- <p>and our button:</p>
- <osm:custombutton caption="click here" msg="this is an alert message!!!"/>
- <p>to include these transformation instructions to othello we have to modify core.xsl</p>
- <pre><![CDATA[
- ...
- <xsl:include href="../plugins/custombutton.xsl"/>
- ...
- ]]></pre>
- </body>
- </html>
-