Subject: RE: [xsl] XSL checkbox From: "Mho Salim" <mho@xxxxxxxxxxxx> Date: Tue, 18 May 2004 09:09:17 -0600 |
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] 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'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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL checkbox, Adrian Popescu | Thread | RE: [xsl] XSL checkbox, Andrew Welch |
Re: [xsl] XSL checkbox, Adrian Popescu | Date | Re: [xsl] XSL checkbox, Joe Fawcett |
Month |