lib/rdf/rdfxml/writer.rb
# See if we can serialize as attribute.
# * untyped attributes that aren't duplicated where xml:lang == @lang
# * typed attributes that aren't duplicated if @dt_as_attr is true
# * rdf:type
See if we can serialize as attribute.
untyped attributes that aren't duplicated where xml:lang == @lang
typed attributes that aren't duplicated if @dt_as_attr is true
rdf:type
See if we can serialize as attribute . untyped attributes that aren ' t duplicated where xml : lang == @lang typed attributes that aren ' t duplicated if @dt_as_attr is true rdf : type
def predicate_as_attribute?(prop, object)
      [:untyped, :typed].include?(@attributes) && (
        prop == RDF.type ||
        [:typed].include?(@attributes) && object.literal? && object.typed? ||
        (object.literal? && object.simple? || @lang && object.language.to_s == @lang.to_s)
      )
    end
def predicate_as_attribute? ( prop , object ) [ :untyped , :typed ] . include? ( @attributes ) && ( prop == RDF . type || [ :typed ] . include? ( @attributes ) && object . literal? && object . typed? || ( object . literal? && object . simple? || @lang && object . language . to_s == @lang . to_s ) ) end
See if we can serialize as attribute.
See if we can serialize as attribute .
prop
<not_specific>
object
<not_specific>