LayManSys Namespaces and Elements

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.

Abstract

This section describes all XML namespaces and the elements they contain. These tags are used for LayManSys in the RDF files.


Table of Contents

LayManSys Spezification: Dublin Core Meta Data in RDF-Files
XML Namespace Information
Elements
LayManSys Specification: CSS-Tags in RDF-Files
XML Namespace Information
Elements
LayManSys Spezification: JS-Tags in RDF-Files
XML Namespace Information
Elements
LayManSys Specification: Layout Definitions in RDF-Files
XML Namespace Information
Elements
LayManSys Specification: Relational Links in RDF-Files
XML Namespace Information
Elements

LayManSys Spezification: Dublin Core Meta Data in RDF-Files

Abstract

The elements in this namespace are used to include meta data about the web document as well as the entire website. Most of this elements are required for generating the HTML header.

XML Namespace Information

XML Namespace URI

http://purl.org/metadata/dublin_core#

Preferred Namespace Prefix

dc

Elements

All elements listed here have no attributes, they only contain character data between the opening and closing tag, except Subject which contains an rdf:Bag of rdf:li items. Some elements may be specfied in the global etc/laymansys.rdf file so that they are valid for every document. They still can be overwritten on a per-document base using the (local) documents RDF file.

All elements are required to be either in the global or in the documents RDF file, except the ones noted specially.

For more information about the elements, see the DCMI Metadata Terms and the examples in the RDF/XML Syntax Specification.

Date

This is the date when the document has been last modified. It has to be in a common Date and Time Format.

Description

The description is a very important part of each documents RDF file because it describes briefly the document contents. It should be only a few sentences, so you do not need to give the complete abstract here.

Format

This is the documents MIME type, which will be sent as HTTP Content-Type header. In most cases you will use something like

text/html

or

application/xhtml+xml

Language

This is the documents language in a format conforming to the RFCs 1766 and 3066, e.g.

de-DE

or

en-US

Publisher

This element contains all publishers of the document, so in most cases your name will be here, too.

Rights

This is the copyright statement for document. Although it is not used in the HTML header, the default implementation of writeFooter uses it.

accessRights

This element was introduced in release 0.5 and is used for access control. LayManSys recognizes the following values:

public

means public access, no restriction. This value is translated into a HTML meta tag allowing full robots inclusion.

all

alias of public

noindex

This value restricts robots access in a way, that robots do not index the document.

nofollow

This value restricts robots access in a way, that robots do not follow any links.

internal

This value is used for restricting access to the document in a user-defined way; for checking the access rights you have to provide a function validateAccessRights(). This function may use cookies or HTTP Basic Authentification or what else you like. If access control is based on .htaccess you can leave this value or provide a stub function. It gets $meta as parameter, but it is useful to accept it by reference. The formal definition of validateAccessRights follows:

void validateAccessRights(&$meta); 
array  &$meta;

The values (using $accessRights as placeholder) used for restricting robots access to the document produce the following pseudo XHTML in the output:

<meta name="robots" content="$accessRights" />

See DCMI Government Working Group – Proposal: Access Rights qualifier for Rights element for more information about the semantics of <dc:accessRights>.

Subject

A documents subject is treated as a bag of keywords.

Title

This is also very important, it is the documents title.

Type

The documents type will be most likely

World Wide Web Home Page

LayManSys Specification: CSS-Tags in RDF-Files

Abstract

The elements in this namespace are used to include CSS files into your HTML content.

XML Namespace Information

XML Namespace URI

http://laymansys.sf.net/rdf/css

Preferred Namespace Prefix

css

Elements

file

Use this element to reference style files that are included using XHTMLs link tag. There are the following attributes:

href

This is the files path, either relative or absolute to the webservers document root.

title

Style files may be given a descriptive title. (Some webbrowsers let the user choose a style by selecting it by this name.)

media

This is the CSS output media the style file is designed for.

content

Style files referenced by this tag are printed in the documents head using the XHTML tag style. This element accepts this attribute:

src

This is the files path, either relative or an absolute file-system path.

LayManSys Spezification: JS-Tags in RDF-Files

Abstract

The elements in this namespace are used to include JavaScript files into your HTML content.

XML Namespace Information

XML Namespace URI

http://laymansys.sf.net/rdf/js

Preferred Namespace Prefix

js

Elements

The syntax and meaning of this elements is very similar to the ones used for CSS elements. The only difference is, that not all attributes are supported.

file

href

references files

content

src

references code

LayManSys Specification: Layout Definitions in RDF-Files

Abstract

This namespace contains elements for including layout information in LayManSys RDF files.

XML Namespace Information

XML Namespace URI

http://laymansys.sf.net/rdf/layout

Preferred Namespace Prefix

layout

Elements

definition

This is a stand-alone (empty) tag for including a so-called layout.cfg file. Use this attributes:

src

Specifies the config files path. It can either be relative or absolute to the constant value DIR . '../'; the constant DIR points to the document root, so it is absolute to the web projects directory.

type

LayManSys uses MIME types to determine how to handle the configuration files:

text/plain-ini

This tells LayManSys that the layout configuration is in the popular INI format as it can be read using the PHP function parse_ini_file. See the ??? File Format Specification for details about this kind of files.

text/xml

With LayManSys 0.3.0 you can also use XML bases configuration files. This files contain the same XML tags as described below for RDF files.

layout

This tag is the root element for a XML-based layout configuration. It enclosures all other layout tags in the RDF files. The formal XML Schema Definition file can be found in the Appendix ???.

	<!-- somewhere in the RDF file: -->
	<layout xmlns="http://laymansys.sf.net/rdf/layout">
		<!-- put here the layout tags -->
	</layout>

There is only one attribute:

name

an optional name for the layout

Remark

The following elements can be used as stand-alone tags, referencing the files using href respective src attributes. But the file paths can also be the tags node value.

favicon

This tags purpose is including a so-called "favicon" that most browsers display in the address bar. It has the following attributes:

href

This is the URI path to the icon file.

type

This is icons MIME type. Common icon types are

image/x-icon

or

image/png

style

This element references (and not includes) a Style Sheet file of any type and for any utput media, unlike the elements for css content. The tag accepts this attributes:

href

This is the style files URI path.

type

The style sheets MIME type, e.g.

text/css
media

A certain output medium the style sheet is designed for, e.g.

screen
title

This is the files optional title. Some browsers use it for letting the user choose a certain one.

charset

Your style sheets may be in a different character set than your web documents. Use this attribute to specify an explicit charset like

UTF-8

or

ISO-8859-1

nav

LayManSys supports the inclusion of a navigation module using this tag. It requires the following attributes:

src

This is the modules path, either relative or absolute to the constant DIR . '../'.

type

The modules MIME type can be one of these:

text/html

This tells LayManSys that the navigation module is a "plain" HTML that can be passed through (using readfile).

application/x-httpd-php

This type specifies a PHP module that is included (using include). The module has to define a function named getNavigation, accepting two, optional three arguments:

  1. The URI path (a string) of the section the current document – this term stands for the web document calling LayManSys – belongs to (as specified by the first link:section).

  2. The documents encoding as string value.

  3. A (optional) reference to the $meta objects array with the documents related links.

This function may either write the navigation directly, but than has to return a printable value (this can also be ''), or return the navigations whole HTML code.

position

Using this (new) attribute you can tell LayManSys where to place the documents navigation. This setting deprecates the .NavFirst. entry in the laymansys/config.php file. There are the following positions available:

first-of-all

LayManSys places the navigation directly on top of the documents <body>.

after-heading

The navigation will be put directly after the documents heading, <h1 id="top">. To be backwards compatible, this is the default value for position.

in-front-of-foot

With this setting, the navigation will appear directly in front of the documents footer (in the HTML code, you can position it anywhere else using CSS).

last

Using this argument, the navigation will be the last element inside the documents <body>.

user-defined

Use this value, if you want the navigation to appear at another place inside the HTML code. LayManSys does not put out any code for navigation, it is your task.

LayManSys Specification: Relational Links in RDF-Files

Abstract

The W3C (World Wide Web Consortium) hosts some useful information about HTMLs link tag and its "types".

XML Namespace Information

XML Namespace URI

http://laymansys.sf.net/rdf/link

Preferred Namespace Prefix

link

Elements

There is not a certain set of tags you are only allowed to use. Instead, LayManSys' RDF-Parser accepts every element in this namespace. The following list shows some commonly used link types:

contents

points to the Table of Contents

section

links the sections TOC

appendix

copyright

presents a link to the copyright information and/or your imprint

If you have a LayManSys RDF-File entry like this,

Example 1. link:section entry in a RDF file

<link:section link:title="LayManSys Documentation">/doc/</link:section>


LayManSys transforms that into this XHTML code:

Example 2. link:section transformed into XHTML

<link rel="section" title="LayManSys Documentation" href="/doc/" />


Special Elements

Unlike the elements above, this tags (mainly used for hypertext guided tours) stand for reverted link that point back to something. So the XHTML link LayManSys creates contains the rev attribute instead of rel.

prev

points the the previos page

start

references the tours start