 
     getAbout: ->
       if @attrs.about? #and not parent
-        next = @state.resolveURI(@attrs.about.value)
+        next = @state.expandAndResolve(@attrs.about.value)
 
     getResource: ->
       if @attrs.resource?
-        next = @state.resolveURI(@attrs.resource.value)
+        next = @state.expandAndResolve(@attrs.resource.value)
       else if @attrs.href?
         next = @el.href
       else if @attrs.src?
         next = @state.resolveURI(@attrs.src.value)
 
     getTypes: ->
-      @attrs.typeof?.value.split(/\s+/)
+      @expandAll @attrs.typeof?.value.split(/\s+/)
 
     getProperties: ->
-      predicate = @attrs.property?.value.split(/\s+/)
+      @expandAll @attrs.property?.value.split(/\s+/)
 
     getRels: ->
-      @attrs.rel?.value.split(/\s+/)
+      @expandAll @attrs.rel?.value.split(/\s+/)
 
     getRevs: ->
-      @attrs.rev?.value.split(/\s+/)
+      @expandAll @attrs.rev?.value.split(/\s+/)
+
+    expandAll: (expressions) ->
+      return null unless expressions
+      result = []
+      for expr in expressions
+        iri = @state.expandTermOrCurieOrIRI(expr)
+        if iri
+          result.push(iri)
+      result
+
+    getLiteral: ->
+      datatype = @getDatatype()
+      lang = @state.lang
+      if datatype is RDF_XML_LITERAL
+        xml = @getXML()
+      else
+        content = @getContent()
+      if content
+        if datatype
+          return {value: content, datatype: datatype}
+        else if lang
+          # TODO: inherited (in compact: if diff. from top-level lang)
+          return {value: content, lang: lang}
+        else
+          return content
+      else# if xml
+        return {value: xml, datatype: datatype}
 
     getContent: ->
       if @attrs.content?

      @rels = data.getRels()
      @revs = data.getRevs()
      if @properties
        @datatype = data.getDatatype()
        if @datatype is RDF_XMLLiteral
          @xml = data.getXML()
        else
          @content = data.getContent()
      if data.isInlist()
        @inlist = true

    computeParentState: (el, parentState) ->
      if typeof parentState is 'string'
        base = parentState
        parentState = null
      if parentState
        return parentState
      if not el.parentNode or el.parentNode is el
        throw "NotImplemented: computeParentState for non-root not supported"
      return new State(base)

    getChildState: ->
      @state
      #nextSubject
      #nextListMap
      #nextHangSubject, nextHangRel, nextHangRev

    getErrors: ->
      @data.errors

      else if @typeof
       return @newBNode()

    getLiteral: ->
      lit = @literal
      return null unless lit
      {"@value": lit.value, "@language": lit.lang, "@datatype": lit.datatype}

    getLinks: ->
      if @rels
