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

Re: XSL Queries

Subject: Re: XSL Queries
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Sun, 12 Feb 2006 09:09:28 +0000
xsl queries

   <xsl:when test="($basics &gt;= 'understood')">
       <xsl:message terminate = "yes">Feel free to ask</xsl:message>

could have been

<xsl:if test="($basics &gt;= 'understood')">
      <xsl:message terminate = "yes">Feel free to ask</xsl:message>
   </xsl:if >

with just a single test case...

<xsl:with-param name="effort">basics</xsl:with-param>
is better with
<xsl:with-param name="effort" select = "'basics'"/>

Its true what andrew said.. you must learn atleast some basics or look into faqs or do some work before jumping into the lists...
anyway as you have asked, i shall give u some inputs ...

use a xsl:for-each select = "catagory" to loop through the catagories and use
<xsl:value-of select = "@type"/> to print the types. This is all XSL can do for you.
clicking the link and displaying the price is not its job.. you can possibly use javascript for this.

this might work for you

lemme do the whole thing for you. I think i have some free time.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="orders">
<script type="text/javascript">

function myfunction (price)
// 1. get the div with id = "showprice".. this is where the price will show up

var showprice = document.getElementById ( "showprice")

//2. get the div with id = "price".. this is the div that has the price value
// this div is set to invisible mode by style= display:none

var priceVal = document.getElementById(price)

				// Setting the showprice div with the price value
			  		showprice.innerHTML = priceVal.innerText;
		<table border="1">
				<td >
					<xsl:for-each select="category">
						<div id = "{@type}">
							<a onclick="myfunction({price})" href = "#">
								<xsl:value-of select="@type"/>
						<div id = "{price}" style="display:none">
							<xsl:value-of select="price"/>
					<div id = "showprice"></div>


From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  XSL Queries
Date: Sat, 11 Feb 2006 16:52:05 +1100


This should solve your problem:

<xsl:template match="bookstore">
<xsl:apply-templates select="book[(@author='Kay') or (@author='Tennyson')]" />
<xsl:call-template name="diy" />
<xsl:when test="($basics &gt;= 'understood')">
<xsl:message terminate = "yes">Feel free to ask</xsl:message>

<xsl:template match="book">
   <xsl:call-template name="read">
       <xsl:with-param name="effort">basics</xsl:with-param>

manoj kumar wrote:

Hi everyone,

    I have an xml file with details
<category type='shirt'>
<category type='Tshirt'>
<category type='Jeans'>
<category type='Pant'>

In an xsl file i have to list type of categories in left side on clicking=
particular tag the price details should be displayed on right. Give me a =
sample of this, so that i can develop it further [

EX: click link pant should display 750 on right hand side

Please send to this email-ID :b_manoj@xxxxxxxxx

Thanks in Advance,

Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Current Thread


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.
First Name
Last Name
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.