Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XPath Select on Strings

From: daviddavidson3@---------.------
To: NULL
Date: 9/3/2004 6:57:00 PM
I've run into a rather frustrating idiosyncrasy and would greatly appreciate 
any insight.  I'm using XPath expressions in an XSLT for-each tag to filter 
data and show subsets of an XML data island to the user.  I'm using IE 6.0 
SP1 and creating the XML data island with an in-line XML tag.

The following XPath expression works great: NewDataSet/Table[Group = 'Group 
A']

This XPath expression returns nothing: NewDataSet/Table[Group >= 'Group A']

My XML data island also contains an integer field, and XPath relational 
expressions work great there.  I just seem to have a problem with the string 
fields.  Anybody have any ideas?  Thanks in advance...

Portion of my XML data island:
<NewDataSet>
  <Table>
    <Year>2004</Year>
    <Group>Group A</Group>
  </Table>
  <Table>
    <Year>2004</Year>
    <Group>Group B</Group>
  </Table>
  <Table>
    <Year>2004</Year>
    <Group>Group C</Group>
  </Table>
</NewDataSet>

Portion of the XSL I'm using for the transform:
  <xsl:template match="/">
    <table border="1" bordercolor="Black" cellpadding="2" cellspacing="0">
      <xsl:for-each select="NewDataSet/Table[Group >= 'Group C']">
        <tr>
          <td><nobr><xsl:value-of select="Year"/></nobr></td>
          <td><nobr><xsl:value-of select="Group"/></nobr></td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent