summaryrefslogtreecommitdiff
path: root/mockup
diff options
context:
space:
mode:
Diffstat (limited to 'mockup')
-rw-r--r--mockup/article.osml126
-rw-r--r--mockup/base.osml86
-rw-r--r--mockup/meta.osml243
-rw-r--r--mockup/typography_test.html29
-rw-r--r--mockup/what_is_ousia.osml165
5 files changed, 635 insertions, 14 deletions
diff --git a/mockup/article.osml b/mockup/article.osml
new file mode 100644
index 0000000..ca3d891
--- /dev/null
+++ b/mockup/article.osml
@@ -0,0 +1,126 @@
+%{
+ Ousía -- Standard Ontology Library
+ Copyright (C) 2015 Benjamin Paaßen, Andreas Stöckel
+
+ This file is licensed under the Creative CommonsAttribution-ShareAlike 4.0
+ International (CC BY-SA 4.0) license.
+
+ See http://creativecommons.org/licenses/by-sa/4.0/ for more information.
+}%
+
+%{!
+ The "article" ontology contains elements used to write articles as found on
+ websites, in scientific journals, in magazines or (as a collection of
+ articles) in books.
+
+ \author{Andreas Stöckel}{astoecke@techfak.uni-bielefeld.de}
+}%
+\begin{ontology#article}
+
+\import[ontology]{./base.osml}
+\import[ontology]{./meta.osml}
+
+% Forward elements from "base"
+\struct#section[isa=base.section]
+\struct#subsection[isa=base.subsection]
+\struct#subsubsection[isa=base.subsubsection]
+\struct#text[isa=base.text]
+
+%{
+ Sectioning elements
+}%
+
+% Root article class
+\struct#article[root=true,isa=sectioning]{
+ \field#content{
+ \childRef[ref=article.section]
+ \childRef[ref=block]
+ }
+}
+
+%{
+ Inline elements
+}%
+
+% Speech
+\struct#speech[isa=inline]{
+ \syntax{
+ \open{<<}
+ \close{>>}
+ }
+ \field{
+ \childRef[ref=inline]
+ }
+}
+
+% Hyperlinks
+\struct#href[isa=inline]{
+ \primitive#url[type=string,subtree=true,optional=false]
+ \field[optional=true]{
+ \childRef[ref=inline]
+ }
+}
+
+% Inline code
+\struct#inlineCode[isa=inline]{
+ \attributes{
+ \attribute#lang[type=string]
+ }
+ \syntax{
+ \open{`}
+ \close{`}
+ }
+ \primitive[type=string]
+}
+
+%{
+ Block elements
+}%
+
+\struct#paragraph[isa=block,transparent=true]{
+ \field#title[subtree=true,optional=true]{
+ \childRef[ref=inline]
+ }
+ \field#content{
+ \childRef[ref=inline]
+ }
+}
+
+\struct#quote[isa=block]{
+ \field{
+ \childRef[ref=block]
+ }
+}
+
+\struct#aside[isa=block]{
+ \field{
+ \childRef[ref=block]
+ }
+}
+
+\struct#figure[isa=block]{
+ \field{
+ \childRef[ref=figureElement]
+ }
+}
+
+\struct#figureElement
+
+\struct#img[isa=figureElement,cardinality={0-1}]{
+ \primitive#src[optional=false,subtree=true,type=string]
+ \field{
+ \childRef[ref=imgMeta]
+ }
+}
+
+\struct#img[transparent=true]{
+ \field{
+
+ }
+}
+
+% Emphasis annotation
+\annotation#em
+
+\end{ontology}
+
diff --git a/mockup/base.osml b/mockup/base.osml
new file mode 100644
index 0000000..43ff132
--- /dev/null
+++ b/mockup/base.osml
@@ -0,0 +1,86 @@
+%{
+ Ousía -- Standard Ontology Library
+ Copyright (C) 2015 Benjamin Paaßen, Andreas Stöckel
+
+ This file is licensed under the Creative CommonsAttribution-ShareAlike 4.0
+ International (CC BY-SA 4.0) license.
+
+ See http://creativecommons.org/licenses/by-sa/4.0/ for more information.
+}%
+
+%{!
+ The "base" ontology contains "abstract" base classes other ontologies might
+ derive from. The "base" ontology should not be used by document authors
+ directly.
+
+ \author{Andreas Stöckel}{astoecke@techfak.uni-bielefeld.de}
+}%
+\begin{ontology#base}
+
+%{!
+ Basic inline elements.
+}%
+
+%{!
+ The inline class is used for the definition of elements which are part of
+ the text flow.
+}%
+\struct#inline
+
+% The block class is used for the definition of elements which end the current
+% text flow.
+\struct#block
+
+%{!
+ The text class is used to specify
+}%
+\struct#text[isa=inline,transparent=true]{
+ \primitive[type=string]
+}
+
+% The sectioning class is the base class from which all sectioning elements
+% (those that should appear in the outline of a document) should be derived.
+\struct#sectioning{
+ \field#title[subtree=true,optional=true]{
+ \childRef[ref=inline]
+ }
+ \field#content{
+ \childRef[ref=block]
+ }
+}
+
+% The sectioning classes defined here should not directly be used for writing
+% documents. Other ontologies should subclass these sectioning elements.
+
+\struct#part[isa=sectioning]{
+ \field#content{
+ \childRef[ref=chapter]
+ }
+}
+
+\struct#chapter[isa=sectioning]{
+ \field#content{
+ \childRef[ref=section]
+ }
+}
+
+\struct#section[isa=sectioning]{
+ \field#content{
+ \childRef[ref=subsection]
+ }
+}
+
+\struct#subsection[isa=sectioning]{
+ \field#content{
+ \childRef[ref=subsubsection]
+ }
+}
+
+\struct#subsubsection[isa=sectioning]{
+ \field#content{
+ \childRef[ref=subsubsection]
+ }
+}
+
+\end{ontology}
+
diff --git a/mockup/meta.osml b/mockup/meta.osml
new file mode 100644
index 0000000..dc728e3
--- /dev/null
+++ b/mockup/meta.osml
@@ -0,0 +1,243 @@
+%{
+ Ousía -- Standard Ontology Library
+ Copyright (C) 2015 Benjamin Paaßen, Andreas Stöckel
+
+ This file is licensed under the Creative CommonsAttribution-ShareAlike 4.0
+ International (CC BY-SA 4.0) license.
+
+ See http://creativecommons.org/licenses/by-sa/4.0/ for more information.
+}%
+
+%{!
+ The "meta" ontology contains various structures that can be used within meta
+ data as well as top-level meta-classes that may be subclassed by
+ higher-level ontologies. This ontology should not be imported by the user
+ directly.
+
+ \author{Andreas Stöckel}{astoecke@techfak.uni-bielefeld.de}
+}%
+\begin{ontology#meta}
+
+\import[ontology]{./base.osml}
+
+%{!
+ The meta_types typesystem specifies types that are used throughout the
+ meta domain.
+}%
+\begin{typesystem#meta_types}
+ %{!
+ Used to specify the type of a "name".
+
+ TODO: Are there other name types? E.g. search Wikidata or other sources
+ like the vCard standard or microformats.org.
+ }%
+ \enum#name_type{
+ %{!
+ Specifies the name as the "official" name, as it is e.g. written in
+ the passport of this persion. The "official" name is the default
+ name type.
+ }%
+ \entry{official}
+
+ %{!
+ Specifies the name as the name under which a person was born. This
+ name should not reflect later changes as they occur e.g. because of
+ marriage.
+ }%
+ \entry{birthname}
+
+ %{!
+ Name used e.g. to identify a person on the internet or as called in
+ its peergroup.
+ }%
+ \entry{nickname}
+
+ %{!
+ Name e.g. used by artist who do not want to use their real name to
+ be published.
+ }%
+ \entry{pseudonym}
+
+ %{
+ Indicates the the name is an abbreviation of the actual name.
+ }%
+ \entry{short}
+ }
+\end{typesystem}
+
+%{!
+ Everything that may be located inside a generic meta field should be
+ subclassed from meta_property
+}%
+\struct#meta_property
+
+%{
+ Should be used to specify the title of a piece of work. This field should
+ not be used if the element that is being described already has a "title" or
+ "heading" field.
+}%
+\struct#title[isa=meta_property]{
+ \field{
+ \childRef[ref=inline]
+ }
+}
+
+%{
+ Should be used to specify where the entity at hand was copied from.
+}%
+\struct#source[isa=meta_property,cardinality={0-1}]{
+ \field{
+ \childRef[ref=inline]
+ }
+}
+
+%{
+ Should be used to specify the license of the work.
+}%
+\struct#license[isa=meta_property]{
+ %{!
+ Url where the verbose license text can be found.
+ }%
+ \primitive#url[type=string,subtree=true,optional=true]
+
+ %{!
+ Name of the license
+ }%
+ \field#descriptor{
+ \childRef[ref=license_descriptor]
+ }
+}
+
+\struct#license_descriptor
+\struct#generic_license[isa=license_descriptor,transparent=true]{
+ \primitive[type=string]
+}
+
+\struct#creative_commons_license[isa=license_descriptor]{
+ \attributes{
+ \attribute#version[type=string]
+ \attribute#country[type=string,default="international"]
+ }
+}
+
+\struct#cc_0[isa=creative_commons_license]
+\struct#cc_by[isa=creative_commons_license]
+\struct#cc_by_sa[isa=creative_commons_license]
+\struct#cc_by_nd[isa=creative_commons_license]
+\struct#cc_by_nc[isa=creative_commons_license]
+\struct#cc_by_nc_sa[isa=creative_commons_license]
+\struct#cc_by_nc_nd[isa=creative_commons_license]
+
+
+%{!
+ Date specifying the creation date of an entity. Use "published"
+
+ TODO: Replace with parsing struct type
+}%
+\struct#date[transparent=true,cardinality={0-1}]{
+ \primitive[type=string]
+}
+
+%{
+ Structure used to define abstract persons. This class should not be used
+ directly. Use one of the subclasses "author" or "artist" (or one of its
+ subclasses instead).
+}%
+\struct#person{
+ \field{
+ \childRef[ref=person_property]
+ }
+}
+\struct#person_property
+
+\struct#name[isa=person_property,transparent=true]{
+ \attributes{
+ \attribute#type[type=name_type, default=official]
+ }
+ \primitive#first[type=string,optional=true,subtree=true]
+ \primitive#last[type=string,optional=true,subtree=true]
+ \primitive#second[type=string,optional=true,subtree=true]
+}
+
+%{
+ Structure used to specify the authors of an entity. Please note that there
+ is a subtle difference between an "author" and an "artist". In this
+ definition an author is someone who produced a work of text. The "artist"
+ structure is used for everything else.
+}%
+\struct#authors[isa=meta_property,transparent=true,cardinality={0-1}]{
+ \field{
+ \childRef[ref=author]
+ }
+}
+
+%{
+ Structure used to specify one of the authors of a piece of work.
+}%
+\struct#author[isa=person]{
+ \attributes{
+ %{!
+ Should be set to true if this is a primary author of the work at
+ hand.
+ }%
+ \attribute#primary[type=bool, default=false]
+ }
+}
+
+%{!
+ Structure used to specify the creators of a piece of art.
+}%
+\struct#artists[isa=meta_property,transparent=true,cardinality={0-1}]{
+ \field{
+ \childRef[ref=artist]
+ }
+}
+
+%{!
+ Generic person that creates a piece of work.
+}%
+\struct#artist[isa=person]
+
+%{
+ Artist who drew a painting or a sketch.
+}%
+\struct#painter[isa=artist]
+
+%{
+ Artist who created a photograph (the person ultimately shooting the photo).
+}%
+\struct#photographer[isa=artist]
+
+%{!
+ Artist who created a sculpture.
+}%
+\struct#sculpter[isa=artist]
+
+%{!
+ Artist who composed a piece of music.
+}%
+\struct#composer[isa=artist]
+
+%{!
+ Artist who conducted an orchestra.
+}%
+\struct#conductor[isa=artist]
+
+%{!
+ Artist who sings in a band or in an orchestra.
+}%
+\struct#singer[isa=artist]
+
+%{!
+ Used for someone playing an instrument e.g. inside an orchestra or a band.
+ The instrument the musician plays may be specified.
+}%
+\struct#musician[isa=artist]{
+ \attributes{
+ \attribute#instrument[type=string,default=""]
+ }
+}
+
+
+\end{ontology}
+
diff --git a/mockup/typography_test.html b/mockup/typography_test.html
index 832057f..f4ca915 100644
--- a/mockup/typography_test.html
+++ b/mockup/typography_test.html
@@ -26,10 +26,10 @@
<figure>
<img src="../media/Raffael_058.jpg"/>
<figcaption>
- <span class="source">The School of Athens by Raphael, 1509-1510 <a href="http://commons.wikimedia.org/wiki/File:Raffael_058.jpg" rel="external">(Wikimedia Commons)</a></span>
- Ousía (οὐσία) is a term used by ancient greek philosophers to
- describe <q>The entirety of constant features, based on which
- objects can be defined</q>.</figcaption>
+ <span class="source">The School of Athens by Raphael, 1509-1510 (<a href="http://commons.wikimedia.org/wiki/File:Raffael_058.jpg" rel="external">Wikimedia Commons</a>)</span>
+ Ousía (οὐσία) originally is a term used by ancient greek
+ philosophers to describe <q>The entirety of constant features,
+ based on which objects can be defined</q>.</figcaption>
</figure>
<p>Let's start with the mandatory one-sentence sales-pitch answer to
@@ -60,7 +60,7 @@
<h3>Ousía is not LaTeX</h3>
<aside>Ousía is not a typesetter. It lets you define the meaning of
- your document, and not what it looks like.</aside>
+ your document instead of style.</aside>
<p>You may have seen examples of documents written in the Ousía
Markup Language and thought “Well, that's just LaTeX!”. Rest
@@ -76,8 +76,9 @@
documents in a less awkward way.</p>
<p>Ousía knows nothing about typesetting. It doesn't even know what
- medium your document will end up on. Ousía is for describing the
- content of your document. Nothing more.</p>
+ medium (Webpage, Paper, E-Book) your document will end up on. Ousía
+ can be used to describe the content of your document. Nothing more.
+ </p>
</section>
<section class="subsection">
@@ -101,7 +102,7 @@
<figure>
<img src="../media/Kizil_Hauzen_Bridge_2013.jpg"/>
<figcaption>
- <span class="source">Kizil Hauzen Bridge, Iran, 2013 <a href="http://commons.wikimedia.org/wiki/File:Kizil_Hauzen_Bridge_2013.jpg" rel="external">(Wikimedia Commons)</a></span>
+ <span class="source">Kizil Hauzen Bridge, Iran, 2013 (<a href="http://commons.wikimedia.org/wiki/File:Kizil_Hauzen_Bridge_2013.jpg" rel="external">Wikimedia Commons</a>)</span>
We aim at building a bridge to end the seperation of the
ordinary user from the the power of the Semantic Web, there,
awaiting them on the other side.</figcaption>
@@ -119,7 +120,7 @@
<p>In that case you'll very likely say: <q>I have everything I need!
Leave my standards alone! They are mine, all mine! My precious!</q></p>
- <p>Well, fear not! We're there to help. We too believe the Semantic
+ <p>Well, fear not! We're here to help. We too believe the Semantic
Web is great, but we want to allow everyone to write documents
with semantic markup. We've designed Ousía to be as simple as
possible for the end-user. It will be possible to export Ousía
@@ -179,16 +180,16 @@ and therefore belongs to the composite order of architecture.
\end{meta}
% Define the characters that occur in the book -- we can
- % later reference them by their name ("hashtag")
+ % later reference them by their instance name ("hashtag")
\begin{characters}
- \def#hf{
+ \def#huck{
\name{
\first{Huckleberry}
\first[short]{Huck}
\last{Finn}
}
}
- \def#ts{
+ \def#tom{
\name{
\first{Thomas}
\first[short]{Tom}
@@ -204,8 +205,8 @@ and therefore belongs to the composite order of architecture.
Most of the adventures recorded in this book really
occurred; one or two were experiences of my own, the
rest those of boys who were schoolmates of mine.
- ::{hf}Huck Finn:: is drawn from life; ::{ts}Tom
- Sawyer:: also, but not from an individual—he is a
+ ::{huck}Huck Finn:: is drawn from life; ::{tom}Tom
+ Sawyer:: also, but not from an individual -- he is a
combination of the characteristics of three boys whom
I knew, and therefore belongs to the composite order
of architecture.
diff --git a/mockup/what_is_ousia.osml b/mockup/what_is_ousia.osml
new file mode 100644
index 0000000..c8b6eb8
--- /dev/null
+++ b/mockup/what_is_ousia.osml
@@ -0,0 +1,165 @@
+\import[ontology]{./article.osml}
+
+\begin{article}{What is the Ousía Framework}
+
+\begin{definitions}
+ % Abbreviations
+ \abbr#OSML{!Ousía Semantic Markup Language}
+ \abbr#OSXML{!Ousía Semantic XML}
+ \abbr#OWL{!Web Ontology Language}
+ \abbr#RDF{!Resource Description Framework}
+ \abbr#XSLT{!Extensible Stylesheet Language Transformations}
+ \abbr#SPARQL{!SPARQL Protocol And RDF Query Language}
+\end{definitions}
+
+\begin{figure#school_of_athens}
+ \img{
+ \src{../media/Raffael_058.jpg}
+ \title{The School of Athens}
+ \artist{Raphael}
+ \date{1509-1510}
+ \source{
+ \href{http://commons.wikimedia.org/wiki/File:Kizil_Hauzen_Bridge_2013.jpg}{Wikimedia Commons}
+ }
+ }
+ \caption{Ousía (οὐσία) originally is a term used by ancient greek philosophers to describe <<The entirety of constant features, based on which objects can be defined>>.}
+\end{figure}
+
+Let's start with the mandatory one-sentence sales-pitch answer to the above question:
+
+\quote{Ousía is a framework for representing documents in a user extensible markup language, allowing transformation to a a variety of output formats.}
+
+Still confused and unsure what Ousía is and what you can do with it? So are we. Read on to be enlightened!
+
+
+\section{What Ousía is <\em not\>}
+
+Whenever we're asked what Ousía is, we have a hard time giving a short and precise answer. This is not because Ousía is overly complicated – the answer just very much depends on the direction from which you look at Ousía.
+
+To avoid any misconceptions, let's start answering the easier question: What Ousia is <\em not\>. If you don't know the technologies we refer to here, you can safely skip the corresponding sections.
+
+
+\subsection{Ousía is not LaTeX}
+
+\aside{Ousía is not a typesetter. Instead of styling it lets you define the meaning of your document.}
+
+You may have seen examples of documents written in the Ousía Markup Language and thought <<Well, that's just LaTeX!>>. Rest assured, Ousía is nothing like that. Yes, one of our formats looks a little bit like TeX, but, you know, any resemblance to real persons, living or dead, is purely coincidential.
+
+TeX is a typesetter. It is a programming language aimed at controlling how text is fitted onto a printed page, merely automating a job that has been done manually for centuries\cite{wiki_typesetting}. And LaTeX is a bunch of macros for authoring TeX documents in a less awkward way.
+
+Ousía knows nothing about typesetting. It doesn't even know what medium (Webpage, Paper, E-Book) your document will end up on. Ousía can be used to describe the content of your document and that's just about it.
+
+
+\subsection{Ousía is not an editor}
+
+Ousía is not an editor application. Ousía documents are written in one of two markup languages $OSML and $OSXML which basically are plain text files. These files are then handed to an application called `ousia` that will parse them, check for errors and transform them to another format.
+
+There may be special editors that help you writing Ousía documents or that use the underlying program library `libousia` to provide a more convenient editing experience, but this doesn't change the bigger picture.
+
+
+\subsection{Ousía does not replace Semantic Web technologies}
+
+\begin{figure#kizil_hauzen_bridge}
+ \img{../media/Kizil_Hauzen_Bridge_2013.jpg}
+ \meta{
+ \title{Kizil Hauzen Bridge}
+ \location{Iran}
+ \date{2013}
+ }
+ \caption{We aim at building a bridge to end the seperation of the ordinary user from the the power of the Semantic Web, there, awaiting them on the other side.}
+\end{figure}
+
+\aside{Ousía makes the Semantic Web approachable for muggles.}
+
+It is possible (though unlikely, they are a rare species) that you are a Semantic Web expert: You know all three dialects of $OWL, write your love-letters in $RDF and transform vegetables into supper using $XSLT, just to devour it with your $SPARQL powers.
+
+In that case you'll very likely say: <<I have everything I need! Leave my standards alone! They are mine, all mine! My precious!>>
+
+Well, fear not! We're here to help. We too believe the Semantic Web is great, but we want to allow everyone to write documents with semantic markup. We've designed Ousía to be as simple as possible for the end-user. It will be possible to export Ousía ontologies and documents to all those shiny, complex, incomprehensibly powerful W3C standards. Promised.
+
+
+\section{Semantic Markup unleashed}
+
+In this section we will skim over a few examples of how Ousía can be used,
+giving you a quick impression.
+
+
+\subsection{Express what you mean}
+
+One aspect of Ousía is its document markup language. It allows you to write the text of your document while attaching additonal information to the text using special commands.
+
+Let's assume you wanted to write a book (e.g. \href{https://www.gutenberg.org/ebooks/74}{The Adventures of Tom Sawyer} by Samuel Langhorne Clemens alias Mark Twain). You could start writing it down like this:
+
+\begin{code}[osml]
+ THE ADVENTURES OF TOM SAWYER
+ by
+ Mark Twain
+ (Samuel Langhorne Clemens)
+
+PREFACE
+
+Most of the adventures recorded in this book really occurred;
+one or two were experiences of my own, the rest those of boys
+who were schoolmates of mine. Huck Finn is drawn from life;
+Tom Sawyer also, but not from an individual—he is a
+combination of the characteristics of three boys whom I knew,
+and therefore belongs to the composite order of architecture.
+\end{code}
+
+\begin{code}
+\\import[ontology]\{book\} \% We want to write a book
+\\import[ontology]\{novel\} \% We want to do some novel writing
+
+\\begin\{book\}[lang=en]\{The Adventures of Tom Sawyer\}
+ \% Add some meta-information about the book at hand
+ \\begin\{meta\}
+ \\author\[realname\]\{
+ \\name\{
+ \\first\{Samuel\}
+ \\middle\{Langhorne\}
+ \\last\{Clemens\}
+ \}
+ \\name[alias]\{
+ \\first\{Mark\}
+ \\last\{Twain\}
+ \}
+ \}
+ \\published\{1876\}
+ \\end\{meta\}
+
+ \% Define the characters that occur in the book -- we can
+ \% later reference them by their instance name ("hashtag")
+ \\begin\{characters\}
+ \\def#huck\{
+ \\name{
+ \\first\{Huckleberry\}
+ \\first[short]\{Huck\}
+ \\last\{Finn\}
+ \}
+ \}
+ \\def#tom\{
+ \\name\{
+ \\first\{Thomas\}
+ \\first[short]\{Tom\}
+ \\last\{Sawyer\}
+ \}
+ \}
+ \\end\{characters\}
+
+ \% Start of the actual content -- we can annotate certain
+ \% parts of the document to reference one of the characters
+ \% defined above
+ \\begin\{preface\}
+ Most of the adventures recorded in this book really
+ occurred; one or two were experiences of my own, the
+ rest those of boys who were schoolmates of mine.
+ ::\{huck\}Huck Finn:: is drawn from life; ::\{tom\}Tom
+ Sawyer:: also, but not from an individual -- he is a
+ combination of the characteristics of three boys whom
+ I knew, and therefore belongs to the composite order
+ of architecture.
+ \\end\{preface\}
+\\end{book}
+\end{code}
+
+\end{article}