Package com.sun.org.apache.xml.internal.dtm

Examples of com.sun.org.apache.xml.internal.dtm.DTM


    int context = getArg0AsNode(xctxt);
   
    String s;
    if(context != DTM.NULL)
    {
      DTM dtm = xctxt.getDTM(context);
      int t = dtm.getNodeType(context);
      if(t == DTM.ELEMENT_NODE)
      {
        s = dtm.getNamespaceURI(context);
      }
      else if(t == DTM.ATTRIBUTE_NODE)
      {

        // This function always returns an empty string for namespace nodes.
        // We check for those here.  Fix inspired by Davanum Srinivas.

        s = dtm.getNodeName(context);
        if(s.startsWith("xmlns:") || s.equals("xmlns"))
          return XString.EMPTYSTRING;

        s = dtm.getNamespaceURI(context);
      }
      else
        return XString.EMPTYSTRING;
    }
    else
View Full Code Here


            // Found a duplicate, so skip past it.
            m_iterators[i].nextNode();
          }
          else
          {
            DTM dtm = getDTM(node);

            if (dtm.isNodeAfter(node, earliestNode))
            {
              iteratorUsed = i;
              earliestNode = node;
            }
          }
View Full Code Here

    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);
      }
    }
View Full Code Here

  {
    if (m_foundLast)
      return DTM.NULL;
     
    int next;
    DTM dtm = m_cdtm;

    m_lastFetched = next = (DTM.NULL == m_lastFetched)
                           ? m_context
                           : DTM.NULL;
View Full Code Here

    if(Arg0IsNodesetExpr())
    {
      int node = getArg0AsNode(xctxt);
      if(DTM.NULL != node)
      {
        DTM dtm = xctxt.getDTM(node);
        dtm.dispatchCharactersEvents(node, handler, true);
      }
    }
    else
    {
      XObject obj = execute(xctxt);
View Full Code Here

      // more often to get that. See also Fast*Vector classes.
      //
      // %REVIEW% Should throw a more diagnostic error if we go over the max...
      int newlen=Math.min((id+256),IDENT_MAX_DTMS);

      DTM new_m_dtms[] = new DTM[newlen];
      System.arraycopy(m_dtms,0,new_m_dtms,0,oldlen);
      m_dtms=new_m_dtms;
      int new_m_dtm_offsets[] = new int[newlen];
      System.arraycopy(m_dtm_offsets,0,new_m_dtm_offsets,0,oldlen);
      m_dtm_offsets=new_m_dtm_offsets;
View Full Code Here

      //   Generate a list of _unique_ DTM objects?
      //   Have each DTM cache last DOM node search?
      int max = m_dtms.length;
      for(int i = 0; i < max; i++)
        {
          DTM thisDTM=m_dtms[i];
          if((null != thisDTM) && thisDTM instanceof DOM2DTM)
          {
            int handle=((DOM2DTM)thisDTM).getHandleOfNode(node);
            if(handle!=DTM.NULL) return handle;
          }
View Full Code Here

       
    int n = m_dtms.length;

    for (int i = 0; i < n; i++)
    {
      DTM tdtm = m_dtms[i];

      if (tdtm == dtm && m_dtm_offsets[i]==0)
        return i << IDENT_DTM_NODE_BITS;
    }
View Full Code Here

                        // more often to get that. See also Fast*Vector classes.
                        //
                        // %REVIEW% Should throw a more diagnostic error if we go over the max...
                        int newlen=Math.min((id+256),IDENT_MAX_DTMS);

                        DTM new_m_dtms[] = new DTM[newlen];
                        System.arraycopy(m_dtms,0,new_m_dtms,0,oldlen);
                        m_dtms=new_m_dtms;
                        int new_m_dtm_offsets[] = new int[newlen];
                        System.arraycopy(m_dtm_offsets,0,new_m_dtm_offsets,0,oldlen);
                        m_dtm_offsets=new_m_dtm_offsets;
View Full Code Here

                        //   Generate a list of _unique_ DTM objects?
                        //   Have each DTM cache last DOM node search?
                        int max = m_dtms.length;
      for(int i = 0; i < max; i++)
        {
          DTM thisDTM=m_dtms[i];
          if((null != thisDTM) && thisDTM instanceof DOM2DTM)
          {
            int handle=((DOM2DTM)thisDTM).getHandleOfNode(node);
            if(handle!=DTM.NULL) return handle;
          }
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xml.internal.dtm.DTM

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.