Transform the supplied XML using the transform identified by key
        @param key: name of the transform to apply
        @param xml: XML to transform
        @param kwargs: XSLT parameters
        @return: Transform output or None if transform failed
340045
def transform(self, key, xml, **kwargs):
        
        if key in self._xsltLibrary and self.gateway_connected() and key in self._converters:
            return self._converters[key].transform(xml, self._parms(**kwargs))
        return None
1342951
public void transform(XmlNode node, StringBuilder builder) {
        switch (node.getType()) {
            case XmlNode.ELEMENT_NODE: {
                builder.append("<");
                builder.append(node.getName());
                for (XmlNode attribute : node.getAttributes().values()) {
                    transform(attribute, builder);
                }
                builder.append(">");
                for (XmlNode child : node.getChildren()) {
                    transform(child, builder);
                }
                builder.append("</");
                builder.append(node.getName());
                builder.append(">");
            }
                break;
            case XmlNode.ATTRIBUTE_NODE: {
                builder.append(" ");
                builder.append(node.getName());
                builder.append("=\"");
                builder.append(node.getValue());
                builder.append("\"");
            }
                break;
            case XmlNode.TEXT_NODE: {
                builder.append(node.getValue());
            }
        }
    }
533043
@SuppressWarnings("unchecked")
	public <T> T get(String key) {
		Preconditions.checkArgument(key != null && !key.isEmpty(), "Parameter 'key' must not be [" + key + "]");
		Context context = factory.enterContext();
		
		try {
			if (values.containsKey(key)) {
				Object value = values.get(key);
				return (T) ((value instanceof Function) 
						? ((Function) value).call(context, scope, (Scriptable) value, null)
						: value);
			}
			
			synchronized (values) {
				if (values.containsKey(key)) {
					Object value = values.get(key);
					return (T) ((value instanceof Function) 
							? ((Function) value).call(context, scope, (Scriptable) value, null)
							: value);
				} else if (key.equals(ENDPOINTS)) {
					Object endpoints = scope.get(ENDPOINTS);
					
					if (endpoints == null && configuration != null) {
						endpoints = Collections2.filter((Collection<Class<?>>) get(COMPONENTS), new Predicate<Class<?>>() {

							@Override
							public boolean apply(Class<?> clazz) {
								return clazz.isAnnotationPresent(Endpoint.class);
							}
							
						});
					}
					
					values.put(ENDPOINTS, endpoints);
					return (T) ((endpoints instanceof Function) 
							? ((Function) endpoints).call(context, scope, (Scriptable) endpoints, null)
							: endpoints);
				} else if (key.equals(PIPELINE)) {
					Object pipeline = scope.get(PIPELINE);
					
					if (pipeline == null && configuration != null) {
						Pipeline<WebContext> p = configuration.pipeline();
						p.remove(2);
						p.set(2, "JaguarInvoke", new Invoke() {
							
							@Override
							protected <E> E instantiate(Class<E> endpoint) throws Exception {
								return component(endpoint);
							}
							
						});
						pipeline = p;
					}
					
					values.put(PIPELINE, pipeline);
					return (T) ((pipeline instanceof Function) 
							? ((Function) pipeline).call(context, scope, (Scriptable) pipeline, null)
							: pipeline);
				} else if (key.equals(REQUEST_TYPES)) {
					Object requestTypes = scope.get(REQUEST_TYPES);
					
					if (requestTypes == null && configuration != null) {
						requestTypes = configuration.requestTypes();
					}
					
					values.put(REQUEST_TYPES, requestTypes);
					return (T) ((requestTypes instanceof Function) 
							? ((Function) requestTypes).call(context, scope, (Scriptable) requestTypes, null)
							: requestTypes);
				} else if (key.equals(RESPONSE_TYPES)) {
					Object responseTypes = scope.get(RESPONSE_TYPES);
					
					if (responseTypes == null && configuration != null) {
						responseTypes = configuration.responseTypes();
					}
					
					values.put(RESPONSE_TYPES, responseTypes);
					return (T) ((responseTypes instanceof Function) 
							? ((Function) responseTypes).call(context, scope, (Scriptable) responseTypes, null)
							: responseTypes);
				} else if (key.equals(ROUTING)) {
					Object routing = scope.get(ROUTING);
					
					if (routing == null && configuration != null) {
						routing = configuration.routing();
					}
					
					values.put(ROUTING, routing);
					return (T) ((routing instanceof Function) 
							? ((Function) routing).call(context, scope, (Scriptable) routing, null)
							: routing);
				} else if (key.equals(DEPLOYMENT)) {
					Object deployment = scope.get(DEPLOYMENT);
					values.put(DEPLOYMENT, deployment);
					return (T) ((deployment instanceof Function) 
							? ((Function) deployment).call(context, scope, (Scriptable) deployment, null)
							: deployment);
				} else if (key.equals(COMPONENTS)) {
					Object components = scope.get(COMPONENTS);
					
					if (components == null) {
						components = components();
					}
					
					values.put(COMPONENTS, components);
					return (T) ((components instanceof Function) 
							? ((Function) components).call(context, scope, (Scriptable) components, null)
							: components);
				} else {
					Object value = scope.get(key);
					
					if (value == null) {
						return null;
					}
					
					values.put(key, value);
					return (T) ((value instanceof Function) 
							? ((Function) value).call(context, scope, (Scriptable) value, null)
							: value);
				}
			}
			
		} finally {
			Context.exit();
		}
	}
1338764
public MigrateArgs<K> key(K key) {

        LettuceAssert.notNull(key, "Key must not be null");

        this.keys.add(key);
        return this;
    }
102991
public static void transform(Source source, Result result, String charset, int indent) {
		final TransformerFactory factory = TransformerFactory.newInstance();
		try {
			final Transformer xformer = factory.newTransformer();
			if (indent > 0) {
				xformer.setOutputProperty(OutputKeys.INDENT, "yes");
				xformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(indent));
			}
			if (StrUtil.isNotBlank(charset)) {
				xformer.setOutputProperty(OutputKeys.ENCODING, charset);
			}
			xformer.transform(source, result);
		} catch (Exception e) {
			throw new UtilException(e, "Trans xml document to string error!");
		}
	}
434437
public synchronized XAttribute get(Object key) {
		if(size == 0) {
			return null;
		} else {
			try {
				XAttributeMap map = deserialize();
				return map.get(key);
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		}
	}
160933
public static String replaceXmlAttr(final String xml, final KV... keyValues) {

        final List<String> searchList = new ArrayList<String>();
        final List<String> replacementList = new ArrayList<String>();

        for (final KV kv : keyValues) {
            final String tag = kv.getKey() + "=\"";
            int pa = xml.indexOf(tag);
            while (pa > -1) {
                final int s = pa + tag.length();
                final int pe = xml.indexOf("\"", s);
                if (pe > -1) {
                    final String str = xml.substring(pa, pe + 1);
                    searchList.add(str);
                    final String repl = xml.substring(pa, pa + tag.length()) + kv.getValue() + "\"";
                    replacementList.add(repl);
                }
                pa = xml.indexOf(tag, s);
            }
        }

        final String[] searchArray = searchList.toArray(new String[searchList.size()]);
        final String[] replacementArray = replacementList.toArray(new String[replacementList.size()]);
        return StringUtils.replaceEachRepeatedly(xml, searchArray, replacementArray);
    }
1205662
def key(self, key=""):
    
    params = join_params(self.parameters, {"key": key})

    return self.__class__(**params)
299513
function _transform( xslStr, xmlDoc, xsltParams ) {
    const params = xsltParams || {};
    return new Promise( ( resolve, reject ) => {
        libxslt.parse( xslStr, ( error, stylesheet ) => {
            if ( error ) {
                reject( error );
            } else {
                stylesheet.apply( xmlDoc, params, ( error, result ) => {
                    if ( error ) {
                        reject( error );
                    } else {
                        resolve( result );
                    }
                } );
            }
        } );
    } );
}
1347754
@SuppressWarnings("unchecked") public <R, W> Converter<R, W> getConverter(String key) {
        return (Converter<R, W>) converts.get(key);
    }
62964
@Override
    public void put(String key, String value) throws Exception {
        sb.append('<').append(key).append('>');
        sb.append(XMLUtil.convertToCDATA(value));
        sb.append("</").append(key).append('>');
        
    }
929486
public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
  {

    int context = getArg0AsNode(xctxt);
    if(DTM.NULL == context)
      return XString.EMPTYSTRING;
    DTM dtm = xctxt.getDTM(context);
    String s = (context != DTM.NULL) ? dtm.getLocalName(context) : "";
    if(s.startsWith("#") || s.equals("xmlns"))
      return XString.EMPTYSTRING;

    return new XString(s);
  }
1048413
public String returnArg(String key) {
       SeLionElement element = HtmlSeLionElementSet.getInstance().findMatch(key);
        if (element == null) {
            return key;
        }
        if (!element.isUIElement()) {
            return key;
        }
        return key.substring(0, key.indexOf(element.getElementClass()));
    }
588589
public static <T extends XMLObject> T transformSamlObject(final OpenSamlConfigBean configBean, final String xml,
                                                              final Class<T> clazz) {
        return transformSamlObject(configBean, xml.getBytes(StandardCharsets.UTF_8), clazz);
    }
737237
public static Result get(XmlFileModel key)
    {
        String cacheKey = getKey(key);

        Result result = null;
        CacheDocument reference = map.get(cacheKey);

        if (reference == null)
            return new Result(false, null);

        if (reference.parseFailure)
            return new Result(true, null);

        Document document = reference.getDocument();
        if (document == null)
            LOG.info("Cache miss on XML document: " + cacheKey);

        return new Result(false, document);
    }
1102068
def make_xml_name(self, sourcekey):
        
        format_dict = self.__dict__.copy()
        format_dict['sourcekey'] = sourcekey
        return self._name_factory.srcmdl_xml(**format_dict)
819188
def merged_sourcekey(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)        
        try:
            return NameFactory.merged_sourcekey_format.format(**kwargs_copy)
        except KeyError:
            return None