net.sf.saxon.om.Item.getTypedValue()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中net.sf.saxon.om.Item.getTypedValue()方法的一些代码示例,展示了Item.getTypedValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Item.getTypedValue()方法的具体详情如下:
包路径:net.sf.saxon.om.Item
类名称:Item
方法名:getTypedValue

Item.getTypedValue介绍

[英]Get the typed value of the item.

For a node, this is the typed value as defined in the XPath 2.0 data model. Since a node may have a list-valued data type, the typed value is in general a sequence, and it is returned in the form of a SequenceIterator.

If the node has not been validated against a schema, the typed value will be the same as the string value, either as an instance of xs:string or as an instance of xs:untypedAtomic, depending on the node kind.

For an atomic value, this method returns an iterator over a singleton sequence containing the atomic value itself.
[中]获取项的类型化值。
对于节点,这是XPath 2.0数据模型中定义的类型化值。由于节点可能具有列表值数据类型,因此类型化值通常是一个序列,并以SequenceIterator的形式返回。
如果尚未根据架构验证节点,则类型化值将与字符串值相同,可以是xs:string的实例,也可以是xs:untypedAtomic的实例,具体取决于节点类型。
对于原子值,此方法返回包含原子值本身的单例序列的迭代器。

代码示例

代码示例来源:origin: net.sourceforge.saxon/saxon

public SequenceIterator map(Item item) throws XPathException {
    if (item instanceof NodeInfo) {
      return item.getTypedValue();
    } else {
      return SingletonIterator.makeIterator(item);
    }
  }
}

代码示例来源:origin: net.sf.saxon/Saxon-B

public SequenceIterator map(Item item) throws XPathException {
    if (item instanceof NodeInfo) {
      return item.getTypedValue();
    } else {
      return SingletonIterator.makeIterator(item);
    }
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

public SequenceIterator map(Item item) throws XPathException {
    if (item instanceof NodeInfo) {
      return item.getTypedValue();
    } else {
      return SingletonIterator.makeIterator(item);
    }
  }
}

代码示例来源:origin: org.opengis.cite.saxon/saxon9

/**
* Evaluate as an Item. This should only be called if the Atomizer has cardinality zero-or-one,
* which will only be the case if the underlying expression has cardinality zero-or-one.
*/
public Item evaluateItem(XPathContext context) throws XPathException {
  Item i = operand.evaluateItem(context);
  if (i==null) {
    return null;
  }
  if (i instanceof NodeInfo) {
    SequenceIterator it = i.getTypedValue();
    return it.next();
  } else {
    return i;
  }
}

代码示例来源:origin: net.sf.saxon/Saxon-B

/**
* Evaluate as an Item. This should only be called if the Atomizer has cardinality zero-or-one,
* which will only be the case if the underlying expression has cardinality zero-or-one.
*/
public Item evaluateItem(XPathContext context) throws XPathException {
  Item i = operand.evaluateItem(context);
  if (i==null) {
    return null;
  }
  if (i instanceof NodeInfo) {
    SequenceIterator it = i.getTypedValue();
    return it.next();
  } else {
    return i;
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

/**
* Evaluate as an Item. This should only be called if the Atomizer has cardinality zero-or-one,
* which will only be the case if the underlying expression has cardinality zero-or-one.
*/
public Item evaluateItem(XPathContext context) throws XPathException {
  Item i = operand.evaluateItem(context);
  if (i==null) {
    return null;
  }
  if (i instanceof NodeInfo) {
    SequenceIterator it = i.getTypedValue();
    return it.next();
  } else {
    return i;
  }
}

代码示例来源:origin: net.sourceforge.saxon/saxon

SequenceIterator iter2 = item.getTypedValue();
while (true) {
  Item item2 = iter2.next();

代码示例来源:origin: org.opengis.cite.saxon/saxon9

SequenceIterator iter2 = item.getTypedValue();
while (true) {
  Item item2 = iter2.next();

相关文章