Description

This demo shows the simplest kind of binding available in semanticKO. The about HTML property can be used to bind a DOM node to a RDF node stored in the data layer. Once the node is bound, RDF properties for that node can be bound to different properties of the DOM node using the data-bind property defined in KnockoutJS.

In this case we have bound the div#example1 child span DOM node to the RDF http://www.w3.org/People/Berners-Lee/card#i node describing a person. Then the text of a child p node has been bound to the foaf:name RDF property.

SemanticKO also supports the use of a view model object for the view, in the same way as KnockoutJS. In this case, we provide and empty object, since the RDF data layer is being used as the effective view model.

Output

View

Data (JSON-LD)

View Model