> DSPWikiSyntax

The following 487 words could not be found in the dictionary of 550 words (including 550 LocalSpellingWords) and are highlighted below:

0441a95b1d0d8e30874a4495b77aa328b0e00cb3   5159f8967f111d1c1d4534655ae29caed9bfa3e0   73b00486a2accebac7d388733ee6a7334cf016aa   87a4e839141cffc88091c1d2d57eaaf3ba1c5205   a956b3a98ea091ebcd800518eaaee2489610bdec   abbreviated   about   above   Abstract   abstract   according   action   add   adding   after   all   allowed   almost   also   an   An   and   angle   any   Any   Anything   anyuri   Apart   Application   apply   architecturewiki   are   argument   arguments   as   As   at   Attach   attachment   attribute   attributes   backslash   based   basic   be   been   before   Before   belong   Below   below   between   bgcolor   blank   blankspace   both   braces   brackets   but   by   C2007   call   called   can   cef2f2   choices   citation   Class   classes   close   closed   com   comma   Comment   computer   concepts   conditions   consist   constrain   Constraint   constraint   Constraints   constraints   construct   consumption   contain   contains   Contents   Core   correspond   corresponds   create   created   creating   Creator   creator   csc   curly   dc   de   decides   declaration   declare   Declared   declared   declaring   default   defined   Definition   depicted   describe   described   describes   describing   description   Description   Design   detail   detailed   different   directly   disallowed   do   document   documents   does   done   Draft   dsp   Dublin   dublincore   e1f4f88a502b2e1354d3373f7da1a019e3d21096   each   Each   eb01bf04c9a0e8a71c45816513df424f1c7ffedb   Editor   either   elements   embedded   empty   en   encoding   Encoding   end   engine   Enoksson   entity   entry   eprint   Eprints   etc   example   Example   Examples   express   expressed   Expressed   Expressing   expression   extension   F66   fen   figure   Figure   File   first   foaf   focused   followed   following   follows   For   for   form   formal   Format   format   Format2   Fredrik   from   From   further   furthermore   general   get   given   got   has   have   head   help   Help   Here   here   hierarchical   hierarchy   how   However   human   I1   identifier   Identifier   Ie   If   if   ignored   implementation   implemented   Important   in   In   include   indicate   information   Inside   inside   installed   instance   instead   integer   Integer   intended   into   is   Is   it   It   its   keyword   keywords   kind   Knowmania   knows   kth   Lang   lang   language   Language   languages   larger   left   levels   like   limit   line   list   List   literal   Literal   literals   looks   machine   made   makes   making   mandatory   March   mark   marks   max   Maximum   maximum   means   membership   Membership   min   minimum   Minimum   mix   Model   model   more   most   must   name   named   need   needed   needs   negative   net   new   no   Non   non   none   nonliteral   Nonliteral   normal   not   notion   Occur   occurence   occurrence   Occurrence   occurrs   Of   of   On   on   one   ones   only   optional   options   or   order   organization   Other   out   over   own   P2   page   pair   parenthesis   parsed   parser   Parsers   parsers   part   parts   pdf   Person   person   placed   places   png   possible   Powerpoint   ppt   presentation   Presentation   previously   primarily   printout   Profile   Profiles   property   Property   provided   purl   reading   recommended   ref   reference   relations   remarks   render   rendered   resource   Resource   respectively   responsible   rest   resulting   retrieve   retrieved   reused   right   same   Scheme   scheme   schemes   se   section   see   seen   separated   separator   serialization   serve   service   Set   set   should   show   shown   similar   simple   single   small   so   Some   some   something   source   space   span   specific   standalone   Standalone   Start   start   starting   starts   stated   statement   Statement   states   Statment   string   String   strings   structural   structure   Sub   such   superseded   surrogates   surrounding   sv   Sweden   symbols   Syntax   syntax   Table   table   tag   target   template   Template   templates   Templates   terms   text   than   that   The   the   their   them   then   There   These   these   they   this   This   Title   title   to   To   turn   two   type   Type   typical   Typically   uml   under   understanding   until   up   uri1   uri2   uri3   uri4   Usage   usage   use   used   uses   using   valid   Value   value   values   visit   Vocabulary   vocabulary   way   well   When   when   where   which   wikisyntax   wikiwikiweb   will   With   with   within   Working   xmlns   yes   zero  

Clear message

Draft: A MoinMoin Wiki Syntax for Description Set Profiles

Important: This document has been superseded by http://dublincore.org/documents/2008/10/07/dsp-wiki-syntax/.

Editor: Fredrik Enoksson <fen@csc.kth.se>, Knowmania HB, Sweden

  1. Design and description of the wiki syntax
    1. Expressing the different parts of a DSP
      1. Expressing a Description Template
      2. Expressing a Statement Template
        1. Expressing a literal value constraint
        2. Expressing a non-literal Value Constraint
      3. Examples
  2. Usage example
    1. Example of the syntax
  3. Description template
    1. Title
    2. Creator
      1. The resulting HTML:
      2. The resulting XML

This document describes a Wiki syntax for a Description Set Profile as defined in the DCMI Working Draft "Description Set Profiles: A constraint language for Dublin Core Application Profiles" of March 2008 [[WWW][1]], which in turn is based on the DCMI Abstract Model [[WWW][2]. It is recommended to have some understanding of the concepts of Description Set Profile (abbreviated DSP in the rest of this document) before reading this document.

A DSP is a way of describing structural constraints on a description set and is not directly intended for human consumption. However, with the wiki-syntax for DSP described here makes it possible to mix normal wiki-syntax with specific DSP wiki syntax in order to document an Application Profile. This means that from the same source it is possible to create:

The DSP wiki-syntax and how to use is described in this document and is focused on an implementation done for the moinmoin wiki engine [[WWW][3]] with the help of an extension to that wiki-engine. The extension to the moinmoin wiki-engine to render a HTML-page, has been done by adding a parser extension. To call that parser, named DSP, inside a wiki-page the following syntax is used:

 {{{#!DSP
  /* Here the specific Description Set Profile wiki-syntax to be parsed */
 }} }
Anything above and below is parsed according to the normal moinmoin wiki syntax. For more information about parsers in moinmoin-wiki visit http://moinmoin.wikiwikiweb.de/HelpOnParsers

To create the DSP XML a so called action extension for the moinmoin wiki has been implemented, how to retrieve the XML will be described at the end of this document.

1. Design and description of the wiki syntax

As stated in the description of Description Set Profile [[WWW][1]], it uses the notion of constraint and templates to describe the structure of a Description Set. There are two levels of templates in the DSP:

These templates furthermore consist of constraints that are used to limit the structure. The relations between the templates and the constraints are depicted in the figure 1 below

http://dublincore.org/architecturewiki/DescriptionSetProfile?action=AttachFile&do=get&target=dsp-uml.png
Figure 1

The hierarchical structure of the DSP is reused in the syntax in such a way that when a template or constraint has been declared it is a part of the first declared template above that it can be a part of according to the hierarchy (shown in figure 1). Ie if first a Description Template has been declared followed by a Statement Template, this Statement Template is seen as a part of that Description Template.

In the syntax 4 parts are possible to express on their own:

Before describing the syntax in more detail, below is an empty template to serve as an example of how the structure looks like:

In between each expressed Description Template (DT), Statement Template (ST), NonLiteral Constraint (NLC) and Literal Constraint (LC) the normal moinmoin wiki-syntax can be used.

Some small remarks on the usage of symbols in general in the format, when something in the format can have one and only one value it is placed between citation marks, as an example, see identifier for Description Template below. If the a set of choices is to be expressed the curly brackets are used in most places.

1.1. Expressing the different parts of a DSP

As previously stated and seen in the template above the 4 basic parts are expressed with:

Each one of these expression has to start on a new line. As can also be seen from the template above it is possible to express normal wiki-syntax in between. This text does also need to start on a new line in order to not be mix up with the DSP wiki-syntax, this text is surrounding the parts of a DSP in the resulting HTML, but will be ignored when creating the XML for the DSP. This means that the HTML that is created for example an ST can be embedded into a table or some similar HTML construct. If the keywords DT, ST, NLC or LC needs to start on an new line in the normal wikisyntax, add a backslash ("\") before and the backslash will be ignored in the resulting HTML.

1.1.1. Expressing a Description Template
Start a new line with "DT" followed by "=" and a starting left parenthesis and in order to close the declaration a right parenthesis is needed. The expression inside the parenthesis is allowed to span over more than one line. Expressed inside the parenthesis are the attributes:

For a more detailed description about these attributes see the section about Description Template in the description of DSP [[WWW][DT ]]. Here conditions for the attributes and possible and default values are described in more detail.

The attributes of a Description Template can be declared inside the parenthesis in any order with blankspace as separator. If none of them are declared the parenthesis should be left empty. The Statment Templates that belong to a Description Template are the ones that are declared under until a new declaration of a Description Template occurrs.

Example of a declaration of a Description Template:
DT=(ID="Personstandalone="yes" RC=[http://www.anyuri.net/someResourceConstraint, http://www.anyuri.net/someOtherResourceConstraint] min="1" max="1")
1.1.2. Expressing a Statement Template
A Statement Template is expressed in a similar way to the Description Template, starting on a new line with "ST=" followed by a left parenthesis and then closed by a right parenthesis. The expression inside the parenthesis is allowed to span over more than one line and the attributes inside are separated with a blankspace and is allowed to be in any order. Expressed inside the parenthesis are the attributes:

For a more detailed description about these attributes see the section about Statement Template in the description of the DSP [[WWW][ST]], where conditions for the attributes and possible and default values are described in more detail.

Example of the parts described above:
ST=(min="1" max="10" PC="http://purl.org/dc/elements/1.1/creatortype="literal")

A Statement Template can be of either the type Literal Statement Template and have a Literal Value Constraint or of the type Non-literal Statement Template and have a Non-literal Value Constraint. These constraints correspond to the Literal value surrogates and Non-literal value surrogates respectively in the [[WWW]Dublin Core Abstract Model]. To express constraints on a Statement Template they will be declared under the Statement Template that they belong to and they also need to start on a new line.

1.1.2.1. Expressing a literal value constraint
When a Statement Template has got the type constraint set to Literal it is possible to further constrain the possible values, by declaring a Literal Value Constraint. To express this constraint the keyword "LC" followed by a "=" and a left parenthesis is used, at the end a right parenthesis is used to close the expression. The declaration of a Literal value constraint have to start on a new line. Inside the parenthesis the following parts can be expressed:

For a more detailed description about the attributes for Literal Value Constraints see the section about this in the description of the DSP [[WWW][LC]], where conditions on the attributes and possible and default values are described in more detail.

Example 1, how to express an LC:
 LC=( {[value="A typical stringlang="en"]}) 
Example 2, how to express an LC with languageConstraint:
LC=( LangC=(occurrence="optional" {ensv, es})) 
1.1.2.2. Expressing a non-literal Value Constraint
When an Statement Template has got the type constraint set to NonLiteral it is possible to further constrain the possible values. To declare this constraint start on a new line and use the keyword "NLC" followed by a "=" and a left parenthesis, at the end of the NLC a right parenthesis is used to close the expression. The expression is allowed to span over more than one line. Inside the parenthesis the following parts can be expressed:

For a more detailed description about the attributes for Non-Literal Value Constraints see the section about this in the description of the DSP [[WWW][NLC]], where conditions on the attributes and possible and default values are described in more detail.

Example 1, how to declare an NLC:
 NLC=(description="ref" {http://www.example.com/exampleURI1}) 
Example 2 of an NLC with ValueURIConstraint:
 NLC=(description="ref" VURIConstraint=( occurrence="mandatory" {http://www.example.com/uri1, http://www.example.com/uri2})) 
Example 3 of an NLC with VESConstraint:
 NLC=(description="ref" VESConstraint=( occurrence="mandatory" {http://www.example.com/uri3, http://www.example.com/uri4})) 
Example 4 of an NLC with ValueStringConstraint:
 NLC=(description="ref" VStringConstraint=(min="1" max="1" 
 {[value="someFormat:Format2lang="en" SES="http://www.example.org/someSyntaxEncodingScheme"]})) 
1.1.3. Examples
The DC-XML example in the Description Set Profile, [WWW]DC example and [WWW]FOAF Example, in wiki-format:

DC Example:

{{{#!DSP 

DT=()

ST=(PC={http://purl.org/dc/terms/title})

ST=(PC={http://purl.org/dc/terms/description})

}} } 

FOAF Example:

{{{#!DSP

DT=( ID="Person" RC=[http://xmlns.com/foaf/0.1/Personmin=1 max=1 )

ST=( min=1 max=1 type="literal" PC={http://xmlns.com/foaf/0.1/name} ) 

ST=( type="literal" PC={http://xmlns.com/foaf/0.1/knows} )

NLC=({http://xmlns.com/foaf/0.1/Person})

}} }

2. Usage example

The implementation of this syntax has been done as an extension to the the moinmoin wiki engine. Below follows an example and it will show how the syntax will be rendered in HTML and also how the resulting XML looks like.

2.1. Example of the syntax

With the extension to the moinmoin wiki engine installed the syntax described in this document can be used on a page. It will be parsed as a Description Set Profile, below is an example:
 {{{#!DSP
 == Description template ==
 DT=(min="1" max="1" standalone="yes")

 === Title ===
 ----
 ST=(type="literal" PC={http://purl.org/dc/terms/title})
 || Definition || A name given to the resource. ||
 LC=(LangC=(occurrence="optional") SESConstraint=(occurrence="disallowed") )

 === Creator ===
 ----
 ST=(type="nonliteral" PC={http://purl.org/dc/terms/creator})
 || Definition || An entity primarily responsible for making the resource. ||
 || Comment || Examples of a Creator include a person, an organization, or a service. 
 Typically, the name of a Creator should be used to indicate the entity. ||
 NLC=( VURIConstraint=( occurrence="disallowed") VESConstraint=( occurrence="disallowed" ) VStringConstraint=(max="1" 
 LangC=(occurrence="optional") SESConstraint=(occurrence="disallowed") ) )
 }} }
2.1.1. The resulting HTML:
The example of the syntax above will render [WWW]this HTML-page
2.1.2. The resulting XML
From the wiki-syntax an action-extension has been implemented in order to create XML from the DSP wiki syntax. The XML for a DSP can be retrieved by adding "?action=DSP2XML" at the end of the URL of the page that contains a DSP, for the example the URI is http://dublincore.org/architecturewiki/DSPUsageExample?action=DSP2XML . Below is the XML that will be retrieved from the example:
 <DescriptionSetTemplate>

   <DescriptionTemplate maxOccur="1" minOccur="1">

     <StatementTemplate type="literal">
       <Property>http://purl.org/dc/terms/title</Property>

       <LiteralConstraint>
         <SyntaxEncodingSchemeOccurrence>"disallowed"</SyntaxEncodingSchemeOccurrence>
         <LanguageOccurrence>"optional"</LanguageOccurrence>
       </LiteralConstraint>

     </StatementTemplate>

     <StatementTemplate type="nonliteral">
       <Property>http://purl.org/dc/terms/creator</Property>

       <NonliteralConstraint>
         <ValueURIOccurrence>disallowed</ValueURIOccurrence>
         <VocabularyEncodingSchemeOccurrence>disallowed</VocabularyEncodingSchemeOccurrence>
         <ValueStringConstraint maxOccur="1">
           <SyntaxEncodingSchemeOccurrence>"disallowed"</SyntaxEncodingSchemeOccurrence>
           <LanguageOccurrence>"optional"</LanguageOccurrence>
         </ValueStringConstraint>
       </NonliteralConstraint>

     </StatementTemplate>

   </DescriptionTemplate maxOccur="1" minOccur="1">

 </DescriptionSetTemplate>