@ Nonnull @ ReturnsMutableCopy public static MapBasedNamespaceContext createNamespaceMapping ( @ Nonnull final PSSchema aSchema ) { final MapBasedNamespaceContext ret = new MapBasedNamespaceContext ( ) ; ret . addDefaultNamespaceURI ( CSchematron . NAMESPACE_SCHEMATRON ) ; for ( final PSNS aItem : aSchema . getAllNSs ( ) ) ret . addMapping ( aItem . getPrefix ( ) , aItem . getUri ( ) ) ; return ret ; }
Helper method to extract the namespace mapping from the provided Schematron .