home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / page2vml.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.0 KB  |  62 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17.  
  18. <!--
  19.     The code is based on Motorola's VoxML (Version 1.2) implementation of
  20.     the emerging VoiceXML standard (version 0.9 as of 17 August '99).
  21.     Foremost is the absence of <form></form> tags that delineate input. That
  22.     said, when this file is rendered in Motorola's Mobile ADK simulator
  23.     (MADK, version 1 beta 4 this November) the interaction looks like this:
  24.  
  25.     Computer: Hello world! This is my first voice enabled cocoon page.
  26.  
  27.     If user says "repeat" then the computer repeats the prompt.
  28.     If the user says "goodbye" then the computer says "Goodbye" and ends the
  29.     session.
  30.  
  31.     Written by Theodore B. Achacoso, MD 991122 ted@groupserve.com
  32.     CVS $Id: page2vml.xsl,v 1.3 2004/03/06 02:25:32 antonio Exp $
  33. -->
  34.  
  35. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  36.  
  37.   <xsl:template match="page">
  38.     <DIALOG>
  39.      <STEP NAME="init">
  40.       <PROMPT><xsl:apply-templates/></PROMPT>
  41.       <INPUT TYPE="OPTIONLIST">
  42.        <OPTION NEXT="#init">repeat</OPTION>
  43.        <OPTION NEXT="#goodbye">goodbye</OPTION>
  44.       </INPUT>
  45.      </STEP>
  46.      <STEP NAME="goodbye">
  47.        <PROMPT>Goodbye</PROMPT>
  48.        <INPUT TYPE="NONE" NEXT="#end"/>
  49.      </STEP>
  50.     </DIALOG>
  51.   </xsl:template>
  52.  
  53.   <xsl:template match="title">
  54.    <!-- ignore -->
  55.   </xsl:template>
  56.  
  57.   <xsl:template match="para">
  58.    <xsl:apply-templates/>
  59.   </xsl:template>
  60.  
  61. </xsl:stylesheet>
  62.