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

I thought i knew how to do this -- followup

Subject: I thought i knew how to do this -- followup
From: russurquhart1@xxxxxxxxxxx
Date: Wed, 23 Feb 2011 16:06:32 -0600 (CST)
 I thought i knew how to do this -- followup
I wanted to thanked everyone who replied. Special thanks to Wendell for patience as i ride my short little school bus of xsl! :)

I want to post my follow up source that appears to work, but also point out an anomaly, to me at least.

The code is as follows:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="@*|node()">
      <xsl:apply-templates select="@*|node()" />
  <xsl:template match="*[@filter]">
      <!--      <xsl:when test="contains(@filter, 'filter10') or contains(@filter, 'filter1')">-->
      <xsl:when test="contains(@filter, 'filter10') or (./@filter='filter1' and not(contains(@filter, 'filter17')))">
          <xsl:apply-templates select="@*|node()" />
      <xsl:otherwise />

(A little update. A filter value of 'filter1' will ONLY appear by itself and NOT in a string with other values, as i reported yesterday.) With that said i felt sure that  i could THEN test for the 'filter1' value by using a @filter='filter1' type of check. (Thinking the '=' would be a complete, exact type of comparison as opposed to a 'contains' function call.

When i ran the xsl, i did have some @filter='filter17' values, BUT these got matched by my @filter='filter1'  check. (I know because i took that conditional out and no 'filter17' values were output.) Is this correct?

To summarize. I thought:

./@filter='filter1'  would NOT match  @filter='filter17'

but fully expected

contains(. , 'filter1') to match  @filter='filter17'.

When someone get time, no hurry, could they explain this anomaly to me?



Current Thread


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.
First Name
Last Name
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.