home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <!--
- 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.
- -->
-
- <!-- CVS $Id: logicsheet.xsp,v 1.2 2004/04/05 12:25:30 antonio Exp $ -->
-
- <!-- XSP can be assotiated with the logicsheet using processing
- instruction xml-logicsheet or the xsp:logicsheet element.
- Do not use both methods!
-
- <?xml-logicsheet href="logicsheets/hello.xsl"?>
-
- -->
-
- <xsp:page language="java"
- xmlns:xsp="http://apache.org/xsp"
- xmlns:xsp-request="http://apache.org/xsp/request/2.0"
- xmlns:xsp-hello="http://apache.org/xsp/hello/1.0">
-
- <xsp:logicsheet location="logicsheets/hello.xsl"/>
-
- <!-- Context URL also can be used:
-
- <xsp:logicsheet location="context://samples/xsp/logicsheets/hello.xsl"/>
-
- URL relative to the current sitemap CAN NOT be used, as
- logicsheet is the global object, shared between all sitemaps.
- -->
-
- <page>
- <title>Greetings Page</title>
- <content>
- <xsp:logic>
- String name = <xsp-request:get-parameter name="name"/>;
- if (name == null) {
- <para>
- <!-- Print default greeting -->
- <xsp-hello:greeting name="Unknown"/>
- <form action="logicsheet">
- Please enter your name: <input name="name"/> <input type="submit"/>
- </form>
- </para>
- } else {
- <para>
- <!-- Override default greeting -->
- <xsp-hello:greeting value="Welcome to this small logicsheet sample">
- <!-- Alternate way of specifying name attribute -->
- <xsp-hello:name><xsp:expr>name</xsp:expr></xsp-hello:name>
- </xsp-hello:greeting>
- </para>
-
- <para>
- This greeting above was created using simple logicsheet.
- </para>
- }
- </xsp:logic>
- </content>
- </page>
- </xsp:page>
-