|
File Format DescriptionThis page describes the input format. The tutorial describes the most important features in detail while this file describes all features in short form. If you know XML/XSL and the problems of maintaining a website you can start here ;-) We write elements in XML as <element> and attributes of elements as [attribute]. If not otherwise stated an attribute is mandatory. Elements contain only other elements described here, no text or further elements are processed (unless they conflict with defined elements they won't produce problems but if you want to extend the format in a general way it might be better if you check with us so we don't do the same work or have two solutions for one problem or produce conflicts). And the file format is still in work. The website file consists of two main parts:
Here are the descriptions of the elements and attributes: <website>(root element) The root element has the following attributes:
<structure>(in <website>) This part of the website file defines the input and output files, but not how they will be processed. The processing part is separated to make the management of the site easier. For example you can use different <structure>s with the same <layout>. Or you use different <layout>s with the same <structure> to test layouts or create different versions of your site for different browsers -- from DHTML to WML. A <structure> has no attributes. <section>(in <structure>, <section> or <directory>) A <section> can be used for two purposes: using/creating subdirectories and/or for splitting the navigation in separate parts. The attributes are:
The <structure> has typically one section, each section can have multiple subsections. XWeb can handle deeply nested structures but your stylesheets will get more complicated ;-) <directory>(in <structure>, <section> or <directory>) Works the same as a section but has no name and is not used for navigation. <entry>(in <structure>, <section> or <directory>) This is the element defining a page. It defines the name, input and output for a single page in the website. Attributes are:
<homepage>(in <structure>, <section>) The homepage of the toplevel section is typically the homepage of the site (also it doesn't have to be this way). Homepages of subsections can be used to create pages that are shown when someone clicks on the name of the section. XWeb handles a homepage like an entry (and it has the same attributes) but the XSL for the navigation can treat homepages differently. A section should have at most one homepage -- although XWeb doesn't check this yet. <file>(in <structure>, <section> or <directory>) A file is like an entry, but without name and it doesn't create a navigation entry. This can be used for files that should be processed but shouldn't appear in the website navigation. <layout>(in <website>) This part of the website file defines how the website should be processed. It has no attributes. <documentStyle>(in <layout>) This is one of the most important aspects of the file: here we tell XWeb how a page on the website should be processed, i.e. how a source file should be turned into an output file. You can use multiple layouts, they have to use different [outputDir] attributes which denote the target directory for the whole generated site with this layout. If you use the multi-layout feature you probably want to add an <index> element above the structure which will be processed as a file (with the same attributes) but above all layout directories. A <documentStyle> has exactly one of these childs: <xsl>, <copy> or <programCall> plus a free number of <image> elements -- from zero to whatever your system can handle. The only attribute [type] is used to identify the pages that should use this processing information. For each [type] you gave for the pages (<entry>, <homepage> and <file>) you have to give exactly one <documentStyle> definition with the same [type] attribute but multiple pages can share a type. The four base types are:
The most common version is of course the XSL processing but sometimes it might be useful to copy or create other files, e.g. for downloads. If one or more <image>s are given for this document style, the corresponding images will be created. The <image> elements have an attribute [type] which is used to refer to an <imageStyle> with the same [type]. <imageGroup> can be used to get an additional abstraction level, e.g. to group all buttons and other images that are created for all pages regardless of type. The attribute [name] is used to identify the group. parameter(in <xsl>) The two mandatory attributes [name] and [value] define a parameter for the stylesheet that can be used with <xsl:param>. Multiple parameters are allowed per stylesheet. <sectionStyle>(in <layout>) A section style has a similar function for a section as a document style for a document: it defines how a section should be processed. Currently only the <image> element is supported to create buttons and banners for sections. <imageStyle>(in <layout>) An <imageStyle> defines how an image should be rendered using the ImageRenderer class or by processing SVG code. It has either a list of attributes and elements which map to the options in the ImageRenderer class or it contains SVG code that is rendered using Batik. Attributes are:
The Simple RendererIf you use the simple renderer you have only limited features but since one of them is adding an image file into the background it might be enough for your needs. If you take this approach you can add the following elements into an <imageStyle>. <background>(in <image>) This defines the background of the image. Attributes are:
You can give background without [color] or [imageURL] but it will be ignored as will be an [imageMode] without [imageURL]. <text>(in <image>) The only attribute [color] defines the color of the text that should be rendered onto the background. It uses the HTML format as described for the <background> tag. All further information on the text is split into the child elements of <text>. <position>(in <text>) Defines the position of the text in the image. Attributes are:
<font>(in <text>) Defines the font to use. Available fonts are system dependend but since XWeb renders images you can use any font available on the system where the website is created. Attributes are:
If the element or the name attribute are not given, no text will be rendered. This is useful if you want to use special images for e.g. a homepage since the image URL will be available in the navigation information in the same manner as the other images with rendered text. <shadow>(in <text>) Has the attributes [color], [offsetX] and [offsetY] to render the same text with a small offset in a different color below the final text to produce shadow effects. Offset is measured from final text position. SVG RenderingInstead of using the features above you can put SVG into the <imageStyle>. The only element allowed when going this way is an <svg> that contains the SVG elements and attributes as it would be used in a standalone SVG file. The [width] and [height] attributes can only be given if they are not used on <imageStyle> -- we recommend using them on the <imageStyle> (maybe this will be enforced later). An additional attribute [xwebid] allows you to put the page or section name into your SVG code. If this attribute is given, XWeb will scan the SVG code for a <text> element with an [id] attribute matching this [xwebid]. If this is found the text in this element will be replaced with the name of the current page or section. This way the name can be placed in any text position in the SVG picture, allowing a huge number of effects to be used. <imageGroup>(in <structure>) An <imageGroup> contains a number of <image> elements. It is used to group images to a logical unit that can be refered in a document or section type definition. The [name] attribute is used as identifier. |
This project is hosted on | -- visit the project page |