protected void addNamespaceContext ( ) { NamespaceMap prefixmap = new NamespaceMap ( ) ; NamespacePrefixList npl = getXsd ( ) . getNamespaceContext ( ) ; if ( npl == null ) { /* We get an NPE if we don't add this. */ prefixmap . add ( "" , XMLConstants . W3C_XML_SCHEMA_NS_URI ) ; } else { for ( int i = 0 ; i < npl . getDeclaredPrefixes ( ) . length ; i ++ ) { prefixmap . add ( npl . getDeclaredPrefixes ( ) [ i ] , npl . getNamespaceURI ( npl . getDeclaredPrefixes ( ) [ i ] ) ) ; } } prefixmap . add ( getCOXBNamespacePrefix ( ) , getCOXBNamespace ( ) ) ; getXsd ( ) . setNamespaceContext ( prefixmap ) ; }
Adds the COXB namespace and associated prefixes to the XML schema .