Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedding HTML tags in literals #24

Open
stuartasutton opened this issue Apr 13, 2019 · 1 comment
Open

Embedding HTML tags in literals #24

stuartasutton opened this issue Apr 13, 2019 · 1 comment
Assignees
Labels
data model Matters concerning creation, maintenance and methods for publication of JDX data model enhancement New feature or request

Comments

@stuartasutton
Copy link
Collaborator

At least one property (jdx:formattedDescription) must accommodate HTML tagging. This can be accomplished by using the rdf:HTML datatype; e.g.:

Turtle

@prefix jdx: <http://purl.org/jdx/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<http://example.org/1234> a jdx:JobPosting;
    jdx:formattedDescription "<li><strong>Excellent typing skills required</strong></li>"^^rdf:HTML .

JSON-LD

{
  "@context": {
    "jdx": "http://purl.org/jdx/terms/",
    "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@id": "http://example.org/1234",
  "@type": "jdx:JobPosting",
  "jdx:formattedDescription": {
    "@type": "rdf:HTML",
    "@value": "<li><strong>Excellent typing skills required</strong></li>"
  }
}
@DMSaunders
Copy link
Contributor

Why not replace schema:description with jdx:formattedDescription? Since linebreaks are needed at a minimum, any descriptions pasted into this field could have linebreaks encoded and stored in jdx:formattedDescription, which would make it minimally compatible with Google.

@DMSaunders DMSaunders added enhancement New feature or request data model Matters concerning creation, maintenance and methods for publication of JDX data model labels Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data model Matters concerning creation, maintenance and methods for publication of JDX data model enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants