I hope it is ok to ask generla xQuery questions here.
My Problem: I need to check XML file, whether they have a certain structure with certain node-names. However I can only use xQuery  but no schema(e.g. XSD) with Saxon 8.9(cannot use different version) 
I tryied folowing xquery to validate a store node: 

 for $x in doc("stores.xml")/stores/store
 where $x/state and $x/store-number
 return $x

How ever, no error is returned if the where-conditions are not fullfiled. I just get an empty xml.
So is there a way to validated a xml so that, if the structure( or even the node names) are not valid saxon would return an error?

Kind regards,