[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Tag Replacement

Subject: Re: Tag Replacement
From: bernwardhanssen@xxxxxx
Date: Fri, 15 Feb 2002 07:21:01 +0100
vxml doctype tag
Hi 

Take <xsl:apply-templates select="a">
and create a Template

<xsl:template match="a">
<voice>
....
</voice>
</xsl:template>



> Hi,
> I'm attempting to use XSL to do the following:
> 
> Input document:
> 
> <?xml version="1.0"?>
> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
> "http://www.wapforum.org/DTD/wml_1.1.xml">
> <wml>
> 	<card id="welcome" title="Welcome">
> 		<p><strong>Welcome to this WAP page!</strong></p>
> 		<a href="products.wml">Products</a>
> 		<p><a href="links.wml"><small>Links</small></a></p>
> 	</card>
> </wml>
> 
> Output document:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <vxml>
> 	<form id="welcome">
> 		<field>
> 			<prompt>Welcome to this WAP page!
> 			<voice gender="female">Products</voice>
> 			<voice gender="female">Links</voice></prompt>
> 		</field>
> 	</form>
> </vxml>
> 
> In other words, I'm attempting to strip all the displayed text from the
> original document and display it in the transformed document, but each
> anchor tag ("<a...") is replaced by a <voice> tag. The following XSL will do
> all this, except handle the anchor cases (it will ouput the above "output
> document" without the voice tags):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 	<xsl:output method="xml" version="1.0" encoding="UTF-8"
> indent="yes"/>
> 	<xsl:template match="/">
> 		<vxml version="1.0">
> 			<xsl:for-each select="*/card">
> 				<form id="{@id}">
> 					<field>
> 					<xsl:for-each select="*">
> 
> 						<xsl:value-of select="."/>
> 					</xsl:for-each>
> 					</field>
> 				</form>
> 			</xsl:for-each>
> 		</vxml>
> 	</xsl:template>
> 	</xsl:template>
> </xsl:stylesheet>
> 
> What changes are necessary to get it to work in the desired fashion? Thanks
> in advance!
> 
> Greg Gerou
> ggerou@xxxxxxxxxxxxxx
> 
>  
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


______________________________________________________________________________
Geben Sie Ihren Lottotipp gerne auf den letzten Drücker ab?Beim WEB.DE
Lottoservice gibt's keine Warteschlangen. http://tippen2.web.de/?x=9


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • Tag Replacement
    • Greg Gerou - Thu, 14 Feb 2002 18:42:29 -0500 (EST)
      • <Possible follow-ups>
      • bernwardhanssen - Fri, 15 Feb 2002 01:18:55 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.