|
Copyright 1999 by L. C. Rees.Table of Contents1. Purpose 1. PurposePortable Site Information (PSI) is an XML-based language that enables entire websites to be exchanged between content management tools without feature loss. Its basic structure is:
<group>
<local>
<set>
<content>content</content>
</set>
</local>
</group>
Group represents containers like databases or directories, local, unique elements like pages, set, groupings inside a unique element like paragraphs or tables, and content, actual data. A more complex example is:
<group>
<global>
<set id="index">
<content>Index</content>
</set>
<insert public="main"/>
</global>
<local>
<set insert="main">
<content>Main Content</content>
</set>
<insert direct="index"/>
</local>
</group>
Global contains features common to the group, including shared sets. Insert facilitates set sharing, either many to one or one to one. Many to one inserts are a single public insert many sets can reuse like <insert public="main"/> above. One to one inserts directly reference a set's id for a single unique insertion like <insert direct="index"/>. PSI supports security based on access control lists and inherited rights. User management for a site is also centralized under the same mechanism. Here is a acl granting public read access with no authentication:
<acl auth="no">
<right role="grant" unit="read"/>
<user id="public">
<note>Public Viewers</note>
</user>
</acl>
Version and task planning and tracking are also supported. Each task and version are tied together. A task results in a change of version and a version requires a task to change, be created, or posted. Rules for resolving conflicts can also be set. Here's a freshly changed version that resolves conflicts by reference to a parent:
<version id="new" parent="old" role="current">
<task user="bob" role="change" sched="10am" start="10:01am" due="10:15am" end="10:13am"/>
<resolve role="version" unit="parent" action="archive" value="old"/>
</version>
Metadata can also be listed. This is useful for distributing site content.
<meme copyright="bob" at="1999">
<name>All about Bob</name>
<contact>bob@bob.au</contact>
<note>All about Bob.</note>
<keyword>Bob</keyword>
</meme>
Filters can be constructed for application specific processing. Locals can be made to use certain attributes when viewed. A group can be mapped onto a feature when imported into a content management tool. The following filter maps the PSI element set to the HTML element "p" if Netscape 4 is detected as the user-agent:
<filter role="export">
<if role="agent" value="Mozilla 4.0"/>
<then classid="set" role="map" value="p"/>
</filter>
These features are dealt with in greater detail below. 2. Vocabulary2.1.1 Element: psi 2.1.2 psi attribute: version 2.1.3 version value: 0.3 2.1.4 psi attribute: xmlns 2.1.5 xmlns value: http://www.whatisxml.com/psi 2.1.6 Example: psi <psi version="0.3" xmlns="http://www.whatisxml.com/psi"></psi>
3. The PSI DTD.<?xml version="1.0" encoding="UTF-8"?>
<!--
Portable Site Information version 0.3
Created by L. C. Rees - 8.10.99 - Last modified 12.19.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.
-->
<!-- ************************************************************* -->
<!-- ************************ ENTITIES *************************** -->
<!-- ************************************************************* -->
<!ENTITY % mavfsi "meme*, acl*, version*, filter*, (set | insert)*)">
<!ENTITY % ncn "name*, contact*, note*, ">
<!ENTITY % class "class IDREF #IMPLIED">
<!ENTITY % order "order (none | root | seq | par | alt) "seq"">
<!ENTITY % id "id ID #IMPLIED">
<!ENTITY % val "value CDATA #IMPLIED">
<!ENTITY % filter "filter IDREF #IMPLIED">
<!ENTITY % color "color CDATA #IMPLIED">
<!ENTITY % at "at CDATA #IMPLIED">
<!ENTITY % cu "%class;
user IDREF #IMPLIED">
<!ENTITY % cip "%class; %id;
parent IDREF #IMPLIED">
<!ENTITY % yny "(yes | no) "yes"">
<!ENTITY % ynn "(yes | no) "no"">
<!ENTITY % coi "%class; %order; %id;">
<!ENTITY % coif "%coi; %filter;">
<!ENTITY % co "%class; %order;">
<!-- ***************************************************************** -->
<!-- *************************** ELEMENTS **************************** -->
<!-- ***************************************************************** -->
<!-- ######################## PSi ########################## -->
<!ELEMENT psi (group*)>
<!-- ####################### GROUP ######################### -->
<!ELEMENT group (global?, group*, local*)>
<!-- ####################### GLOBAL ######################## -->
<!ELEMENT global (%mavfsi;)>
<!-- ######################## MEME ######################### -->
<!ELEMENT meme (%ncn; keyword*)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT contact (#PCDATA)>
<!ELEMENT note (#PCDATA)>
<!ELEMENT keyword (#PCDATA)>
<!-- ######################## ACL ########################## -->
<!ELEMENT acl (%ncn; right+, acl*, user+)>
<!ELEMENT right EMPTY>
<!ELEMENT user (%ncn; right*)>
<!-- ###################### VERSION ######################## -->
<!ELEMENT version (note*, task, resolve*)>
<!ELEMENT task EMPTY>
<!ELEMENT resolve EMPTY>
<!-- ###################### FILTER ######################### -->
<!ELEMENT filter (note*, if, then)>
<!ELEMENT if EMPTY>
<!ELEMENT then EMPTY>
<!-- ####################### SET ########################### -->
<!ELEMENT set (%mavfsi; time?, space?, text?, content*)>
<!ELEMENT time EMPTY>
<!ELEMENT space EMPTY>
<!ELEMENT text EMPTY>
<!ELEMENT content ANY>
<!-- ##################### INSERT ########################## -->
<!ELEMENT insert EMPTY>
<!-- ##################### LOCAL ########################### -->
<!ELEMENT local (%mavfsi;)>
<!-- ****************************************************************** -->
<!-- ************************** ATTRIBUTES **************************** -->
<!-- ****************************************************************** -->
<!-- ######################## PSi ########################## -->
<!ATTLIST psi
xmlns CDATA #FIXED "http://www.whatisxml.com/psi"
version CDATA #FIXED "0.3">
<!-- ####################### GROUP ######################### -->
<!ATTLIST group %coif;
role (none | site | dir | database | table | column | object) "none">
<!-- ####################### GLOBAL ######################## -->
<!ATTLIST global %class;>
<!-- ####################### MEME ########################## -->
<!ATTLIST meme %class; %filter;
copyright CDATA #IMPLIED
%at;>
<!ATTLIST name %co;>
<!ATTLIST contact %cu;>
<!ATTLIST note %cu; %at;>
<!ATTLIST keyword %class;>
<!-- ######################## ACL ########################## -->
<!ATTLIST acl %coi;
auth %yny;
noright %ynn;>
<!ATTLIST right %class;
role (grant | deny) "deny"
unit (none | read | write | create | delete | acl | all) "all">
<!ATTLIST user %coi;
role (none | owner | delegate) "none">
<!-- ###################### VERSION ######################## -->
<!ATTLIST version %cip;
role (planned | current | archive | fork) "current">
<!ATTLIST task %cu;
role (create | change | post) "change"
sched CDATA #IMPLIED
start CDATA #IMPLIED
state (none | lock | unlock) "unlock"
due CDATA #IMPLIED
end CDATA #IMPLIED>
<!ATTLIST resolve %co;
role (version | task) "version"
unit (class | id | parent | user | role | start | state | end) "id"
action (none | overwrite | merge | fork | archive) "archive"
%val;>
<!-- ##################### FILTER ######################### -->
<!ATTLIST filter %coi;
role (in | out) "in"
resolve (pass | end) "end"
chain IDREF #IMPLIED
force %ynn;>
<!ATTLIST if %class;
role (none | mime | agent | os | memory | cpu | bitrate | screensize | screendepth | lang) "none"
suffix NMTOKENS #IMPLIED
usertest CDATA #IMPLIED
%val;>
<!ATTLIST then %cip;
classid ID #IMPLIED
role (use | map) "use"
attr NMTOKENS #IMPLIED
%val;>
<!-- ####################### SET ########################## -->
<!ATTLIST set %coif;
insert IDREF #IMPLIED>
<!ATTLIST time %class;
unit (month | week | day | hour | minute | second | millisec) "second"
length NMTOKEN #IMPLIED
start CDATA #IMPLIED
end CDATA #IMPLIED
repeat NMTOKEN #IMPLIED
finish (loop | remove | hold) "hold"
delay NMTOKEN #IMPLIED>
<!ATTLIST space %class;
role (root | column | row) "root"
unit (pixel | point | percent) "pixel"
width NMTOKEN #IMPLIED
height NMTOKEN #IMPLIED
position NMTOKENS #IMPLIED
margin NMTOKENS #IMPLIED
halign (left | center | right) "left"
valign (top | center | bottom) "top">
<!ATTLIST text %class;
role (none | bold | italic | underline | strikeout | smallcaps | pre | nowrap) "none"
font CDATA #IMPLIED
size NMTOKEN #IMPLIED
case (normal | upper | lower | capitalize) "normal"
%color;>
<!ATTLIST effect %class
role (none | click | dblclick | mousedown | mouseup | mouseover | mousemove | mouseout | keypress | keydown | keyup) "none"
%val;
go IDREF #IMPLIED
back (normal | tile | fixed | fill) "normal"
%color;
break (space | line | border) "space"
bwidth NMTOKEN #IMPLIED
bcolor CDATA #IMPLIED
list (none | ordered | unordered) "none">
<!ATTLIST content %co;
role (data | logic | style) "data"
src (link | insert) "link"
xml:space (default | preserve) "preserve">
<!-- ##################### INSERT ######################## -->
<!ATTLIST insert %co; %filter;
public ID #IMPLIED
direct IDREF #IMPLIED
child %yny;>
<!-- ##################### LOCAL ######################### -->
<!ATTLIST local %coif;>
Copyright 1999 by L. C. Rees. |
. |
| home |