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

RE: xsl:if and xsl:when

Subject: RE: xsl:if and xsl:when
From: "Medina, Edward" <emedina@xxxxxxx>
Date: Thu, 30 Mar 2000 11:37:40 -0500
edward medina
>
>
><xsl:when test="contains (@obj.id,'../packet/illust')">
>
>This is testing if the current element has an obj.id that contains that
>string as a substring of the attribute value, so it is true
>on <image obj.id="xxxx../packet/illustyyy'> and false on <image/> I
>suspect that isn't what you want but perhaps it is?


You are right that is not what I wanted but, I just tried 

<xsl:when test="contains (@reference,'.../graphics/gif/DSRbanner.gif')">

and it worked.  You are the man!  my mistake was that I was testing for
something that 
was not there.

This is my xml

.... (ommited code)

<illust secur.const="SPECIAL" poc.agency="BTG"	poc.orgcode="RAR"
poc.author="Edward Medina"
	  poc.phone="(813)-288-0333" poc.email="emedina@xxxxxxx"
	  obj.cutdate="February 22, 2000" obj.id="1"
	  level="1" >
					<image
reference=".../graphics/gif/DSRbanner.gif">

					 </image>
	</illust>
.... (ommited code)


Thank you!  I thought I had tried that before, but apparently not.  It
works.

I also want to thank all the other people who tried to help me.  I've
learned a little
today, and there is room for improvement.  Thanks again!

Eddy



-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Thursday, March 30, 2000 10:58 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: xsl:if and xsl:when



> I am using the saxon parser to convert to HTML and 
> maybe its does not support advance syntax under test.  Or maybe its the
> operator (me) that has it wrong.

saxon like any other system has the odd bug, but it is probably the most
complete xsl system there is, so I would guess that it is the operator.

Given no information what the source tree looks like, it's hard to guess
what the queries should be.

but...

<xsl:when test="contains (@obj.id,'../packet/illust')">

This is testing if the current element has an obj.id that contains that
string as a substring of the attribute value, so it is true
on <image obj.id="xxxx../packet/illustyyy'> and false on <image/> I
suspect that isn't what you want but perhaps it is?

David


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


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


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.