Here you can find the source of getTEINamespaceContext()
Creates a NamespaceContext object with the following list of namespaces: <dl> <dt>tei</dt> <dd>http://www.tei-c.org/ns/1.0</dd> </dl>
public static NamespaceContext getTEINamespaceContext()
//package com.java2s; import java.util.Iterator; import javax.xml.namespace.NamespaceContext; public class Main { /**//from w w w. j a v a 2 s . c om * Creates a NamespaceContext object with the following list of namespaces: * * <dl> * <dt>tei</dt> * <dd>http://www.tei-c.org/ns/1.0</dd> * </dl> * * @return A NamespaceContext object */ public static NamespaceContext getTEINamespaceContext() { NamespaceContext ctx = new NamespaceContext() { public String getNamespaceURI(String prefix) { String uri; if (prefix.equals("tei")) uri = "http://www.tei-c.org/ns/1.0"; else uri = null; return uri; } // Dummy implementation - not used! public Iterator<String> getPrefixes(String val) { return null; } // Dummy implemenation - not used! public String getPrefix(String uri) { return null; } }; return ctx; } }