docs: function resolveSourceByDocumentId(sourceId){
      var resource = sourceByDocumentId[sourceId];
  
      if (!resource)
      {
        var host = document.getElementById(sourceId);
        var source = '';
  
        if (host && host.tagName == 'SCRIPT' && host.type == 'text/basis-template')
          source = host.textContent || host.text;
        /** @cut */ else
        /** @cut */   if (!host)
        /** @cut */     basis.dev.warn('Template script element with id `' + sourceId + '` not found');
        /** @cut */   else
        /** @cut */     basis.dev.warn('Template should be declared in <script type="text/basis-template"> element (id `' + sourceId + '`)');
  
        resource = sourceByDocumentId[sourceId] = basis.resource.virtual('tmpl', source || '');
        /** @cut */ resource.id = sourceId;
        /** @cut */ resource.url = '<script id="' + sourceId + '"/>';
      }
  
      return resource;
    }