Skip to content

Commit dba6eee

Browse files
drugbank nested element fix
1 parent fd3ef0e commit dba6eee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drugbank/drugbank.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,11 +734,15 @@ function AddCategory(&$x, $id, $list_name, $item_name, $predicate, $list_item_na
734734
);
735735
}
736736
}
737+
$kid = parent::getvoc().md5($l->asXML());
737738
foreach($l->children() AS $k2 => $v2) {
738739
$this->addRDF(
739-
$this->triplifyString($kid, parent::getVoc().$k2, $v2)
740+
$this->describeIndividual($kid,($k2=="name"?$v2:$predicate),parent::getVoc().ucfirst($k2)).
741+
$this->describeClass(parent::getVoc().ucfirst($k2),ucfirst("".$v2)).
742+
$this->triplifyString($kid, parent::getVoc().$k2, $v2).
743+
$this->triplify($id, $predicate, $kid)
740744
);
741-
}
745+
}
742746
}
743747
}
744748
}

0 commit comments

Comments
 (0)