import module namespace geo = "http://expath.org/ns/geo"; declare namespace gml="http://www.opengis.net/gml"; geo:num-patches(<gml:Surface><gml:patches> </gml:patches></gml:Surface>)