Package org.apache.xpath.objects

Examples of org.apache.xpath.objects.XObject.str()


            node = new Boolean(xobject.bool());
            break;

          case XObject.CLASS_STRING :
            ni = EMPTY_NODE_ITERATOR;
            node = xobject.str();
            break;

          case XObject.CLASS_NUMBER :
            ni = EMPTY_NODE_ITERATOR;
            node = new Double(xobject.num());
View Full Code Here


          }

          IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);

          XObject obj = (XObject) s;
          Value val1 = new Value(obj.str());

          IndexQuery iq = new IndexQuerySW(pattern, val1);
          return queryIndexes(nk, iq, ps, obj.getType());
        }
      }
View Full Code Here

        ps = nk.name;
      }

      IndexQuery iq;
      IndexPattern pattern = new IndexPattern(symbols, ps, nsMap);
      String value = obj.str();

      switch (op)
      {
        case IndexQuery.NEQ :
          iq = new IndexQueryNEQ(pattern, value);
View Full Code Here

      switch (type)
      {
      case XObject.CLASS_BOOLEAN :
      case XObject.CLASS_NUMBER :
      case XObject.CLASS_STRING :
        s = value.str();

        rtreeHandler.characters(s.toCharArray(), 0, s.length());
        break;

      case XObject.CLASS_NODESET :  // System.out.println(value);
View Full Code Here

          else if (object instanceof XBoolean)
            element = lDoc.createElementNS(EXSL_URI, "exsl:boolean");
          else
            element = lDoc.createElementNS(EXSL_URI, "exsl:string");
         
          Text textNode = lDoc.createTextNode(object.str());
          element.appendChild(textNode);
          resultSet.addNode(element);
        }
      }
      catch (Exception e)
View Full Code Here

    {
      org.apache.xpath.XPathContext xctxt
        = 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))
      {
        fileName = elem.getAttribute ("file",
                                      context.getContextNode(),
                                      context.getTransformer());
View Full Code Here

        switch (type)
        {
        case XObject.CLASS_BOOLEAN :
        case XObject.CLASS_NUMBER :
        case XObject.CLASS_STRING :
          s = value.str();

          handler.characters(s.toCharArray(), 0, s.length());
          break;
        case XObject.CLASS_NODESET :
View Full Code Here

          handler.outputResultTreeFragment(value,
                                           transformer.getXPathContext());
          break;
        default :
         
          s = value.str();

          handler.characters(s.toCharArray(), 0, s.length());
          break;
        }
      }
View Full Code Here

                                           k.m_namespaceContext);
        XObject r2 = k.m_selectPat.execute(m_execContext, n2.m_node,
                                           k.m_namespaceContext);

        n1String = k.m_col.getCollationKey(r1.str());
        n2String = k.m_col.getCollationKey(r2.str());
      }

      // Use collation keys for faster compare, but note that whitespaces
      // etc... are treated differently from if we were comparing Strings.
      result = n1String.compareTo(n2String);
View Full Code Here

          // Can't use NaN for compare. They are never equal. Use zero instead. 
          m_key1Value = new Double(d);
        }
        else
        {
          m_key1Value = k1.m_col.getCollationKey(r.str());
        }

        if (r.getType() == XObject.CLASS_NODESET)
        {
          // %REVIEW%
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.