shouldn't the SQL equivalent be:
SELECT * FROM nt:base WHERE jcr:primaryType='X' and SELECT * FROM X
?
regards marcel
Peeter Piegaze wrote:
Well, actually this is how it was implemented and at the time we thought it made sense (or maybe we didn't think about it too much ;-).
Now that I look at it again it does strike me as incorrect.
IMO the correct behavior should be:
//*[jcr:primaryType='X'] return all nodes with *declared* type of X. //element(*,'X') returns all nodes of type X (declared and inherited)
The equivalents in SQL would be (respectively):
SELECT * FROM jcr:primaryType WHERE jcr:primaryType='X' and SELECT * FROM jcr:primaryType
