class XsdNamespace {
    static Object xpath(Document doc, @Source("XPath") String xp, Map ns) {...
    }
use XsdNamespaces

class Cheese {
    XPathContext xp = new XPathContext [
        xsl: "http//www.foo.org",
        xml: "...",
        xsd: "...."
    ]

        
    def foo() {
        for (i in x) {
           xpath( doc, "//xsd:element/*")
           xpath( doc, "//xsd:element/*", [bar:"http:xyz")
           

            def ns = [bar:"http://whatnot"]
            xpath(doc, "//bar:foo", ns)
            

           doc.select(xpath("//foo:chees/bare", [foo:"http://bar"])) 
        }
    }
    
    // the above really means
    private static final __xp_1 = xp.make("//foo")

    def foo() {
        for (i in x) {
            doc.select(__xp_1)
        }
    }

    
}