Portable Site Information
The Specification

Copyright 1999 L. C. Rees
I. Vocabulary

1.1.1. psi
1.2.1. group
1.3.1. global
1.4.1. meme
1.5.1. name
1.6.1. contact
1.7.1. note
1.8.1. keyword
1.9.1. filter
1.10.1. if
1.11.1. then
1.12.1. time
1.13.1. space
1.14.1. event
1.15.1. set
1.16.1. data
1.17.1. insert
1.18.1. local
II. Document Type Definition

I. Vocabulary

1.1.1. psi
The root PSI element.

1.1.2. psi attribute: version
Lists the PSI version.

1.1.3. version value: 0.32
The current PSI version.

1.1.4. Example:

<psi version="0.32"></psi>

1.2.1. group
A large container.

1.2.2. Child of: psi, group

1.2.3. group attribute: class
Groups elements out of hierarchical order.

1.2.4. group attribute: order
Controls the precedence of elements sharing the same hierarchical level.

1.2.5. order value: none
This element has no order.

1.2.6. order value: root
This element always comes first.

1.2.7. order value: seq
This element is preceded by the element listed in front of it.

1.2.8. order value: par
This element is equal in precedence to the element listed in front of it.

1.2.9. order value: alt
This element is an alternative to the element in front of it.

1.2.10 group attribute: id
A unique identifier for this element.

1.2.12. Example:

<group id="images"></group>

1.3.1. global
A container for content shared across a group.

1.3.2. Child of: group

1.3.3. global attribute: class
See 1.2.3.

1.3.4. Example:

<global class="netscape"></global>

1.4.1. meme
Basic information about content.

1.4.2. Child of: global, set, local

1.4.3. name attribute: class
See 1.2.3.

1.4.5. meme attribute: copyright
The content's copyright holder.

1.4.6. meme attribute: at
The year the copyright was granted.

1.4.7 Example:

<meme copyright="Bob Johnson" at="1999"></meme>

1.5.1. name
The main display name for a section of content.

1.5.2. Child of: meme

1.5.3. name attribute: class
See 1.2.3

1.5.4. name attribute: order
See 1.2.4

1.5.5. Example:

<name>Bob</name>

1.6.1. contact
Where a user associated with a section of content can be reached.

1.6.2. Child of: meme

1.6.3. contact attribute: class
See 1.2.3.

1.6.4. Example:

<contact>bob@site.com</contact>

1.7.1. note
A body of text.

1.7.2. Child of: meme, filter

1.7.3. note attribute: class
See 1.2.3.

1.7.4. Example:

<note>Completed today.</note>

1.8.1. keyword
A word related to content that helps locate it in searches.

1.8.2. keyword attribute: class
See 1.2.3.

1.8.3. Example:

<keyword class="admin">site</keyword>

1.9.1. filter
Controls special processing of PSI elements.

1.9.2. Child of: global, set, local

1.9.3. filter attribute: class
See 1.2.3.

1.9.4. filter attribute: order
See 1.2.4.

1.9.5. filter attribute: id
See 1.2.9.

1.9.6. filter attribute: role
Controls a filter's direction.

1.9.7. role value: in
The filter applies to elements being brought in to an application.

1.9.8. role value: out
The filter applies to elements being exported from an application.

1.9.9. filter attribute: resolve
Controls what happens after a filter is done processing.

1.9.10. role value: pass
Processing should continue using the next filter in order.

1.9.11. role value: end
Processing should stop with this filter.

1.9.12. filter attribute: chain
Passes to the next filter in order referenced by a specific id or class.

1.9.13. filter attribute: force
Controls if a filter is forcibly applied or not.

1.9.14. force value: yes
The filter should be forcibly applied.

1.9.15. force value: no
The filter should not be forcibly applied.

1.9.16. Example:

<filter id="js2" role="in" resolve="pass" force="no"></filter>

1.10.1. Element: if
Sets the criteria used to decide if a filter should be applied.

1.10.2. Child of: filter

1.10.3. if attribute: class
See 1.2.3.

1.10.4. if attribute: role
What predefined test, if any, should be used.

1.10.5 role value: none
No predefined test should be used.

1.10.6. role value: mime
The mime type should be the test.

1.10.7. role value: agent
The user agent should be the test.

1.10.8. role value: os
The operating system should be the test.

1.10.9. role value: memory
The amount of memory should be the test.

1.10.10. role value: cpu
The speed of the CPU should be the test.

1.10.11. role value: bitrate
The amount of bandwidth should be the test.

1.10.12. role value: screensize
The size of the screen should be the test.

1.10.13. role value: screendepth
The color depth of the screen should be the test.

1.10.14. role value: lang
The language should be the test.

1.10.15. then attribute: classid
The test is a class.

1.10.16. if attribute: usertest
A user-defined test should be used.

1.10.17. if attribute: value
The value to be tested for.

1.10.18. Example:

<if role="mime" value="html 4.0"/>

1.11.1. then
Controls what happens if a filter's test is met.

1.11.2. Child of: filter

1.11.3. then attribute: class
See 1.2.3.

1.11.4. then attribute: role
Sets if the filter allows, drops, or maps according to the filter test.

1.11.5. role attribute: use
Processing uses the target of a filter.

1.11.6. role attribute: drop
Processing drops the target of the filter

1.11.7. role attribute: map
Processing maps the target of the filter onto another value.

1.11.8. then attribute: idref
The target is a specific element referred to by its unique id.

1.11.9. then attribute: useref
The target is user defined.

1.11.10. then attribute: value
The value a target is mapped onto.

1.11.11. Example:

<then idref="html" role="map" value="htm"/>

1.12.1. time
Controls a container's place in time.

1.12.2. Child of: global, set, local

1.12.3. time attribute: class
See 1.2.3.

1.12.4. time attribute: unit
The unit of time used by a container.

1.12.5. unit value: month
The container's time is in months.

1.12.6. unit value: week
The container's time is in weeks.

1.12.7. unit value: day
The container's time is in days.

1.12.8. unit value: hour
The container's time is in hours.

1.12.9. unit value: minute
The container's time is in minutes.

1.12.10. unit value: sec
The container's time is in seconds.

1.12.11. unit value: millisec
The container's time is in a milliseconds.

1.12.12. time attribute: length
The length of time this container uses.

1.12.13. time attribute: start
The container's start time.

1.12.14. time attribute: end
The container's end time.

1.12.15. time attribute: repeat
How many times this container repeats in time.

1.12.16. time attribute: finish
What happens to the container when time is up.

1.12.17. finish value: loop
The container loops forever.

1.12.18. finish value: remove
The container is removed.

1.12.19. finish value: hold
The container stops and holds its position.

1.12.20. time attribute: delay
The amount of time passing between this container and the one after it.

1.12.21. Example:

<time unit="sec" length="1" finish="remove" delay="6"/>

1.13.1. Element: space
Controls a container's position in space.

1.13.2. Child of: global, set, local

1.13.3. space attribute: class
See 1.2.3.

1.13.4. space attribute: role
What type of space the container uses.

1.13.5. role value: root
The container encompasses everything.

1.13.6. role value: column
The container is a column.

1.13.7. role value: row
The container is a row.

1.13.8. role value: inline
The container is inside a bigger container.

1.13.9. space attribute: unit
The measurement of space the container uses.

1.13.10. unit value: pixel
Container size is in pixels.

1.13.11. unit value: point
>Container size is in points.

1.13.12. unit value: percent
Container size is a percentage.

1.13.13. space attribute: width
The width of a container.

1.13.14. space attribute: height
The height of a container.

1.13.15. space attribute: margin
Sets values for the margin around a container. Order is global, left, right, top, and bottom if up to four numbers are added.

1.13.16. space attribute: halign
Sets the container's horizontal alignment.

1.13.17. halign value: left
The horizontal alignment is left.

1.13.18. halign value: center
The horizontal alignment is centered.

1.13.19. halign value: right
The horizontal alignment is right.

1.13.20. space attribute: valign
Sets the container's vertical alignment.

1.13.21. valign value: top
The vertical alignment is at the top.

1.13.22. valign value: center
The vertical alignment is centered.

1.13.23. valign value: bottom
The vertical alignment is at the bottom.

1.13.24. Example:

<space role="column" unit="pixel" height="6" width="6"/>

1.14.1. Element: event
Controls what event surrounds a container.

1.14.2. Child of: global, set, local

1.14.3. event attribute: role
Controls what kind of event is used with a container.

1.14.4. role value: none
No event is associated with a container.

1.14.5. role value: click
The event is a single mouse click.

1.14.6. role value: dclick
The event is a double mouse click.

1.14.7. role value: mousedown
The event is a mouse button pushed down.

1.14.8. role value: mouseup
The event is a mouse button released.

1.14.9. role value: mouseover
The event is a mouse cursor over a container's area.

1.14.10. role value: mousemove
The event is a cursor moving within an contaner's area.

1.14.11. role value: mouseout
The event is a cursor leaving a container's area.

1.14.12. role value: keypress
The event is a key being pressed.

1.14.13. role value: keydown
The event is a key kept down.

1.14.14. role value: keyup
The event is a key released.

1.14.15. event attribute: value
The value an event matches.

1.14.16. event attribute: go
The container triggered by an event.

1.14.17. Example:

<event role="mouseover" go="top_main"/>

1.15.1. set
A small container.

1.15.2. Child of: global, set, local

1.15.3. set attribute: class
See 1.2.3.

1.15.4. set attribute: order
See 1.2.4.

1.15.5. set attribute: id
See 1.2.9.

1.15.7. set attribute: insert
The global insert this set uses.

1.15.8. Example:

<set id="home" insert="main"></set>

1.16.1. data
Actual real life content.

1.16.2. Child of: set

1.16.3. data attribute: class
See 1.2.3.

1.16.4. data attribute: order
See 1.2.4.

1.16.5. data attribute: xml:space
Controls if whitespace is significant within data.

1.16.6. xml:space value: default
Whitespace is ignored.

1.16.7. xml:space value: preserve
Whitespace is preserved.

1.16.8. Example:

<data src="link">http://www.site.com/1.html</data>

1.17.1. insert
Enables sets to be shared globally or locally.

1.17.2. Child of: global, local

1.17.3. insert attribute: class
See 1.2.3.

1.17.4. insert attribute: order
See 1.2.4.

1.17.5. insert attribute: filter
See 1.2.10

1.17.6. insert attribute: global
Creates a shared insert point (many to one).

1.17.7. insert attribute: local
Inserts a set directly (one to one).

1.17.8. insert attribute: children
Controls if a set's child sets are included.

1.17.9. children value: yes
A set's children are included.

1.17.10. children value: no
A set's children are excluded.

1.17.11. Example:

<insert global="top" child="no"/>

1.18.1. local
A container containing unique data.

1.18.2. Child of: group

1.18.3. local attribute: class
See 1.2.3.

1.18.4. local attribute: order
See 1.2.4.

1.18.5. local attribute: id
See 1.2.9.

1.18.6. Example:

<local id="home"></local>

II. Document Type Definition.

The DTD is also available for download here.

<?xml version="1.0" encoding="UTF-8"?>

<!-- 
Portable Site Information version 0.32
Created by L. C. Rees - 8.10.99

Copyright (c) 1999 by L. C. Rees.

Permission to use, copy, modify, and distribute this DTD for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THIS DTD IS PROVIDED "AS IS" AND L. C. REES DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS DTD INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL L. C. REES BE LIABLE
FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS DTD. 
-->

<!ELEMENT psi (group*)>

<!ATTLIST psi
	version	CDATA #FIXED "0.32"
        xmlns CDATA #FIXED "http://psilib.sourceforge.net/psilite.dtd">

<!ELEMENT group (global?, group*, local*)>

<!ATTLIST group 
	class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	id ID #IMPLIED>

<!ELEMENT global (meme*, filter*, time?, space?, event?, (set | insert)*)>

<!ATTLIST global
	class IDREF #IMPLIED>
	
<!ELEMENT meme (name*, contact*, note*, keyword*)>

<!ATTLIST meme
	class IDREF #IMPLIED
	copyright CDATA #IMPLIED
	at CDATA #IMPLIED>
	
<!ELEMENT name (#PCDATA)>

<!ATTLIST name 
	class IDREF #IMPLIED>

<!ELEMENT contact (#PCDATA)>

<!ATTLIST contact
	class IDREF #IMPLIED>

<!ELEMENT note (#PCDATA)>
	
<!ATTLIST note
	class IDREF #IMPLIED
	at CDATA #IMPLIED>

<!ELEMENT keyword (#PCDATA)>
	
<!ATTLIST keyword
	class IDREF #IMPLIED>

<!ELEMENT filter (note*, if, then)>

<!ATTLIST filter
	class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	id ID #IMPLIED
	role (in | out) "in"
	resolve	(pass | end) "end"
	chain IDREF #IMPLIED
	force (yes | no) "no">

<!ELEMENT if EMPTY>

<!ATTLIST if
	class IDREF #IMPLIED
	role (none | mime | agent | os | memory | cpu | bitrate | screensize |
              screendepth | lang) "none"
	classid	ID #IMPLIED
        usertest CDATA #IMPLIED
	value CDATA #IMPLIED>

<!ELEMENT then EMPTY>

<!ATTLIST then
	class IDREF #IMPLIED
	role (use | drop | map) "use"
	idref IDREF #IMPLIED
        useref CDATA #IMPLIED
	value CDATA #IMPLIED>

<!ELEMENT time EMPTY>

<!ATTLIST time
	class IDREF #IMPLIED
	unit (month | week | day | hour | minute | sec | millisec) "second"
	length NMTOKEN #IMPLIED	
	start CDATA #IMPLIED
	end CDATA #IMPLIED
	repeat	NMTOKEN	#IMPLIED
s	finish (loop | remove | hold) "hold"
	delay NMTOKEN #IMPLIED>

<!ELEMENT space EMPTY>

<!ATTLIST space
	class IDREF #IMPLIED
	role (root | column | row | inline) "root"
	unit (pixel | point | percent) "pixel"
	width NMTOKEN	#IMPLIED
	height NMTOKEN	#IMPLIED
	halign (left | center | right) "left"
	valign (top | center | bottom) "top"
        margin NMTOKENS #IMPLIED>
		
<!ELEMENT event EMPTY>

<!ATTLIST event
	class IDREF #IMPLIED
	role (none | click | dclick | mousedown | mouseup | mouseover |
              mousemove | mouseout | keypress | keydown | keyup) "none"
	value CDATA #IMPLIED
	go IDREF #IMPLIED>

<!ELEMENT set (meme*, filter*, time?, space?, event?, (set | insert)*, data*)>

<!ATTLIST set
	class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	id ID #IMPLIED
	insert IDREF #IMPLIED>

<!ELEMENT data ANY>

<!ATTLIST data
	class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	xml:space (default | preserve) "preserve">

<!ELEMENT insert EMPTY>

<!ATTLIST insert
        class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	global ID #IMPLIED
	local IDREF #IMPLIED
	children (yes | no) "yes">

<!ELEMENT local (meme*, filter*, time?, space?, event?, (set | insert)*)>

<!;ATTLIST local
        class IDREF #IMPLIED
	order (none | root | seq | par | alt) "seq"
	id ID #IMPLIED>

Copyright 1999 L. C. Rees.
.