File Formats

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 file formats used by the LayManSys library. In case a format is XML-based, you find here either a print of DTD (Document Type Definition) or a XML Schema Definition file.


Table of Contents

def/layout.ini
def/layout.xsd

def/layout.ini

The layout.ini file format is one of two formats for layout.cfg files. It is based on the popular INI file format, using certain key, which are described in this section.

style-screen

Keys for CSS files (currently only for screen presentation):

style-screen=path/to/screen.css
style-printer

... and for printing:

style-printer=path/to/print.css

NOTE that the paths are relative to the document root. LayManSys also expects the files to be Cascading Style Sheets, other types are not supported by this kind of layout.cfg.

nav

Navigation only in HTML format, the path is relative to the document root, too:

nav=path/to/nav.html

def/layout.xsd

<xsd:schema targetNamespace="http://laymansys.sf.net/rdf/layout" elementFormDefault="qualified">
<xsd:annotation>
$Id: layout.xsd,v 1.4 2006/06/19 19:47:58 robertbienert Exp $

This file defines the LayManSys layout.xml format as described in the
documentation, chapter "LayManSys Namespaces and Elements".

Copyright © 2006 Robert Bienert, project LayManSys
http://laymansys.sourceforge.net/

For information about the simple (built-in XSD) datatypes, please refer
to "XML Schema Part 2: Datatypes",
<http://www.w3.org/TR/xmlschema-2/#built-in-datatypes>
</xsd:annotation>

<xsd:element name="layout" type="LayoutDefinition" />

<xsd:complexType name="LayoutDefinition">
	<xsd:annotation>
	<layout> is the enclosing top-level element of every
	layout.xml file. The LayoutDefinition type is not very complex,
	but not so easy to understand if you do not know XSD (XML Schema
	Definition) well, so here is a short description:

	layout ::= favicon?, style*, nav?

	This means, that a layout contains an optional favicon, may
	contain several style elements and an optional nav tag.
	</xsd:annotation>
	<xsd:sequence>
		<xsd:element name="favicon" type="FaviconFile" minOccurs="0" maxOccurs="1" />
		<xsd:element name="style" type="StyleFile" minOccurs="0" maxOccurs="unbounded" />
		<xsd:element name="nav" type="NavFile" minOccurs="0" maxOccurs="1" />
	</xsd:sequence>
	<xsd:attribute name="name" type="xsd:string">
		<xsd:annotation>
		This is an optional name for the layout.
		</xsd:annotation>
	</xsd:attribute>
</xsd:complexType>

<xsd:simpleType name="MIMEType">
	<xsd:annotation>
	This very basic type defines the syntax schema of an MIME type.
	Currently, it seems to be useful for LayManSys accepting
	only sub-types from the types "application", "image" and "text".

	The regular expression restriction this string may be a bit too
	liberal, so it should match most MIME types. If you encounter an
	error in this expression, please do not hesitate reporting it.

	The pattern commented out is even more liberal than the current
	one and allows even user-defined types which is possible, as
	RFC 2045 and 2046 tell.
	</xsd:annotation>
	<xsd:restriction base="xsd:token">
		<xsd:pattern value="(application|image|text)/[\S]+" />
		
	</xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="FaviconFile">
	<xsd:annotation>
	This type defines a favicon file using its location and type.
	The href attribute is optional, but then you have to give the
	favicon path as nodeValue. The type attribute is optional, too,
	to allow content negotiation. Otherwise, a value of
	"image/x-icon" or "image/png" would be good in most cases.
	</xsd:annotation>
	<xsd:simpleContent>
	<xsd:extension base="xsd:anyURI">
		<xsd:attribute name="href" type="xsd:anyURI" />
		<xsd:attribute name="type" type="MIMEType" />
	</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>

<xsd:complexType name="StyleFile">
	<xsd:annotation>
	This is the definition of the style tag. It is very similar to
	FaviconFile.
	
	The attributes are very similar to the ones used in HTMLs link
	tag, so provide here the same information as you would do in a
	HTML file.
	</xsd:annotation>
	<xsd:simpleContent>
	<xsd:extension base="xsd:anyURI">
		<xsd:attribute name="href" type="xsd:anyURI" />
		<xsd:attribute name="type" type="MIMEType" use="required" />
		<xsd:attribute name="media" type="xsd:string" />
		<xsd:attribute name="title" type="xsd:string" />
		<xsd:attribute name="charset" type="xsd:string" />
	</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>

<xsd:complexType name="NavFile">
	<xsd:annotation>
	This type defines the nav tag. The src attribute refers to a
	local file for processing as navigation. Its MIME type is given
	by the type attribute. Position tells LayManSys where to place
	the navigation.
	</xsd:annotation>
	<xsd:simpleContent>
	<xsd:extension base="xsd:anyURI">
		<xsd:attribute name="src" type="xsd:anyURI" />
		<xsd:attribute name="type" type="NavTypes" use="required" />
		<xsd:attribute name="position" type="NavPositions" default="after-heading" />
	</xsd:extension>
	</xsd:simpleContent>
</xsd:complexType>

<xsd:simpleType name="NavTypes">
	<xsd:annotation>
	This type contains all valid values for the nav elements type
	attribute, see the section "Layout Definitions" for details.
	</xsd:annotation>
	<xsd:restriction base="MIMEType">
		<xsd:enumeration value="text/html" />
		<xsd:enumeration value="application/x-httpd-php" />
	</xsd:restriction>
</xsd:simpleType>

<xsd:simpleType name="NavPositions">
	<xsd:annotation>
	This type contains all valid values LayManSys recognizes for
	positioning the documents navigation.
	</xsd:annotation>
	<xsd:restriction base="xsd:token">
		<xsd:enumeration value="first-of-all" />
		<xsd:enumeration value="after-heading" />
		<xsd:enumeration value="in-front-of-foot" />
		<xsd:enumeration value="last" />
		<xsd:enumeration value="user-defined" />
	</xsd:restriction>
</xsd:simpleType>

</xsd:schema>