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

RE: XSL checkbox

Subject: RE: XSL checkbox
From: "Mho Salim" <mho@xxxxxxxxxxxx>
Date: Tue, 18 May 2004 09:09:17 -0600
xsl checkbox
I think you were asking two questions. I hope this helps


(1)You may want something like this for loading multiple records
	<xsl:for-each select="/myform/thisrecord">
  		<xsl:variable name="title_id_value">
    		<xsl:value-of select="title_id_value"/>
  	</xsl:variable>
  	<xsl:variable name="title_value">
    		<xsl:value-of select="title_value"/>
  	</xsl:variable>
  	<titles title_id="{$title_id_value}" title="{$title_value}"
           ... and so on/>
</xsl:for-each>
You will need to feed this to your transformer with a XML file that defines
your variables. this wil be something like
<?xml-stylesheet href="yourstylesheet.xsl" type="text/xsl"?>
<myform>
<thisrecord>
<title_id_value>some value1</title_id_value>
<title_value>another value1 </title_value>
</thisrecord>
<thisrecord>
<title_id_value>some value2</title_id_value>
<title_value>another value2 </title_value>
</thisrecord>
</myform>

(2)For the conditional case you may want to use somethign like this
                        <xsl:if test="$test_value='firstvalue' ">
                          <tr height="15" bgcolor="red">
                        </xsl:if>
                        <xsl:if test="$test_value='secondvalue' ">
                          <tr height="15" bgcolor="blue">
                        </xsl:if>
Note that there is no <xsl:else> so ou are stuck with = and != etc.

Mho

-----Original Message-----
From: Adrian Popescu [mailto:adrian@xxxxxxxxxxxx]
Sent: Tuesday, May 18, 2004 8:09 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  XSL checkbox


Hi!
I have a problem!
I have an XML like this:

<?xml version="1.0" encoding="utf-8" ?>
<?xml:stylesheet type="text/xsl" href="titles.xsl" ?>
<titlelist>
  <titles title_id="BU1032" title="The Busy Executive&apos;s Database Guide"
type="business    " pub_id="1389"
  price="19.99" advance="5000" royalty="10" ytd_sales="4095" notes="An
overview of available database systems with
  emphasis on common business applications. Illustrated."
pubdate="1991-06-12T00:00:00"/>

<titles title_id="BU1111" title="Cooking with Computers: Surreptitious
Balance Sheets" type="business    "
  pub_id="1389" price="11.95" advance="5000" royalty="10" ytd_sales="3876"
notes="Helpful hints on how to use your
  electronic resources to the best advantage."
pubdate="1991-06-09T00:00:00"/>

</titlelist>

and I want an XSL
which have for every row with the title from xml an checkbox and when I
check this checkbox the background color of row is changed!
thanks

Current Thread

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.