当前位置: 首页>>代码示例>>Java>>正文


Java DTM.getFirstChild方法代码示例

本文整理汇总了Java中com.sun.org.apache.xml.internal.dtm.DTM.getFirstChild方法的典型用法代码示例。如果您正苦于以下问题:Java DTM.getFirstChild方法的具体用法?Java DTM.getFirstChild怎么用?Java DTM.getFirstChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.org.apache.xml.internal.dtm.DTM的用法示例。


在下文中一共展示了DTM.getFirstChild方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: asNode

import com.sun.org.apache.xml.internal.dtm.DTM; //导入方法依赖的package包/类
/**
 * Return the first node out of the nodeset, if this expression is
 * a nodeset expression.  This is the default implementation for
 * nodesets.
 * <p>WARNING: Do not mutate this class from this function!</p>
 * @param xctxt The XPath runtime context.
 * @return the first node out of the nodeset, or DTM.NULL.
 */
public int asNode(XPathContext xctxt)
  throws javax.xml.transform.TransformerException
{
  int current = xctxt.getCurrentNode();

  DTM dtm = xctxt.getDTM(current);

  return dtm.getFirstChild(current);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:ChildIterator.java

示例2: execute

import com.sun.org.apache.xml.internal.dtm.DTM; //导入方法依赖的package包/类
/**
   * Execute the function.  The function must return
   * a valid object.
   * @param xctxt The current execution context.
   * @return A valid XObject.
   *
   * @throws javax.xml.transform.TransformerException
   */
  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
  {

    int whereNode = getArg0AsNode(xctxt);
    String fileLocation = null;

    if (DTM.NULL != whereNode)
    {
      DTM dtm = xctxt.getDTM(whereNode);

      // %REVIEW%
      if (DTM.DOCUMENT_FRAGMENT_NODE ==  dtm.getNodeType(whereNode))
      {
        whereNode = dtm.getFirstChild(whereNode);
      }

      if (DTM.NULL != whereNode)
      {
        fileLocation = dtm.getDocumentBaseURI();
//        int owner = dtm.getDocument();
//        fileLocation = xctxt.getSourceTreeManager().findURIFromDoc(owner);
      }
    }

    return new XString((null != fileLocation) ? fileLocation : "");
  }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:FuncDoclocation.java

示例3: DTMChildIterNodeList

import com.sun.org.apache.xml.internal.dtm.DTM; //导入方法依赖的package包/类
/**
 * Public constructor: Create a NodeList to support
 * DTMNodeProxy.getChildren().
 *
 * Unfortunately AxisIterators and DTMIterators don't share an API,
 * so I can't use the existing Axis.CHILD iterator. Rather than
 * create Yet Another Class, let's set up a special case of this
 * one.
 *
 * @param parentDTM The DTM containing this node
 * @param parentHandle DTM node-handle integer
 *
 */
public DTMChildIterNodeList(DTM parentDTM,int parentHandle) {
    m_parentDTM=parentDTM;
    m_firstChild=parentDTM.getFirstChild(parentHandle);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:DTMChildIterNodeList.java


注:本文中的com.sun.org.apache.xml.internal.dtm.DTM.getFirstChild方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。