Re: Is this a valid XPath?

Discussion in 'XML' started by Marrow, Aug 20, 2003.

  1. Marrow

    Marrow Guest

    Hi Derek,

    > Is this a valid XPath?:
    >
    > <xsl:for-each select="addressbook/address/[starts-with(state, 'M')]">


    No, it is not valid. A '/' step must be followed by a node test - but you
    have a '/' immediately followed by a predicate [].

    Try...
    <xsl:for-each select="addressbook/address[starts-with(state, 'M')]">

    Hope this helps
    Marrow
    http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
    http://www.topxml.com/Xselerator
    Marrow, Aug 20, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marvin_123456

    "Memory leak" in javax.xml.xpath.XPath

    Marvin_123456, Jul 29, 2005, in forum: Java
    Replies:
    4
    Views:
    1,953
    jan V
    Jul 29, 2005
  2. Alastair Cameron
    Replies:
    1
    Views:
    7,364
    SQL Server Development Team [MSFT]
    Jul 8, 2003
  3. Anna
    Replies:
    0
    Views:
    505
  4. Replies:
    3
    Views:
    367
    David Carlisle
    Jan 12, 2005
  5. howa
    Replies:
    3
    Views:
    3,652
    Dimitre Novatchev
    Sep 30, 2007
Loading...

Share This Page