I think that the first xpath will create a dubble inner join in the actual SQL. The second xpath will only create one inner join due to the notation of the xpath. So the first xpath will probably return more results, due to the double inner join!
You can set the loglevels on TRACE on ConnectionBus_Retrieve to see the OQL/SQL statements that are used. With some manual work on the parameters, you can execute the created queries in PgAdmin to see what it fetches.
Because they are not the same!
Let's give a basic example, based on the Training Course Management application. You have Courses, Locations, TrainingEvents, Registrations and Trainees.
Give me all Locations a Trainee has to go to for Courses that cost more than 1000 euro's.
[Location_TrainingEvent/TrainingEvent/TrainingEvent_Registration/Registration/Registration_Trainee = '[%CurrentUser%]'] [Location_TrainingEvent/TrainingEvent/TrainingEvent_Course/Course/Price > 1000]
[Location_TrainingEvent/TrainingEvent[TrainingEvent_Course/Course/Price > 1000]/TrainingEvent_Registration/Registration/Registration_Trainee = '[%CurrentUser%]']
Only one of them will give you the correct answer, and it’s the second one. Translated into natural language, the first one reads: Give me all locations a Trainee has to go to that (also) host a course with a cost of more than 1000. This situation, whether you use a sub clause or not, is the same as your question.
I’ve wrote 2 blog posts about this behavior with examples and the SQL explained if you are interested in more information on this: