com.sun.org.apache.xml.internal.dtm.ref.DTMNodeIterator Java Examples

The following examples show how to use com.sun.org.apache.xml.internal.dtm.ref.DTMNodeIterator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExsltCommon.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #2
Source File: ExsltCommon.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #3
Source File: ExsltCommon.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #4
Source File: ExsltCommon.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #5
Source File: ExsltCommon.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #6
Source File: ExsltCommon.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #7
Source File: ExsltCommon.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #8
Source File: ExsltCommon.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #9
Source File: ExsltCommon.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #10
Source File: ExsltCommon.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}
 
Example #11
Source File: ExsltCommon.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * The exsl:object-type function returns a string giving the type of the object passed
 * as the argument. The possible object types are: 'string', 'number', 'boolean',
 * 'node-set', 'RTF', or 'external'.
 *
 * Most XSLT object types can be coerced to each other without error. However, there are
 * certain coercions that raise errors, most importantly treating anything other than a
 * node set as a node set. Authors of utilities such as named templates or user-defined
 * extension functions may wish to give some flexibility in the parameter and argument values
 * that are accepted by the utility; the exsl:object-type function enables them to do so.
 *
 * The Xalan extensions MethodResolver converts 'object-type' to 'objectType'.
 *
 * @param obj The object to be typed.
 * @return objectType 'string', 'number', 'boolean', 'node-set', 'RTF', or 'external'.
 *
 * @see <a href="http://www.exslt.org/">EXSLT</a>
 */
public static String objectType (Object obj)
{
  if (obj instanceof String)
    return "string";
  else if (obj instanceof Boolean)
    return "boolean";
  else if (obj instanceof Number)
    return "number";
  else if (obj instanceof DTMNodeIterator)
  {
    DTMIterator dtmI = ((DTMNodeIterator)obj).getDTMIterator();
    if (dtmI instanceof com.sun.org.apache.xpath.internal.axes.RTFIterator)
      return "RTF";
    else
      return "node-set";
  }
  else
    return "unknown";
}