# How to build and publish my own schema?

**URL:** <https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770>\
**Category:** Solid: The Basics\
**Created:** [December 3, 2018, 2:40pm UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770 "2018-12-03T14:40:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![linonetwo](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/linonetwo/32/4039_2.png) [@linonetwo](https://forum.solidproject.org/u/linonetwo)\
**Post date:** [December 3, 2018, 2:40pm UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/1 "2018-12-03T14:40:33Z")

</div>

There are lots of existed schemas in [https://lov.linkeddata.es/dataset/lov](https://lov.linkeddata.es/dataset/lov) that I can search for.  
(and [https://whattheontology.herokuapp.com/](https://whattheontology.herokuapp.com/) by @tuelsch)

But If I have some concept that needs new schema, for example, IPFS multihash, how can I publish a new schema and let this schema searchable to other developers?

I think one way is write schema defination in RDF, and put that RDF document on the POD, to get permanent URLs point to words. And I share the URL to RDF in this forum so others know there is a schema about IPFS.

Another way maybe publish schema’s literals (fake or real URI) as npm package, so developers can search this package and import those URI literals. Then they get Interoperability.

Two questions:

1. any better way to publish new schema so other developers can search for it?
2. any template or generator that can boost the process to build the schema?

---

<div class="post-metadata">

**Author:** ![happybeing](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/happybeing/32/59_2.png) [@happybeing](https://forum.solidproject.org/u/happybeing)\
**Post date:** [December 3, 2018, 3:29pm UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/2 "2018-12-03T15:29:59Z")

</div>

I’m interested to hear the ‘experts’ answers here (again as it is a perennial question!)

Also, I’d be interested in your thoughts on @joshuef’s proposal in this area, and I know he will too, see:

> [@A standard sharing experience?](http://forum.solidproject.org/t/a-standard-sharing-experience/554/5):
>
> Hey @justin, Here’s what I’m imagining could form part of a web dev toolchain (so a JS focus): I’ve set about defining schemas as JS modules. The aim being that we can then use these at run time to provide feedback to devs / warnings etc, and provide validation. So using a [Book schema pulled from schema.org](https://github.com/joshuef/schema-doter), using a POC lib for [sheperding data](https://github.com/joshuef/semantic-shepherd) import shepderd from '../src/shepherd'; import { Book } from 'schema-doter'; import rdflib from 'rdflib'; const sampleObject = { 'id' …

---

<div class="post-metadata">

**Author:** ![anon36056958](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@anon36056958](https://forum.solidproject.org/u/anon36056958)\
**Post date:** [December 3, 2018, 6:30pm UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/3 "2018-12-03T18:30:43Z")

</div>

@tuelsch and @pheyvaer have proposed an app for this, see [ontology hub](http://forum.solidproject.org/t/what-app-would-you-love-to-see-on-solid/525/17)

---

<div class="post-metadata">

**Author:** ![tuelsch](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tuelsch/32/249_2.png) [@tuelsch](https://forum.solidproject.org/u/tuelsch)\
**Post date:** [December 4, 2018, 3:24am UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/4 "2018-12-04T03:24:03Z")

</div>

The first idea of the app @anon36056958 mentioned was more a (fast) search index for existing ontologies with a curated list of ontologies. During the development I realised, that the RDF files of those onthologies, allthough accessible by URI, are nowhere near available as expected. Even commonly used onthologies like VCARD or SIOC sometimes failed to download due to server overload or network issues (timeout), others weren’t even available at thier URI - I think this is ridiculous. The ontology core files should be hosted on a CDN and available 24/7. I’m therefore not sure if hosting your own ontology on your solid POD is a good idea, but on the other hand I don’t know how resilient PODs are against heavy network traffic.

---

<div class="post-metadata">

**Author:** ![linonetwo](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/linonetwo/32/4039_2.png) [@linonetwo](https://forum.solidproject.org/u/linonetwo)\
**Post date:** [December 4, 2018, 8:54am UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/5 "2018-12-04T08:54:59Z")

</div>

Yes, [some URL of ontology](http://id.loc.gov/vocabulary/iso639-2/zho) even being block by a CDN and we need to enter a captcha to visit it. (And it’s not https)

As infrestructure, I thought there could have been a centuralized place like [http://npmjs.com](http://npmjs.com) to hold all schemas. This could have been done by W3C to build up the consensus.

There is a proposal about decenturalized schema, that cares about the content of schema but not the URI of schema [https://github.com/sandhawke/schemove](https://github.com/sandhawke/schemove). A centuralized place is the most reliable solution, but if there is no such place, moveable schema may be an option.

---

<div class="post-metadata">

**Author:** ![tuelsch](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/tuelsch/32/249_2.png) [@tuelsch](https://forum.solidproject.org/u/tuelsch)\
**Post date:** [February 23, 2019, 6:00am UTC](https://forum.solidproject.org/t/how-to-build-and-publish-my-own-schema/770/6 "2019-02-23T06:00:08Z")

</div>

I very much like to see a CDN where all the ontologies are available in a reliant and fast way. I thought about building a kind of storage service that is behind a CDN like cloudflare. This would be a server accessible at e.g. [https://ontology-cdn.com](https://ontology-cdn.com). You could request ontologies via query string like [https://ontology-cdn.com?url=http%3A%2F%2Frdfs.org%2Fsioc%2Fns%23](https://ontology-cdn.com?url=http%3A%2F%2Frdfs.org%2Fsioc%2Fns%23) (for [http://rdfs.org/sioc/ns#](http://rdfs.org/sioc/ns#)).

The server would send the cached file if available, else it would try to request the file from it’s original location and cache it.

Despite all the open source effort of all things linked data, those ontology files are very hard to come by and are extremely inconsistent. I’m working on improving [https://whattheontology.herokuapp.com](https://whattheontology.herokuapp.com) with the ability to add custom ontologies. To be able to parse them, I need to validate them. Writing a JSONSchema validator for ontology files turned out to be a real challenge.
