Name

GroveAttr — XML element attribute node.

Synopsis

class GroveAttr (GroveNodeWithNamespaceSernaApi::GroveNodeWithNamespace) :
  
  enum Defaulted;

  # Attribute value type. 
  enum AttrType { INVALID, IMPLIED, CDATA, TOKENIZED };

  # ID class of the attribute. Note that IDREFS is not yet supported. 
  enum IdClass { NOT_ID, IS_ID, IS_IDREF, IS_IDREFS };
  # construct/copy/destruct
  __init__(SernaApiBase *)
  __init__(const SString &, const SString & = SString())
  __del__()

  # public member functions

  GroveElement element() const
  bool specified() const
  SString value() const
  None build() 
  None setValue(const SString &) 
  None setName(const SString &) 
  bool tokenized() const
  Defaulted defaulted() const
  AttrType type() const
  None setDefaulted(const Defaulted) 
  None setType(const AttrType) 
  IdClass idClass() const
  None setIdClass(IdClass) 

Description

GroveAttr construct/copy/destruct

  1. __init__(SernaApiBase * )


  2. __init__(const SString & attributeName, const SString & value = SString())


  3. __del__()


GroveAttr public member functions

  1. GroveElement element() const

    Returns parent element.


  2. bool specified() const

    Check whether value of this attribute was explicitly specified (not defaulted via dtd/prolog/schema)


  3. SString value() const

    A string value of an attribute. For tokenized values, this is a concatenation of tokens with single blank as a separator.


  4. None build()

    Build string attribute value (which can be accessed via value() member function) from attribute node children.


  5. None setValue(const SString & val)

    Sets CDATA-only attribute value.


  6. None setName(const SString & )

    Sets the new name of an attribute. This function also performs name parsing and namespace processing, if necessary.


  7. bool tokenized() const

    True if attribute is tokenized.


  8. Defaulted defaulted() const

    Returns defaulting type of attribute (see enum Defaulted).


  9. AttrType type() const

    Attribute value type.


  10. None setDefaulted(const Defaulted d)

    Set attribute specification (defaulting) type.


  11. None setType(const AttrType t)

    Set attribute value type.


  12. IdClass idClass() const

    Returns ID class.


  13. None setIdClass(IdClass idc)

    Set new ID class. Use with caution.