Skip to content

Commit

Permalink
fix generatePropertyValues.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Nov 19, 2011
1 parent 5eaf066 commit 9e03115
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/rdf/microdata/reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,17 @@ def generate_triples(item, ec = {})

# 11) For each predicate in property list
property_list.each do |predicate, values|
generatePropertyValues(item, subject, predicate, values, ec)
generatePropertyValues(item, subject, predicate, values)
end

subject
end

def generatePropertyValues(element, subject, predicate, values, ec)
registry = ec[:current_vocabulary]
if registry.as_list(predicate)
def generatePropertyValues(element, subject, predicate, values)
# If the registry contains a URI prefix that is a character for character match of predicate up to the length
# of the URI prefix, set vocab as that URI prefix. Otherwise set vocab to null
registry = Registry.find(predicate)
if registry && registry.as_list(predicate)
value = generateRDFCollection(element, values)
add_triple(element, subject, predicate, value)
else
Expand Down

0 comments on commit 9e03115

Please sign in to comment.