is-wml.xsl revision 4fe4e4f798a84a46e567f64ceadd3648eb0582d4
0N/A<?xml version="1.0" encoding="UTF-8"?>
1472N/A
0N/A<!--
0N/A DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A
0N/A Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
0N/A
0N/A The contents of this file are subject to the terms
0N/A of the Common Development and Distribution License
0N/A (the License). You may not use this file except in
0N/A compliance with the License.
0N/A
0N/A You can obtain a copy of the License at
0N/A https://opensso.dev.java.net/public/CDDLv1.0.html or
0N/A opensso/legal/CDDLv1.0.txt
0N/A See the License for the specific language governing
0N/A permission and limitations under the License.
0N/A
1472N/A When distributing Covered Code, include this CDDL
1472N/A Header Notice in each file and include the License file
1472N/A at opensso/legal/CDDLv1.0.txt.
0N/A If applicable, add the following below the CDDL Header,
0N/A with the fields enclosed by brackets [] replaced by
0N/A your own identifying information:
0N/A "Portions Copyrighted [year] [name of copyright owner]"
0N/A
0N/A $Id: is-wml.xsl,v 1.2 2008/06/25 05:48:39 qcheng Exp $
0N/A
0N/A-->
0N/A
0N/A<!-- This stylesheet converts an is:Inquiry into a WML deck.
0N/A Note that this an example.
0N/A This could be customized during deployement.
0N/A -->
0N/A<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
0N/A xmlns:is="urn:liberty:is:2003-08" exclude-result-prefixes="is">
0N/A
0N/A <xsl:output method="xml" version="4.0" encoding="UTF-8" omit-xml-declaration="yes" />
0N/A
0N/A <xsl:variable name="trueLabel">
0N/A <xsl:value-of select="//is:Inquiry/@trueLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:variable name="falseLabel">
0N/A <xsl:value-of select="//is:Inquiry/@falseLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:variable name="helpLabel">
0N/A <xsl:value-of select="//is:Inquiry/@helpLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:variable name="hintLabel">
0N/A <xsl:value-of select="//is:Inquiry/@hintLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:variable name="linkLabel">
0N/A <xsl:value-of select="//is:Inquiry/@linkLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:variable name="moreLinkLabel">
0N/A <xsl:value-of select="//is:Inquiry/@moreLinkLabel"/>
0N/A </xsl:variable>
0N/A
0N/A <xsl:template match="/">
0N/A <xsl:apply-templates select="//is:Inquiry" />
0N/A </xsl:template>
0N/A
0N/A <xsl:template match="is:Inquiry">
0N/A <wml>
0N/A <xsl:apply-templates select="is:Confirm"/>
0N/A <xsl:apply-templates select="is:Select"/>
0N/A <xsl:apply-templates select="is:Text"/>
0N/A </wml>
0N/A </xsl:template>
0N/A
0N/A <xsl:template match="is:Text">
0N/A <card>
0N/A <p>
0N/A <xsl:value-of select="../@title"/>
0N/A <xsl:value-of select="is:Label"/>
0N/A <xsl:element name="input">
0N/A <xsl:attribute name="type">text</xsl:attribute>
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:attribute name="value"><xsl:value-of select="value"/></xsl:attribute>
0N/A </xsl:element>
0N/A <xsl:element name="do">
0N/A <xsl:attribute name="type">accept</xsl:attribute>
0N/A <xsl:element name="go">
0N/A <xsl:attribute name="href">
0N/A <xsl:value-of select="../@action"/>
0N/A </xsl:attribute>
0N/A <xsl:attribute name="method">post</xsl:attribute>
0N/A <xsl:element name="postfield">
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:attribute name="value">$(isparam_<xsl:value-of select="@name"/>)</xsl:attribute>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </p>
0N/A </card>
0N/A </xsl:template>
0N/A
0N/A <xsl:template match="is:Confirm">
0N/A <card>
0N/A <p>
0N/A <xsl:value-of select="../@title"/>
0N/A <xsl:value-of select="is:Label"/>
0N/A <xsl:element name="select">
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:element name="option">
0N/A <xsl:attribute name="value">true</xsl:attribute>
0N/A <xsl:value-of select="$trueLabel"/>
0N/A </xsl:element>
0N/A <xsl:element name="option">
0N/A <xsl:attribute name="value">false</xsl:attribute>
0N/A <xsl:value-of select="$falseLabel"/>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A <xsl:element name="do">
0N/A <xsl:attribute name="type">accept</xsl:attribute>
0N/A <xsl:element name="go">
0N/A <xsl:attribute name="href">
0N/A <xsl:value-of select="../@action"/>
0N/A </xsl:attribute>
0N/A <xsl:attribute name="method">post</xsl:attribute>
0N/A <xsl:element name="postfield">
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:attribute name="value">$(isparam_<xsl:value-of select="@name"/>)</xsl:attribute>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </p>
0N/A </card>
0N/A </xsl:template>
0N/A
0N/A <xsl:template match="is:Select">
0N/A <card>
0N/A <p>
0N/A <xsl:value-of select="../@title"/>
0N/A <xsl:value-of select="is:Label"/>
0N/A <xsl:element name="select">
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:apply-templates select="is:Item"/>
0N/A </xsl:element>
0N/A <xsl:element name="do">
0N/A <xsl:attribute name="type">accept</xsl:attribute>
0N/A <xsl:element name="go">
0N/A <xsl:attribute name="href">
0N/A <xsl:value-of select="../@action"/>
0N/A </xsl:attribute>
0N/A <xsl:attribute name="method">post</xsl:attribute>
0N/A <xsl:element name="postfield">
0N/A <xsl:attribute name="name">isparam_<xsl:value-of select="@name"/></xsl:attribute>
0N/A <xsl:attribute name="value">$(isparam_<xsl:value-of select="@name"/>)</xsl:attribute>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </xsl:element>
0N/A </p>
0N/A </card>
0N/A </xsl:template>
0N/A
0N/A <xsl:template match="is:Item">
0N/A <xsl:element name="option">
0N/A <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
0N/A <xsl:value-of select="@label"/>
0N/A </xsl:element>
0N/A </xsl:template>
0N/A
0N/A
0N/A</xsl:stylesheet>
0N/A