XQL 'id' function in XML::XQL

Discussion in 'Perl Misc' started by Lars Kellogg-Stedman, Nov 16, 2005.

  1. After reading through the XQL specs, it is my impression that given the
    following input:

    <container>
    <item id="foo">item 1</item>
    <item id="bar">item 2</item>
    </container>

    The following code should work:

    $doc = XML::DOM::parser->new->parse(...above text...);
    $doc->xql("id('foo')");

    Whereby "work" I mean it should return a reference to the <item
    id="foo"/> node. Instead it always results in 0 matches. I've replaced
    it with:

    $doc->xql("//item[\@id='foo']");

    Which does work, but I'm curious if (a) I've misunderstood the XQL spec,
    or (b) if XML::XQL is broken.

    Thanks,

    -- Lars

    --
    Lars Kellogg-Stedman <>
    This email address will expire on 2005-11-22.
     
    Lars Kellogg-Stedman, Nov 16, 2005
    #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. Bomb Diggy
    Replies:
    0
    Views:
    461
    Bomb Diggy
    Jul 28, 2004
  2. kvs

    how to test xql

    kvs, Sep 11, 2003, in forum: XML
    Replies:
    0
    Views:
    425
  3. Tony Prichard
    Replies:
    0
    Views:
    772
    Tony Prichard
    Dec 12, 2003
  4. Adam Retter
    Replies:
    0
    Views:
    1,061
    Adam Retter
    Feb 9, 2005
  5. Erik Wasser
    Replies:
    5
    Views:
    500
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page