Example #1
0
store::Item_t SchemaValidatorImpl::findAttributeItem(const store::Item *parent, 
                                                     store::Item_t &attQName)
{
  store::Iterator_t attributes = parent->getAttributes();

  store::Item_t attribute;

  while ( attributes->next(attribute) )
  {
    ZORBA_ASSERT(attribute->isNode());
    ZORBA_ASSERT(attribute->getNodeKind() == store::StoreConsts::attributeNode);

    store::Item_t currentAttName = attribute->getNodeName();

    if (attQName->equals(currentAttName))
    {
      return attribute.getp();
    }
  }
  //ZORBA_ASSERT(false);
  return NULL;
}