XBook - Authoring Menus (xmenu.dtd)

Author: Just van den Broecke
Organization: Just Objects B.V.
Email: just@justobjects.nl

FileID: $Id: authoring-menu.xml,v 1.3 2003/01/06 10:28:08 just Exp $
Date: July 8, 2002

This document describes how to author the structure of a website using xmenu.dtd. This DTD is used internally within XBook, but you may want to use it directly for just site generation.


1. Overview

THIS ENTIRE DOCUMENT IS WORK IN PROGRESS

See an examples the test/menu directory.

Power users may immediately go to the DTD definition.

2. Full Example

This example is the file test/menu/menu.xml.

1: <?xml version="1.0"?> 2: 3: <!DOCTYPE xmenu SYSTEM "nl/justobjects/xmenu/rsc/xml/xmenu.dtd"> 4: 5: 6: <xmenu title="KeyWorx" default="mymain.html" outlineColor="white" fgColor="white" bgColor="#001E32" > 7: 8: <doc label="home" url="/" desc="Home page" target="_top"/> 9: <doc label="who-is-there ?" url="/explorer.jsp?cmd=spaces" desc="View all agents in all spaces"/> 10: 11: <folder label="server" desc="Server management"> 12: <doc label="applog" url="servermon.jsp?cmd=log&amp;sub=applog" desc="KeyStroke Application Log"/> 13: <doc label="applog-last32" url="servermon.jsp?cmd=log&amp;sub=applog-lastN" desc="Last N entries of KeyStroke Application Log"/> 14: <doc label="httplog" url="servermon.jsp?cmd=log&amp;sub=weblog" desc="Web Server (HTTP) Log"/> 15: <doc label="threads" url="thread.jsp" desc="Active threads"/> 16: <doc label="ps" url="ps.jsp" desc="Process Status"/> 17: <doc label="restart-server" url="restart.jsp" desc="Restart"/> 18: <doc label="standard-err" url="nohup.txt" desc="Stdout and stderr"/> 19: <doc label="old-logs" url="log" desc="Old logfiles"/> 20: </folder> 21: 22: <folder label="spaces" desc="Spaces"> 23: 24: <doc label="who-is-there ?" url="/explorer.jsp?cmd=spaces" desc="View all agents in all spaces"/> 25: <folder label="KsTest" desc="test session"> 26: <doc label="agents" url="/explorer.jsp?space=KsTest&amp;cmd=agents" desc="View the agents"/> 27: <doc label="patch" url="/explorer.jsp?space=KsTest&amp;cmd=patch" desc="View the Patch"/> 28: <doc label="commandlog" url="/explorer.jsp?space=KsTest&amp;cmd=log" desc="Command log"/> 29: <doc label="rtpchannel" url="/explorer.jsp?space=KsTest&amp;cmd=channel" desc="RTP Channel Performance"/> 30: </folder> 31: 32: <folder label="Space1" desc="test session"> 33: <doc label="agents" url="/explorer.jsp?space=Space1&amp;cmd=agents" desc="View the agents"/> 34: <doc label="patch" url="/explorer.jsp?space=Space1&amp;cmd=patch" desc="View the Patch"/> 35: <doc label="commandlog" url="/explorer.jsp?space=Space1&amp;cmd=log" desc="Command log"/> 36: <doc label="rtpchannel" url="/explorer.jsp?space=Space1&amp;cmd=channel" desc="RTP Channel Performance"/> 37: </folder> 38: 39: <folder label="Space2" desc="test session"> 40: <doc label="agents" url="/explorer.jsp?space=Space2&amp;cmd=agents" desc="View the agents"/> 41: <doc label="patch" url="/explorer.jsp?space=Space2&amp;cmd=patch" desc="View the Patch"/> 42: <doc label="commandlog" url="/explorer.jsp?space=Space2&amp;cmd=log" desc="Command log"/> 43: <doc label="rtpchannel" url="/explorer.jsp?space=Space2&amp;cmd=channel" desc="RTP Channel Performance"/> 44: </folder> 45: 46: <folder label="Space3" desc="test session"> 47: <doc label="agents" url="/explorer.jsp?space=Space3&amp;cmd=agents" desc="View the agents"/> 48: <doc label="patch" url="/explorer.jsp?space=Space3&amp;cmd=patch" desc="View the Patch"/> 49: <doc label="commandlog" url="/explorer.jsp?space=Space3&amp;cmd=log" desc="Command log"/> 50: <doc label="rtpchannel" url="/explorer.jsp?space=Space3&amp;cmd=channel" desc="RTP Channel Performance"/> 51: </folder> 52: 53: <folder label="Space4" desc="test session"> 54: <doc label="agents" url="/explorer.jsp?space=Space4&amp;cmd=agents" desc="View the agents"/> 55: <doc label="patch" url="/explorer.jsp?space=Space4&amp;cmd=patch" desc="View the Patch"/> 56: <doc label="commandlog" url="/explorer.jsp?space=Space4&amp;cmd=log" desc="Command log"/> 57: <doc label="rtpchannel" url="/explorer.jsp?space=Space4&amp;cmd=channel" desc="RTP Channel Performance"/> 58: </folder> 59: 60: <folder label="Space5" desc="test session"> 61: <doc label="agents" url="/explorer.jsp?space=Space5&amp;cmd=agents" desc="View the agents"/> 62: <doc label="patch" url="/explorer.jsp?space=Space5&amp;cmd=patch" desc="View the Patch"/> 63: <doc label="commandlog" url="/explorer.jsp?space=Space5&amp;cmd=log" desc="Command log"/> 64: <doc label="rtpchannel" url="/explorer.jsp?space=Space5&amp;cmd=channel" desc="RTP Channel Performance"/> 65: </folder> 66: 67: <folder label="ChatSpace" desc="chat session"> 68: <doc label="agents" url="/explorer.jsp?space=ChatSpace&amp;cmd=agents" desc="View the agents"/> 69: <doc label="commandlog" url="/explorer.jsp?space=ChatSpace&amp;cmd=log" desc="Command log"/> 70: <doc label="join" url="/chat.html" desc="The chat window"/> 71: </folder> 72: 73: <folder label="AVSpace" desc="audio/video session"> 74: <doc label="agents" url="/explorer.jsp?space=AVSpace&amp;cmd=agents" desc="View the agents"/> 75: <doc label="commandlog" url="/explorer.jsp?space=AVSpace&amp;cmd=log" desc="Command log"/> 76: <doc label="rtpchannel-control" url="/explorer.jsp?space=AVSpace&amp;cmd=channel" desc="RTP Channel Performance"/> 77: <doc label="rtpchannel-data" url="/explorer.jsp?space=AVSpace&amp;cmd=channel" desc="RTP Channel Performance"/> 78: </folder> 79: </folder> 80: 81: <folder label="doc" desc="Documents"> 82: <doc label="AMUSE-overview" url="doc/amuse-overview.html" desc="AMUSE Overview" /> 83: <doc label="AMUSE-protocol" url="doc/amuse-protocol.html" desc="AMUSE Protocol"/> 84: <doc label="AMUSE-multiuser" url="doc/amuse-multiuser.html" desc="AMUSE Multi User Issues"/> 85: <doc label="AMUSE-TODO" url="doc/todo.txt" desc="TODO list"/> 86: <folder label="scenarios" desc="examples"> 87: <doc label="example-oneplayer" url="doc/ksrun3-result.txt" desc="Example1"/> 88: <doc label="example-twoplayer" url="doc/ksrun4-result.txt" desc="Example2"/> 89: </folder> 90: </folder> 91: <doc label="help" url="xmenuhelp.html" desc="Help using this menu"/> 92: 93: <!-- <folder label="patch" desc="Patch commands"> 94: <doc label="view" url="sessionmon.jsp?session=KsTest&amp;cmd=patch&amp;sub=view" desc="View current patch"/> 95: <doc label="new" url="sessionmon.jsp?session=KsTest&amp;cmd=patch&amp;sub=new" desc="New current patch"/> 96: <doc label="save" url="sessionmon.jsp?session=KsTest&amp;cmd=patch&amp;sub=save" desc="Save current patch"/> 97: <doc label="load" url="sessionmon.jsp?session=KsTest&amp;cmd=patch&amp;sub=load" desc="Load new patches"/>; 98: <doc label="list" url="/session/KsTest/patch" desc="List available patches"/>; 99: </folder> 100: <doc label="library" url="/session/KsTest/library" desc="View library files"/> 101: <doc label="commandlog" url="sessionmon.jsp?session=KsTest&amp;cmd=log" desc="Session Command Log"/> --> 102: </xmenu>

3. DTD Definition

Below is the actual DTD file.

1: <?xml encoding='US-ASCII'?> 2: 3: <!-- 4: XMenu DTD - specifies formal structure of xmenu XML files. 5: 6: CVS $Id: xmenu.dtd,v 1.3 2003/01/06 10:27:22 just Exp $ 7: --> 8: 9: 10: <!ENTITY % content "folder|doc"> 11: 12: <!-- Toplevel menu 13: The titleImage is optional. If present it may be placed at the top of the lite menu. 14: --> 15: <!ELEMENT xmenu (%content;)*> 16: <!ATTLIST xmenu 17: titleImage CDATA #IMPLIED 18: title CDATA #REQUIRED 19: default CDATA #REQUIRED 20: outlineColor CDATA 'white' 21: fgColor CDATA 'white' 22: bgColor CDATA '#222222' 23: > 24: 25: <!-- Collapsable folder --> 26: <!ELEMENT folder (%content;)+> 27: <!ATTLIST folder 28: label CDATA #REQUIRED 29: desc CDATA #REQUIRED 30: > 31: 32: <!-- Leaf document --> 33: <!ELEMENT doc EMPTY> 34: <!ATTLIST doc 35: label CDATA #REQUIRED 36: url CDATA #REQUIRED 37: desc CDATA #REQUIRED 38: target CDATA 'text' 39: > 40: 41: 42: <!-- 43: History 44: $Log: xmenu.dtd,v $ 45: Revision 1.3 2003/01/06 10:27:22 just 46: removed Arial fonts from default styles 47: 48: Revision 1.2 2002/07/09 23:17:32 just 49: allow images to be used in top of menu frame 50: 51: Revision 1.1 2002/04/28 11:56:26 just 52: xmenu integration in xbook 53: 54: Revision 1.6 2002/01/03 15:31:37 just 55: changes required for upgrade to Xalan 2.2D14 56: 57: Revision 1.5 2001/12/21 14:46:51 just 58: chg: CommandLine usage outline icon attr and xmenuctrl.html now plain HTML 59: 60: Revision 1.4 2000/12/17 23:14:02 just 61: made more clever/compact XSL templates (using vars) 62: 63: Revision 1.3 2000/12/17 17:01:59 just 64: bug fixes 65: 66: Revision 1.2 2000/12/11 23:53:46 just 67: added fgcolor/bgcolor attrs to menu 68: 69: Revision 1.1 2000/12/09 16:37:51 just 70: new 71: 72: 73: --> 74:

References

[W3C]
World Wide Web Consortium. http://www.w3c.org
[W3C-XML]
World Wide Web Consortium. Extensible Markup Language (XML) 1.0. W3C Recommendation; http://www.w3.org/TR/1998/REC-xml-19980210