RE: [xsl] xsl query to determine image

Subject: RE: [xsl] xsl query to determine image
From: "Onur Esnaf" <oesnaf@xxxxxxxxxxxxxxx>
Date: Fri, 23 May 2003 18:15:53 +0300
excuse me.
I couldn' find the new post link

I want to execute a SELECT DISTINCT querry in a node tree.

A have a node tree below

		<person name="john" date="5/22/2003" time="10:00" duration="2" />
		<person name="john" date="5/22/2003" time="12:00" duration="1" />
		<person name="john" date="5/22/2003" time="13:00" duration="2" />
		<person name="marry" date="5/22/2003" time="12:00" duration="1" />
		<person name="bob" date="5/22/2003" time="9:00" duration="2" />
		<person name="bob" date="5/22/2003" time="11:00" duration="2" />
		<person name="john" date="5/22/2003" time="11:00" duration="2" />
		<person name="john" date="5/23/2003" time="10:00" duration="1" />
		<person name="jan" date="5/23/2003" time="10:00" duration="2" />
		<person name="sany" date="5/23/2003" time="19:00" duration="2" />
		<person name="marry" date="5/23/2003" time="15:00" duration="2" />

	How can I have a query like "SELECT DISTINCT name FROM salesStaff WHERE date = today"
	This will return the names of the salesmen who has an appointment today.
	But each name must be returned only once.


-----Original Message-----
From: Philip Fitzsimons [mailto:pfitzsimons@xxxxxxxxxxx]
Sent: Friday, May 23, 2003 5:55 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] xsl query to determine image

Needs a dollar $ for the variable
<img src="{$unparsed-entity-uri('Image2')}" />

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Sawyer, Larry
Sent: 23 May 2003 15:42
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject: [xsl] xsl query to determine image

I'm trying to write some xsl that will fill in a simple gif image given a
field value from the xml.  I have it working until I try and define which
image will be shown given the severity value (see where I put the comments).
I can't figure out how to define the image to be show given the severity

Please help.

<?xml version="1.0"?>

<xsl:template match="rootElement">
      <title>Curt OLTX</title>
    <body bgcolor="white">
      <table width="300px">

	  <xsl:sort select="site"/>


<xsl:template match="id">
  <xsl:variable name="tmpSite"><xsl:value-of select="site"/></xsl:variable>

    <xsl:when test="contains('DAL', substring($tmpSite,1,3)) or
contains('MKO', substring($tmpSite,1,3)) or contains('MRO',

      <xsl:if test="contains('DAL1',$tmpSite)">
        <tr><td colspan="4" align="center"><b>Dallas</b></td></tr>

      <xsl:if test="contains('MKO1',$tmpSite)">
        <tr><td colspan="4"

      <xsl:if test="contains('MRO1',$tmpSite)">
        <tr><td colspan="4"

<!-- This is the section where I'm having trouble.  Everything within the
comments section is breaking the xsl.  I did something similar for another
report where I defined the table background from the severity, but I can't
figure out how to do it in this report with the image -->

<xsl:template match="id">
  <xsl:param name="severity" />

  <xsl:variable name="unparsed-entity-uri">
      <xsl:when test="severity = 'MINOR'">Image2</xsl:when>
      <xsl:when test="severity = 'CRITICAL'">Image3</xsl:when>
   <td><xsl:value-of select="site"/><br>
	<img src="{unparsed-entity-uri('Image2')}" /> </br></td>   

<!-- End area that is breaking the report -->


<xsl:template match="servletPath"/>


 XSL-List info and archive:

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread