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

select="..." expressions in XSLT

Subject: select="..." expressions in XSLT
From: "Knebels, Francis" <francis_knebels@xxxxxxxxx>
Date: Thu, 20 Dec 2001 11:34:23 -0500
xsl multiselect
I'm trying to get this XSL to work, but it is not giving me the output I'm
looking for.  The XSL looks like this:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template
match="/"><xsl:copy-of select="/campaign/question[@start-date
&lt;=20011220&lt;=@end-date]"/>
</xsl:template>
</xsl:stylesheet>

(the 20011220 can be replaced with any date in the form CCYYMMDD.)

When I run this, I don't just get the nodes (and children of the nodes) in
the specific date range.  I only get ones where the end-date is greater than
or equal to the 200011220.  I've searched the internet for examples if this
can even be done, but I haven't seen anything on compound expressions in
XSL.  The only thing I can think of doing as an alternative would be to
split the expression and run one transform.  then make the output a
well-formed document and then run the second part of the transform as a
second stylesheet.  

The XML I'm trying to transform looks like this:

<campaign name="some_survey" type="SURVEY">
   <question questionid="470" text="blah blah blah" ans-type="RADIOBUTTON"
max-responses="1" week-of="10/01/2001" start-date="20011001"
end-date="20011007" total-answered="0" respondents="0">
      <answer answerid="1982" text="answer one" sequence-nmbr="1"
total-answered="0"/>
   </question>
   <question questionid="471" text="question 2" ans-type="MULTISELECT"
max-responses="8" multiple-answers="Y" week-of="10/08/2001"
start-date="20011008" end-date="20011014" total-answered="34"
respondents="17">
      <answer answerid="1988" text="answer 1" sequence-nmbr="1"
total-answered="1"/>
   </question>

Can this be done as above with other syntax?  I tried <xsl:if> and I
couldn't get that to work either.  


Francis X. Knebels
Merck Vaccine Division
WP97-3W507
215.652.7710



 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.