     getDatatype: ->
       if @attrs.datatype?
         return @attrs.datatype.value
-      else if @profile is 'html' and @tagName is 'time'
+      else if @state.profile is 'html' and @tagName is 'time'
+        value = @getContent()
         if value.indexOf('T') > -1
           return 'xsd:dateTime'
         else


    getAbout: ->
      if @attrs.about? #and not parent
        next = {'@id': @state.resolveURI(@attrs.about.value)}

    getResource: ->
      if @attrs.resource?
        next = {'@id': @state.resolveURI(@attrs.resource.value)}
      else if @attrs.href?
        next = {'@id': @el.href}
      else if @attrs.src?
        next = {'@id': @state.resolveURI(@attrs.src.value)}

    getTypes: ->
      @attrs.typeof?.value.split(/\s+/)

  RDF_XMLLiteral = RDF_IRI + 'XMLLiteral'


  extract = (doc, base, profile='html') ->
    state = builder.init(doc, base, profile)
    walk(doc.documentElement, state)
    return builder.complete(state)

