SAX2DTM.java 文件源码

java
阅读 33 收藏 0 点赞 0 评论 0

项目:OpenJSharp 作者:
/** Retrieve the SourceLocator associated with a specific node.
 * This is only meaningful if the XalanProperties.SOURCE_LOCATION flag was
 * set True using setProperty; if it was never set, or was set false, we
 * will return null.
 *
 * (We _could_ return a locator with the document's base URI and bogus
 * line/column information. Trying that; see the else clause.)
 * */
public SourceLocator getSourceLocatorFor(int node)
{
  if (m_useSourceLocationProperty)
  {

    node = makeNodeIdentity(node);


    return new NodeLocator(null,
                           m_sourceSystemId.elementAt(node),
                           m_sourceLine.elementAt(node),
                           m_sourceColumn.elementAt(node));
  }
  else if(m_locator!=null)
  {
      return new NodeLocator(null,m_locator.getSystemId(),-1,-1);
  }
  else if(m_systemId!=null)
  {
      return new NodeLocator(null,m_systemId,-1,-1);
  }
  return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号