Copyright © 2005 Robert Bienert
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
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.
dc
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.
This is the date when the document has been last modified. It has to be in a common Date and Time Format.
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.
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
This is the documents language in a format conforming to the RFCs 1766 and 3066, e.g.
de-DE
or
en-US
This element contains all publishers of the document, so in most cases your name will be here, too.
This is the copyright statement for document. Although it is not used in the HTML header, the default implementation of writeFooter
uses it.
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>
.
Abstract
The elements in this namespace are used to include CSS files into your HTML content.
css
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.
Abstract
The elements in this namespace are used to include JavaScript files into your HTML content.
js
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.
Abstract
This namespace contains elements for including layout information in LayManSys RDF files.
layout
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.
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
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.
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
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
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:
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
).
The documents encoding as string value.
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.
Abstract
The W3C (World Wide Web Consortium) hosts some useful information about HTMLs link
tag and its "types".
link
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/" />