Content of num-patches1.xq example
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:PolygonPatch><gml:exterior>
<gml:LinearRing><gml:posList>1 1 2 1 2 2 1 2 1 1</gml:posList></gml:LinearRing>
</gml:exterior></gml:PolygonPatch>
<gml:PolygonPatch><gml:exterior>
<gml:LinearRing><gml:posList>2 1 3 1 3 3 2 3 2 1</gml:posList></gml:LinearRing>
</gml:exterior></gml:PolygonPatch>
</gml:patches></gml:Surface>)