This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const jsonld = require("jsonld"); | |
var N3 = require('N3'); | |
var parser = N3.Parser(); | |
var turtle = ` | |
@prefix class: <http://semanticalllc.com/ns/Class/>. | |
@prefix person: <http://semanticalllc.com/ns/Person/>. | |
@prefix name: <http://semanticalllc.com/ns/Name/>. | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. | |
@prefix schema: <http://schema.org/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type="text/xsl" href="/js/xsltforms/xsltforms.xsl"?> | |
<html | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:xf="http://www.w3.org/2002/xforms" | |
xmlns:ev="http://www.w3.org/2001/xml-events" | |
xmlns:d="http://semantical.com/ns/data/" | |
> | |
<head> | |
<xf:model id="main"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
person:_JaneDoe a class:_Person; | |
person:isMemberOf org:_Shield; | |
person:hasGender gender:_Female; | |
person:hasBirthDate "1993-03-16"^^xsd:date; | |
. | |
<<person:_JaneDoe person:isMemberOf org:_Shield>> owl:sameAs _:JaneDoeMemberShield. | |
<<person:_JaneDoe person:hasBirthDate "1993-03-16"^^xsd:date>> owl:sameAs _:JaneDoeBirthDate. | |
_:JaneDoeMemberShield | |
a class:_Statement; | |
statement:hasConfidenceLevel "0.75"^^unit:_Percent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<div id="card"></div> | |
</body> | |
<script src="https://gist.githubusercontent.com/kurtcagle/206be48bfa4901c8f3d34cdf54497544/raw/3a95efdf0cb3c628fa287c2c87056f416ee6b934/templates.js">/**/</script> | |
<script src="https://gist.githubusercontent.com/kurtcagle/7f970884db8a7054b259643254800119/raw/e7c8d8437a241c080b368027b28c6fe25ceac2a3/npc.js">/**/</script> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npc = { | |
name:"Jane Doe", | |
properties:[ | |
{label:"Vocation",value:"writer",key:"vocation",datatype:"string"}, | |
{label:"Gender",value:"female",key:"gender",datatype:"string"}, | |
{label:"Setting",value:"1910s Edwardian Mystery",key:"setting",datatype:"string"}, | |
{label:"Age",value:24,key:"age",datatype:"integer"}, | |
{label:"Description",key:"description",datatype:"extString",value:"Miss Doe is a writer of mystery novels whose sometimes flighty demeanor disguises a keen intellect and excellent powers of observation."}, | |
{label:"Image",value:"https://s3-us-west-2.amazonaws.com/s.cdpn.io/620300/Laura.png",key:"image", | |
datatype:"image"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var templates = { | |
npcTemplate:(npc)=>`<article class="example"> | |
<header><h1>${npc.name}</h1></header> | |
<div class="propertyList"> | |
${npc.properties.map((property)=>property.datatype==='image'? | |
templates.imageTemplate(property): | |
templates.propertyTemplate(property)).join('\n')} | |
</div> | |
</article>`, | |
propertyTemplate:(property)=>`<div class="property"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Annotations = { | |
set: function (fn,key,expr){ | |
if (fn.annotation == null){ | |
fn.annotation = {}; | |
} | |
fn.annotation[key]=expr; | |
return this; | |
}, | |
get: function(fn,key){ | |
if (fn.annotation != null){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<style> | |
hello-world {display:none;cursor:pointer;} | |
</style> | |
<body> | |
<hello-world id="item0"></hello-world> | |
<hello-world id="item1" color1="red" greetings="Hello" target="Mars">${props.greetings}, ${props.target}</hello-world> | |
<hello-world id="item2" color1="red" color2="maroon" greetings="Guten Tag">${props.greetings}, "${props.target}"! color1 is ${props.color1}, color2 is ${props.color2}</hello-world> | |
<hello-world id="item3" color1="gray" color2="navy" greetings="Aloha">${props.greetings}, "${props.target}"!</hello-world> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module namespace stack = "http://optum.com/ns/stack/"; | |
declare function stack:new($seq as item()*) as map:map { | |
map:new((map:entry("stack",$seq))) | |
}; | |
declare function stack:push($stack as map:map,$item as item()) { | |
map:put($stack,"stack",($item,map:get($stack,"stack"))) | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?xml-stylesheet type="text/xsl" href="/js/xsltforms/xsltforms.xsl"?> | |
<html | |
xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:xf="http://www.w3.org/2002/xforms" | |
xmlns:ev="http://www.w3.org/2001/xml-events" | |
> | |
<head> | |
<xf:model id="main"> | |
<xf:instance id="data"> |
NewerOlder