@ Nullable public static Templates getXSLTTemplates ( @ Nonnull final EEbInterfaceVersion eVersion ) { final String sNamespaceURI = eVersion . getNamespaceURI ( ) ; final Templates ret = s_aRWLock . readLocked ( ( ) -> s_aTemplates . get ( sNamespaceURI ) ) ; if ( ret != null ) return ret ; return s_aRWLock . writeLocked ( ( ) -> { // Try again in write lock Templates ret2 = s_aTemplates . get ( sNamespaceURI ) ; if ( ret2 == null ) { // Definitely not present - init final IReadableResource aXSLTRes = eVersion . getXSLTResource ( ) ; ret2 = XMLTransformerFactory . newTemplates ( aXSLTRes ) ; if ( ret2 == null ) LOGGER . error ( "Failed to parse XSLT template " + aXSLTRes ) ; else if ( LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Compiled XSLT template " + aXSLTRes ) ; s_aTemplates . put ( sNamespaceURI , ret2 ) ; } return ret2 ; } ) ; }
Get the precompiled XSLT template to be used . It is lazily initialized upon first call .