This can be achieved with the help of xs:assert
, fn:matches
and concat.
The assertion at a level that can reach all needed elements as children looks like the following.
<xs:assert test='every $line in Values/Line satisfies fn:matches($line, concat("-?[0-9]*.[0-9]{1,2}(,-?[0-9]*.[0-9]{1,2}){",xs:string(Count - 1),"}"))'/>