gpt4 book ai didi

org.apache.xalan.extensions.XSLProcessorContext类的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 02:10:40 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.xalan.extensions.XSLProcessorContext类的一些代码示例,展示了XSLProcessorContext类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSLProcessorContext类的具体详情如下:
包路径:org.apache.xalan.extensions.XSLProcessorContext
类名称:XSLProcessorContext

XSLProcessorContext介绍

[英]Provides transformer context to be passed to an extension element.
[中]提供要传递给扩展元素的转换器上下文。

代码示例

代码示例来源:origin: xalan/xalan

/**
 * Open the given file and put it in the XML, HTML, or Text formatter listener's table.
 */
public void open(XSLProcessorContext context, ElemExtensionCall elem)
 throws java.net.MalformedURLException,
     java.io.FileNotFoundException,
     java.io.IOException,
     javax.xml.transform.TransformerException
{
 String fileName = getFilename(context, elem);
 Object flistener = m_formatterListeners.get(fileName);
 if(null == flistener)
 {
  String mkdirsExpr 
   = elem.getAttribute ("mkdirs", context.getContextNode(), 
                        context.getTransformer());
  boolean mkdirs = (mkdirsExpr != null)
           ? (mkdirsExpr.equals("true") || mkdirsExpr.equals("yes")) : true;
  // Whether to append to existing files or not, <jpvdm@iafrica.com>
  String appendExpr = elem.getAttribute("append", context.getContextNode(), context.getTransformer());
  boolean append = (appendExpr != null)
           ? (appendExpr.equals("true") || appendExpr.equals("yes")) : DEFAULT_APPEND_OPEN;
  Object ignored = makeFormatterListener(context, elem, fileName, true, mkdirs, append);
 }
}

代码示例来源:origin: xalan/xalan

XSLProcessorContext xpc = new XSLProcessorContext(transformer, stylesheetTree);
 xpc.outputToResultTree(stylesheetTree, result);

代码示例来源:origin: xalan/xalan

context.getContextNode(), 
                       context.getTransformer());
 boolean mkdirs = (mkdirsExpr != null)
          ? (mkdirsExpr.equals("true") || mkdirsExpr.equals("yes")) : true;
 String appendExpr = elem.getAttribute("append", context.getContextNode(), context.getTransformer());
 boolean append = (appendExpr != null)
          ? (appendExpr.equals("true") || appendExpr.equals("yes")) : DEFAULT_APPEND_WRITE;
TransformerImpl transf = context.getTransformer();
               context.getContextNode(),
               context.getMode(), formatter);

代码示例来源:origin: xalan/xalan

TransformerImpl transformer = context.getTransformer();

代码示例来源:origin: org.jasig.portal/uportal3-impl

public void clearMarkings(XSLProcessorContext context, ElemExtensionCall elem) throws TransformerException {
  TransformerImpl transformerImpl=context.getTransformer();
  ILegacyLayoutSourceCommands llsc=getLegacyLayoutSourceCommands(transformerImpl);
  llsc.clearMarkings();
}

代码示例来源:origin: xalan/xalan

String fileNameExpr 
 = ((ElemExtensionCall)elem).getAttribute ("select", 
                      context.getContextNode(), 
                      context.getTransformer());
if(null != fileNameExpr)
  = context.getTransformer().getXPathContext();
 XPath myxpath = new XPath(fileNameExpr, elem, xctxt.getNamespaceContext(), XPath.SELECT);
 XObject xobj = myxpath.execute(xctxt, context.getContextNode(), elem);
 fileName = xobj.str();
 if((null == fileName) || (fileName.length() == 0))
                 context.getContextNode(), 
                 context.getTransformer());
 fileName = elem.getAttribute ("file", context.getContextNode(), 
                              context.getTransformer());
 context.getTransformer().getMsgMgr().error(elem, elem, 
                 context.getContextNode(), 
                 XSLTErrorResources.ER_REDIRECT_COULDNT_GET_FILENAME);

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

context.getContextNode(), 
                       context.getTransformer());
 boolean mkdirs = (mkdirsExpr != null)
          ? (mkdirsExpr.equals("true") || mkdirsExpr.equals("yes")) : true;
 String appendExpr = elem.getAttribute("append", context.getContextNode(), context.getTransformer());
 boolean append = (appendExpr != null)
          ? (appendExpr.equals("true") || appendExpr.equals("yes")) : DEFAULT_APPEND_WRITE;
TransformerImpl transf = context.getTransformer();
               context.getContextNode(),
               context.getMode(), formatter);

代码示例来源:origin: xalan/xalan

XSLProcessorContext xpc = new XSLProcessorContext(transformer, 
                         stylesheetTree);
 xpc.outputToResultTree (stylesheetTree, result);

代码示例来源:origin: org.jasig.portal/uportal3-impl

public void reloadLayout(XSLProcessorContext context, ElemExtensionCall elem) throws TransformerException {
  TransformerImpl transformerImpl=context.getTransformer();
  ILegacyLayoutSourceCommands llsc=getLegacyLayoutSourceCommands(transformerImpl);
  llsc.reloadLayout();
}

代码示例来源:origin: xalan/xalan

context.getContextNode(),
                  context.getTransformer());
TransformerImpl transImpl = context.getTransformer();
                  context.getContextNode(),
                  context.getTransformer());
XPathContext xctxt = context.getTransformer().getXPathContext();
int xt = xctxt.getDTMHandleFromNode(context.getContextNode());

代码示例来源:origin: org.apache.xalan/com.springsource.org.apache.xalan

context.getContextNode(), 
                       context.getTransformer());
 boolean mkdirs = (mkdirsExpr != null)
          ? (mkdirsExpr.equals("true") || mkdirsExpr.equals("yes")) : true;
 String appendExpr = elem.getAttribute("append", context.getContextNode(), context.getTransformer());
 boolean append = (appendExpr != null)
          ? (appendExpr.equals("true") || appendExpr.equals("yes")) : DEFAULT_APPEND_WRITE;
TransformerImpl transf = context.getTransformer();
               context.getContextNode(),
               context.getMode(), formatter);

代码示例来源:origin: xalan/xalan

XSLProcessorContext xpc = new XSLProcessorContext(transformer, 
                         stylesheetTree);
 xpc.outputToResultTree (stylesheetTree, result);

代码示例来源:origin: org.jasig.portal/uportal3-impl

public void addMarkings(XSLProcessorContext context, ElemExtensionCall elem) throws TransformerException {
  TransformerImpl transformerImpl=context.getTransformer();
  ILegacyLayoutSourceCommands llsc=getLegacyLayoutSourceCommands(transformerImpl);
  llsc.addMarkings();
}

代码示例来源:origin: net.sf.docbook/docbook-xsl-xalan

private String getEncoding(XSLProcessorContext context, ElemExtensionCall elem)
  throws java.net.MalformedURLException,
    java.io.FileNotFoundException,
    java.io.IOException,
    javax.xml.transform.TransformerException {

  String encoding;

  encoding = ((ElemExtensionCall)elem).getAttribute ("encoding",
                context.getContextNode(),
                context.getTransformer());
  
  if (encoding == null) {
   return "";
  } else {        
   return encoding;
  }
 }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

context.getContextNode(), 
                       context.getTransformer());
 boolean mkdirs = (mkdirsExpr != null)
          ? (mkdirsExpr.equals("true") || mkdirsExpr.equals("yes")) : true;
 String appendExpr = elem.getAttribute("append", context.getContextNode(), context.getTransformer());
 boolean append = (appendExpr != null)
          ? (appendExpr.equals("true") || appendExpr.equals("yes")) : DEFAULT_APPEND_WRITE;
TransformerImpl transf = context.getTransformer();
               context.getContextNode(),
               context.getMode(), formatter);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.xalan

XSLProcessorContext xpc = new XSLProcessorContext(transformer, stylesheetTree);
 xpc.outputToResultTree(stylesheetTree, result);

代码示例来源:origin: org.jasig.portal/uportal3-impl

/**
 * Implementation of the outer <renderUrl/> element.
 * 
 * @param context
 * @param elem
 * @return serialized version of render url
 * @throws TransformerException
 */
public String renderUrl(XSLProcessorContext context, ElemExtensionCall elem) throws TransformerException {
  TransformerImpl transformerImpl = context.getTransformer();
  // retrieve configuration
  RenderResponse renderResponse=(RenderResponse) transformerImpl.getParameter(RENDER_RESPONSE_PARAMETER_NAME);
  
  // create new portlet url instance
  IPortletUrl portletUrl=(IPortletUrl) renderResponse.createRenderURL();
  // put it on the stack
  Stack urlStack=getCreateUrlStack(transformerImpl);
  urlStack.push(portletUrl);
  transformerImpl.executeChildTemplates(elem,true);
  // remove url fromt the stack
  urlStack.pop();
  return portletUrl.toString();
}

代码示例来源:origin: net.sf.docbook/docbook-xsl-xalan

private String getFilename(XSLProcessorContext context, ElemExtensionCall elem)
 throws java.net.MalformedURLException,
   java.io.FileNotFoundException,
   java.io.IOException,
   javax.xml.transform.TransformerException {
 String fileName;
 fileName = ((ElemExtensionCall)elem).getAttribute ("href",
               context.getContextNode(),
               context.getTransformer());
 if ("".equals(fileName)) {
  context.getTransformer().getMsgMgr().error(elem,
            "No 'href' on text, or not a filename");
 }
 return fileName;
}

代码示例来源:origin: org.apache.karaf.bundles/org.apache.karaf.bundles.xalan-2.7.1

XSLProcessorContext xpc = new XSLProcessorContext(transformer, stylesheetTree);
 xpc.outputToResultTree(stylesheetTree, result);

代码示例来源:origin: org.jasig.portal/uportal3-impl

/**
 * Implementation of the outer &lt;actionUrl/&gt; element.
 * 
 * @param context
 * @param elem
 * @return serialized version of action url
 * @throws TransformerException
 */
public String actionUrl(XSLProcessorContext context, ElemExtensionCall elem) throws TransformerException {
  TransformerImpl transformerImpl = context.getTransformer();
  // retrieve configuration
  RenderResponse renderResponse=(RenderResponse) transformerImpl.getParameter(RENDER_RESPONSE_PARAMETER_NAME);
  
  // create new portlet url instance
  IPortletUrl portletUrl=(IPortletUrl) renderResponse.createActionURL();
  // put it on the stack
  Stack urlStack=getCreateUrlStack(transformerImpl);
  urlStack.push(portletUrl);
  transformerImpl.executeChildTemplates(elem,true);
  // remove url fromt the stack
  urlStack.pop();
  return portletUrl.toString();
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com