Last active
December 17, 2015 23:04
-
-
Save westurner/8c8b1cc12e2deeeba24d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# :*_markdown_github[__html] | |
# :*_markdown_commonmark[__html] | |
# Markdown[HTML] > MarkdownGithub[HTML] | |
# Markdown[HTML] > MarkdownCommonmark[HTML] | |
rdfx:Markdown a rdfs:Datatype ; | |
. | |
rdfx:MarkdownGithub a rdfs:Datatype ; | |
. | |
rdfx:MarkdownCommonMark a rdfs:Datatype ; | |
. | |
rdfx:MarkdownHTML | |
a rdfs:Datatype ; | |
rdfs:label "MarkdownHTML"@en ; | |
rdfs:comment "Markdown -> HTML"@en ; | |
. | |
rdfx:MarkdownCommonMarkHTML # this [would not require] RDFS/OWL expansion | |
a rdfs:Datatype; | |
rdfx:syntax rdfx:CommonMark ; # this [would require] RDFS/OWL expansion | |
rdfs:subClassOf rdf:MarkdownHTML ; # this [would require] RDF/OWL expansion | |
. | |
rdfx:description_markdown_github | |
a rdf:Property ; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
xsd:string | |
schema:Text | |
sysont:Markdown | |
rdfx:Markdown | |
) ; | |
] ; | |
. | |
## simple solution that works today: | |
# e.g. for schema:description | |
# ex:description_markdown_github | |
# ex:description_markdown_github__html | |
# ex:description_markdown_commonmark | |
# ex:description_markdown_commonmark__html | |
ex:description_markdown | |
a rdf:Property ; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
xsd:string | |
schema:Text | |
sysont:Markdown | |
rdfx:Markdown | |
) ; | |
] ; | |
ex:description_markdown_github | |
a rdf:Property ; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
xsd:string | |
schema:Text | |
sysont:Markdown | |
rdfx:Markdown | |
) ; | |
] ; | |
. | |
ex:description_markdown_commonmark | |
a rdf:Property ; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
xsd:string | |
schema:Text | |
sysont:Markdown | |
rdfx:Markdown | |
) ; | |
] ; | |
. | |
ex:description_markdown__html | |
a rdf:Property; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
rdf:HTML | |
rdfx:MarkdownHTML | |
) ; | |
] ; | |
. | |
ex:description_markdown_commonmark__html | |
a rdf:Property; | |
rdfs:range [ | |
rdf:type owl:Class ; | |
owl:unionOf ( | |
rdf:HTML | |
rdfx:MarkdownHTML | |
rdfx:MarkdownCommonmarkHTML | |
) ; | |
] ; | |
. | |
# | |
:thing1 a schema:Thing ; | |
rdfx:markdown "# example"; | |
rdfx:markdown__html "<h1>example</h1>"; | |
schemax:description_markdown "# example"; | |
schemax:description_markdown__html "<h1>example</h1>"; | |
. | |
:thing2_commonmark a schema:Thing ; | |
rdfx:markdown " # example" ; | |
rdfx:markdown__html "<h1>example</h1>"^^rdfx:MarkdownCommonmarkHTML ; | |
schemax:description_markdown "# example"^^rdfx:MarkdownCommonMark ; | |
schemax:description_markdown__html "<h1>example</h1>"^^rdfx:MarkdownCommonMarkHTML ; | |
. | |
:thing3_commonmark a schema:Thing ;"# example"^^rdfx:MarkdownCommonmark ; | |
schemax:description_en_markdown "# example"^^rdfx:MarkdownCommonMark ; | |
schemax:description_en_markdown__html "<h1>example</h1>"^^rdfx:MarkdownCommonMarkHTML ; | |
# according to https://jena.apache.org/documentation/notes/typed-literals.html , | |
# we can't use xml:Lang with typed literals, so e.g. the following is not | |
# technically valid:: | |
# | |
# @en^^rdfx:MarkdownCommonmark is not spec'd | |
# if this was valid, we could pseudo-key on xml:Lang | |
# so it would be | |
# schemax:description_markdown "..."@en^^rdfx:MarkdownCommonMark ; | |
# rather than | |
# schemax:description_markdown "..."@en-us ; | |
# schemax:description_markdown "..."@en-gb ; | |
# # or # | |
# schemax:description_markdown_en "..."^^rdfx:MarkdownCommonMark ; | |
# schemax:description_markdown_en-gb "..."^^rdfx:MarkdownCommonMark ; | |
# |
attr, fmt = key.split('__', -1) if key.startswith('description_')
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why the
__
in__html
?