What's the difference between these XPath queries?

Query A:
/ie[(./links/linkentry/@refid=‘0001000100000112’]) and
(./links/linkentry[@refid=‘0001000100000113’])]/@id

Query B:
/ie[(./links/linkentry/@refid=‘0001000100000112’) and
(./links/linkentry/@refid=‘0001000100000113’)]/@id

First one delivers no result, while the second one does what was expected. What part of XPath did I not understand here?

The first query should read

/ie[(./links/linkentry[@refid=‘0001000100000112’]) and
(./links/linkentry[@refid=‘0001000100000113’])]/@id

sorry for the typo

That surprises me too,

Although a query like:

/ie[(links/linkentry[@refid=‘0001000100000112’]) and
(links/linkentry[@refid=‘0001000100000113’])]/@id

, another like

/ie[(./links/linkentry[@refid=‘0001000100000112’]/@refid) and
(./links/linkentry[@refid=‘0001000100000113’]/@refid)]/@id

and another like

/ie[(…/ie/links/linkentry[@refid=‘0001000100000112’]) and
(…/ie/links/linkentry[@refid=‘0001000100000113’])]/@id

work fine and give what is expected!

I am looking forward for an answer to this as well…