You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Damir Aysin <da...@inbox.ru> on 2002/02/16 06:46:15 UTC

XPath issue

Hi !

Anybody knows why follow "xindice xpath -c /db/colors -q /color[position()<6]" doesn't work in Xindice.
And same problem with Java code, it's doesn't work. 
://

Damir

Re: XPath issue

Posted by Damir Aysin <da...@inbox.ru>.
Yes, I think it's TRUE!!!
I found same problem. Xindice doesn't allow make collection "nameA", and elements "nameA" inside that collection.

Damir

  ----- Original Message ----- 
  From: Mark J. Stang 
  To: xindice-users@xml.apache.org 
  Sent: 2002-02-16 7:32 PM
  Subject: Re: XPath issue


  I think someone said that you can't put a document 
  called "colors" in a collection called "colors".   Does 
  anyone know if this is true? 
  Mark 

  Brian Blakeley wrote: 


Re: XPath issue

Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Saturday, February 16, 2002, at 08:32 AM, Mark J. Stang wrote:
> I think someone said that you can't put a document
> called "colors" in a collection called "colors".   Does
> anyone know if this is true?

This is not true.  The names of documents instead of a collection are 
independent of the name of the collection itself.  The only place where 
this is a problem is in resolving a document in a collection that has 
the same name as a sub-collection of the collection.  And it is only a 
problem if you're using a fully qualified URL to address both... like in 
our GET script.  In the XML:DB API, this is not the case.

--
Tom Bradford - http://www.tbradford.org
Architect - XQRL (XQuery Engine) - http://www.xqrl.com
Apache Xindice (Native XML Database) - http://xml.apache.org
Project Labrador (Web Services Framework) - http://notdotnet.org


Re: XPath issue

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I think someone said that you can't put a document
called "colors" in a collection called "colors".   Does
anyone know if this is true?

Mark

Brian Blakeley wrote:

> What happens if you try:             xindice xpath -c /db/colors -q
> "//color[position()<'6']" I think it might work for you. Brian
>
>      ----- Original Message -----
>
>      ----- Original Message -----
>      From: Damir Aysin
>      To: xindice-users@xml.apache.org
>      Sent: Saturday, February 16, 2002 1:05 AM
>      Subject: Re: XPath issue
>       I'm sorry Miguel...but it still doesn't reply any data.
>
>           ----- Original Message -----
>           From: Miguel Angel Urrutia Soler
>           To: xindice-users@xml.apache.org
>           Sent: 2002-02-16 10:00 AM
>           Subject: Re: XPath issue
>            quoted : xindice xpath -c /db/colors -q
>           "/color[position()<'6']"
>
>                ----- Original Message -----
>                From: Damir Aysin
>                To: xindice-users@xml.apache.org
>                Sent: Friday, February 15, 2002 11:46 PM
>                Subject: XPath issue
>                 Hi ! Anybody knows why follow "xindice
>                xpath -c /db/colors -q
>                /color[position()<6]" doesn't work in
>                Xindice.And same problem with Java code,
>                it's doesn't work.:// Damir
>

Re: XPath issue

Posted by Brian Blakeley <br...@cogeco.ca>.
What happens if you try:

            xindice xpath -c /db/colors -q "//color[position()<'6']"

I think it might work for you.

Brian


  ----- Original Message ----- 
  ----- Original Message ----- 
  From: Damir Aysin 
  To: xindice-users@xml.apache.org 
  Sent: Saturday, February 16, 2002 1:05 AM
  Subject: Re: XPath issue


  I'm sorry Miguel...but it still doesn't reply any data.


    ----- Original Message ----- 
    From: Miguel Angel Urrutia Soler 
    To: xindice-users@xml.apache.org 
    Sent: 2002-02-16 10:00 AM
    Subject: Re: XPath issue


    quoted : xindice xpath -c /db/colors -q "/color[position()<'6']"
      ----- Original Message ----- 
      From: Damir Aysin 
      To: xindice-users@xml.apache.org 
      Sent: Friday, February 15, 2002 11:46 PM
      Subject: XPath issue


      Hi !

      Anybody knows why follow "xindice xpath -c /db/colors -q /color[position()<6]" doesn't work in Xindice.
      And same problem with Java code, it's doesn't work. 
      ://

      Damir

Re: XPath issue

Posted by Damir Aysin <da...@inbox.ru>.
I'm sorry Miguel...but it still doesn't reply any data.


  ----- Original Message ----- 
  From: Miguel Angel Urrutia Soler 
  To: xindice-users@xml.apache.org 
  Sent: 2002-02-16 10:00 AM
  Subject: Re: XPath issue


  quoted : xindice xpath -c /db/colors -q "/color[position()<'6']"
    ----- Original Message ----- 
    From: Damir Aysin 
    To: xindice-users@xml.apache.org 
    Sent: Friday, February 15, 2002 11:46 PM
    Subject: XPath issue


    Hi !

    Anybody knows why follow "xindice xpath -c /db/colors -q /color[position()<6]" doesn't work in Xindice.
    And same problem with Java code, it's doesn't work. 
    ://

    Damir

Re: XPath issue

Posted by Miguel Angel Urrutia Soler <ur...@hotmail.com>.
quoted : xindice xpath -c /db/colors -q "/color[position()<'6']"
  ----- Original Message ----- 
  From: Damir Aysin 
  To: xindice-users@xml.apache.org 
  Sent: Friday, February 15, 2002 11:46 PM
  Subject: XPath issue


  Hi !

  Anybody knows why follow "xindice xpath -c /db/colors -q /color[position()<6]" doesn't work in Xindice.
  And same problem with Java code, it's doesn't work. 
  ://

  Damir

Re: newbie xpath question

Posted by Øyvind Vestavik <Oy...@idi.ntnu.no>.
Thanks Krzysztof. That did the trick :-)

Øyvind Vestavik
Øvre Møllenberggt 44b
7014 Trondheim
oyvindve@idi.ntnu.no
41422911



Re: newbie xpath question

Posted by Krzysztof Kowalczykiewicz <kr...@cs.put.poznan.pl>.
Hi!

//profile[username='Jeff' and pwd='JeffsPwd']

should work

Krzysztof Kowalczykiewicz



----- Original Message -----
From: "Øyvind Vestavik" <Oy...@idi.ntnu.no>
To: <xi...@xml.apache.org>
Cc: "Marius Mikalsen" <Ma...@idi.ntnu.no>
Sent: Monday, February 18, 2002 12:29 PM
Subject: newbie xpath question




Could someone give me a tip as to how to iclude AND OR and NOT
in a xpath querystring testing on different elements in a document?
Or maybe pass on a reference to where to look for info??

My actual problem is:

I have a sample xml doc in my Xindice.

<profile>
  <username>Jeff</username>
  <pwd>JeffsPwd</pwd>
  ......
</profile>

I want to check login for registered user. If the user enters a valid
combination of¨username and password (eg there exists a profile for the
given combination of username and pwd) the users will be logged in.

To look for profiles matches I try to use something like

   String xpath ="//profile/username[text='Jeff']";

which finds documents where the username if 'Jeff', but how do I find
documents where the username is 'Jeff' AND the pwd is 'JeffsPwd"????

I have tried with

   String
xpath="//profile/username[text='Jeff']&&//profile/pwd[text='JeffsPwd]=";

but this doesn't return the test document


Any hints would be appreciated.

Øyvind






newbie xpath question

Posted by Øyvind Vestavik <Oy...@idi.ntnu.no>.

Could someone give me a tip as to how to iclude AND OR and NOT
in a xpath querystring testing on different elements in a document?
Or maybe pass on a reference to where to look for info??

My actual problem is:

I have a sample xml doc in my Xindice.

<profile>
  <username>Jeff</username>
  <pwd>JeffsPwd</pwd>
  ......
</profile>

I want to check login for registered user. If the user enters a valid
combination of¨username and password (eg there exists a profile for the
given combination of username and pwd) the users will be logged in.

To look for profiles matches I try to use something like

   String xpath ="//profile/username[text='Jeff']";

which finds documents where the username if 'Jeff', but how do I find
documents where the username is 'Jeff' AND the pwd is 'JeffsPwd"????

I have tried with

   String
xpath="//profile/username[text='Jeff']&&//profile/pwd[text='JeffsPwd]=";

but this doesn't return the test document


Any hints would be appreciated.

Øyvind