- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中mx4j.tools.adaptor.http.XSLTProcessor
类的一些代码示例,展示了XSLTProcessor
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLTProcessor
类的具体详情如下:
包路径:mx4j.tools.adaptor.http.XSLTProcessor
类名称:XSLTProcessor
[英]XSLTPostProcessor pass the document through an XSLT transformation
[中]XSLTPostProcessor通过XSLT转换传递文档
代码示例来源:origin: apache/geode
/**
* Defines and starts the Xslt Processor helper service for the Http Adaptor.
*/
private ObjectName createXsltProcessor() throws javax.management.JMException {
ObjectName objName = getXsltProcessorName();
// make sure this mbean is not already registered...
if (getMBeanServer().isRegistered(objName)) {
// dunno how we got here...
logger.info("XsltProcessor already registered as {}", objName);
return objName;
}
getMBeanServer().registerMBean(new mx4j.tools.adaptor.http.XSLTProcessor(), objName);
return objName;
}
代码示例来源:origin: org.mule.modules/mule-module-management
protected HttpAdaptor createAdaptor() throws Exception
{
Log.redirectTo(new CommonsLogger());
URI uri = new URI(StringUtils.stripToEmpty(jmxAdaptorUrl));
adaptor = new HttpAdaptor(uri.getPort(), uri.getHost());
XSLTProcessor processor = new XSLTProcessor();
if (StringUtils.isNotBlank(xslFilePath))
{
processor.setFile(xslFilePath.trim());
}
if (StringUtils.isNotBlank(pathInJar))
{
processor.setPathInJar(pathInJar.trim());
}
processor.setUseCache(cacheXsl);
adaptor.setProcessor(processor);
// Set endpoint authentication if required
if (login != null)
{
adaptor.addAuthorization(login, password);
adaptor.setAuthenticationMethod(authenticationMethod);
}
if (socketFactoryProperties != null && !socketFactoryProperties.isEmpty())
{
SSLAdaptorServerSocketFactoryMBean factory = new SSLAdaptorServerSocketFactory();
BeanUtils.populateWithoutFail(factory, socketFactoryProperties, true);
adaptor.setSocketFactory(factory);
}
return adaptor;
}
代码示例来源:origin: org.objectweb.petals/petals-kernel
XSLTProcessor processor = new XSLTProcessor();
processor.setDefaultPage("petals");
processor
.setPathInJar("org/objectweb/petals/kernel/fractal/mx4j/xsl");
processor.setUseCache(false);
adminAttributes.getRawMBeanServer().registerMBean(processor,
processorName);
代码示例来源:origin: mx4j/mx4j-tools
public void writeResponse(HttpOutputStream out, HttpInputStream in, Document document) throws IOException
Logger log = getLogger();
out.sendHeaders();
Transformer transformer = null;
String path = preProcess(in.getPath());
transformer = createTransformer(in.getVariable("template") + ".xsl");
transformer = createTransformer(path + ".xsl");
代码示例来源:origin: mx4j/mx4j-tools
protected Transformer createTransformer(String path)
Logger logger = getLogger();
try
InputStream stream = getInputStream(path);
if (stream != null)
代码示例来源:origin: mx4j/mx4j-tools
protected void processHttpException(HttpInputStream in, HttpOutputStream out, HttpException e) throws IOException
{
out.setCode(e.getCode());
out.setHeader("Content-Type", "text/html");
out.sendHeaders();
// hardcoded dir :-P
Transformer transformer = createTransformer("error.xsl");
transformer.setURIResolver(this);
Document doc = e.getResponseDoc();
if (doc != null)
{
try
{
if (!in.getVariables().containsKey("locale"))
{
transformer.setParameter("request.locale", locale.toString());
}
ByteArrayOutputStream output = new ByteArrayOutputStream();
transformer.transform(new DOMSource(doc), new StreamResult(output));
output.writeTo(out);
}
catch (TransformerException ex)
{
Logger log = getLogger();
log.error("Exception during error output", ex);
}
}
}
代码示例来源:origin: mx4j/mx4j-tools
public void writeError(HttpOutputStream out, HttpInputStream in, Exception e) throws IOException
{
Logger log = getLogger();
Exception t = e;
if (e instanceof RuntimeMBeanException)
{
t = ((RuntimeMBeanException)e).getTargetException();
}
if (log.isEnabledFor(Logger.DEBUG)) log.debug("Processing error " + t.getMessage());
if (t instanceof HttpException)
{
processHttpException(in, out, (HttpException)t);
}
else if ((t instanceof MBeanException) && (((MBeanException)t).getTargetException() instanceof HttpException))
{
processHttpException(in, out, (HttpException)((MBeanException)t).getTargetException());
}
else if ((t instanceof ReflectionException) && (((ReflectionException)t).getTargetException() instanceof HttpException))
{
processHttpException(in, out, (HttpException)((ReflectionException)t).getTargetException());
}
else
{
out.setCode(HttpConstants.STATUS_INTERNAL_ERROR);
out.setHeader("Content-Type", "text/html");
out.sendHeaders();
}
}
代码示例来源:origin: mx4j/mx4j-tools
public void addMimeType(String extension, String type)
{
if (extension != null && type != null)
{
Logger log = getLogger();
if (log.isEnabledFor(Logger.DEBUG)) log.debug("Added MIME type " + type + " for extension " + extension);
mimeTypes.put(extension, type);
}
}
代码示例来源:origin: mx4j/mx4j-tools
public Source resolve(String href, String base)
{
StreamSource source = new StreamSource(getInputStream(href));
// this works with saxon7/saxon6.5.2/xalan
source.setSystemId(href);
return source;
}
代码示例来源:origin: mx4j/mx4j-tools
public String notFoundElement(String path, HttpOutputStream out, HttpInputStream in) throws IOException, HttpException
Logger log = getLogger();
BufferedInputStream fileIn = new BufferedInputStream(getInputStream(path));
ByteArrayOutputStream outArray = new ByteArrayOutputStream();
BufferedOutputStream outBuffer = new BufferedOutputStream(outArray);
代码示例来源:origin: mx4j/mx4j-tools
Logger log = getLogger();
log.error("File not found", e);
代码示例来源:origin: org.apache.geode/gemfire-core
/**
* Defines and starts the Xslt Processor helper service for the Http Adaptor.
*/
private ObjectName createXsltProcessor()
throws javax.management.JMException {
ObjectName objName = getXsltProcessorName();
// make sure this mbean is not already registered...
if (getMBeanServer().isRegistered(objName)) {
// dunno how we got here...
logger.info(LocalizedMessage.create(LocalizedStrings.AgentImpl_XSLTPROCESSOR_ALREADY_REGISTERED_AS__0, objName));
return objName;
}
getMBeanServer().registerMBean(
new mx4j.tools.adaptor.http.XSLTProcessor(), objName);
return objName;
}
代码示例来源:origin: mx4j/mx4j-tools
Logger log = getLogger();
代码示例来源:origin: com.github.kaitoy.sneo/sneo-core
server.registerMBean(adaptor, ADAPTOR_NAME);
XSLTProcessor xsltProcessor = new XSLTProcessor();
server.registerMBean(xsltProcessor, PROCESSOR_NAME);
代码示例来源:origin: io.snappydata/gemfire-core
/**
* Defines and starts the Xslt Processor helper service for the Http Adaptor.
*/
private ObjectName createXsltProcessor()
throws javax.management.JMException {
ObjectName objName = getXsltProcessorName();
// make sure this mbean is not already registered...
if (getMBeanServer().isRegistered(objName)) {
// dunno how we got here...
getLogWriterI18n().info(LocalizedStrings.AgentImpl_XSLTPROCESSOR_ALREADY_REGISTERED_AS__0, objName);
return objName;
}
getMBeanServer().registerMBean(
new mx4j.tools.adaptor.http.XSLTProcessor(), objName);
return objName;
}
我有这个 XSLT img { width: 100% } Ci sono elemen
这个问题在这里已经有了答案: Fatal error: Class 'XSLTProcessor' not found (2 个答案) 关闭 8 年前。 我正在尝试使用 XSLT 将 XML 文件转
这是我的问题:我正在尝试使用 XSLTProcessor 将 xml 转换为 html。我已经阅读了它的使用,但我有以下问题 - transformToXML(xml_file) 函数要求 xml_f
我想得到转换错误。 这是我的代码: var xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(xsl); var
我有一个加载 500 mb xml 文件并使用 xsl 模板解析该文件的页面。解析器在我的本地环境中完美运行。我正在使用 WAMP。 在网络服务器上。 警告:DOMDocument::load() [
出于某种原因,我无法让 XSLTProcessor() 一直工作。 这是我的 JS: ... xsltProcessor = new XSLTProcessor(); xsltProcessor.im
我尝试复制示例 Transforming XML to XHTML in the Browser ,但我在控制台中的 xsltProcessor.importStylesheet(xsl) 行出现错误
此代码:: xslProcessor = new XSLTProcessor(); xslProcessor.importStylesheet(xsl); result = xslProcessor
我的任务是修复一个旧网站,使其与现代浏览器兼容。不过,有些 3rd 方控件让我有些不舒服,而且我不会付费来获取这些控件的最新版本。这些旧网格之一有一些内置的 javascript,在处理 XSLTPr
我在 typescript 代码中使用 XSLTProcessor 时遇到了一些问题。 transformToDocument 总是在没有明显原因的情况下返回 null。这是我的代码: private
我正在更新我的脚本以将我们的代码从 Ubuntu 12.04 (PHP 5.3.10) 移动到 Ubuntu 14.04 (PHP 5.5.9),但是 $result = $proc->transfo
我已经成功地使用 XSLT 转换 XML 文档,我正在从 JavaScript 启动该过程。由于 XML 输入相当大,我的计划是在 webworker 中启动 XSLT 转换。 我在这一行得到的错误
我正在尝试将 XML 转换为 XHTML。我在客户端(Angular)使用了 XSLTProcessor,它工作正常。现在我尝试在 Node JS 中使用相同的代码,但它不起作用,并且我收到错误消息,
错误: Warning: XSLTProcessor::importStylesheet() [xsltprocessor.importstylesheet]: Undefined variable
我正在使用 XAMPP 服务器 1.7.7 打开 php 文件时,我收到错误提示 fatal error :找不到类“XSLTProcessor” 最佳答案 安装 XSL 扩展以获取该类。这可能就像在
本文整理了Java中mx4j.tools.adaptor.http.XSLTProcessor.setUseCache()方法的一些代码示例,展示了XSLTProcessor.setUseCache(
本文整理了Java中mx4j.tools.adaptor.http.XSLTProcessor.()方法的一些代码示例,展示了XSLTProcessor.()的具体用法。这些代码示例主要来源于Gith
本文整理了Java中mx4j.tools.adaptor.http.XSLTProcessor.setPathInJar()方法的一些代码示例,展示了XSLTProcessor.setPathInJa
我有一个 XSL 文件。 我有一个带有 XSLTProcessor 的 PHP 文件,名为 $bob . 我想向我的 xsl 转换发送一些参数。 所以,我把它写在我的 PHP 文件中;例如: $bob
当尝试执行以下操作时 $xsl = new XSLTProcessor(); 我收到此错误 Fatal error: Class 'XSLTProcessor' not found in 我见过thi
我是一名优秀的程序员,十分优秀!