LayManSys Specification: Layout Definitions in RDF-Files
This namespace contains elements for including layout information in LayManSys RDF files.
XML Namespace Information
- XML Namespace
xmlns:layout="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
.
text/xml
- It is planned that LayManSys also supports XML-based configuration files that use the following elements.
layout
This tag is the root element for a XML-based layout configuration. It enclosures all other layout tags in the RDF files:
<!-- 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 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:
- The URI path (a string) of the section the current document 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 whole navigations HTML code.