- added preferences.dtd: DTD for preferences validation

- added example-preferences.xml: handwritten for test only
  2006 june 26 - ps 


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@666 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-06-26 06:36:14 +00:00
parent bfe8f3456e
commit b9f7711893
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,27 @@
<?xml version="1.0"?>
<!DOCTYPE sgpem SYSTEM "preferences.dtd">
<sgpem>
<recents>
<recent order="recent1" name="caio">Ultimo file aperto</recent>
<recent order="recent2" name="tullio">Penultimo file aperto</recent>
<recent order="recent3" name="sempronio">Terzultimo file aperto</recent>
</recents>
<layout>
<window id="mainwnd" geometry="0.0 0.0 100.0 100.0"/>
<window id="processeswnd" geometry="0.0 0.0 20.0 50.0"/>
<window id="resourceswnd" geometry="0.0 50.0 20.0 50.0"/>
<window id="schewnd" geometry="20.0 0.0 80.0 100.0"/>
</layout>
<preferences>
<default-speed>100</default-speed>
<modules>
<module id="python-sjf" />
<module id="python-rr" enabled="true" />
<module id="python-ocio" enabled="false" />
</modules>
</preferences>
</sgpem>
<!-- This file is for test only.
Handwrited to test DTD and for data example.
Validated with: xmllint -->

29
data/preferences.dtd Normal file
View File

@ -0,0 +1,29 @@
<!ELEMENT sgpem (recents, layout?, preferences) >
<!ENTITY % text "#PCDATA">
<!-- Ricorda i file piu' recenti -->
<!ELEMENT recents (recent)*>
<!ELEMENT recent (%text;)>
<!ATTLIST recent
order ID #REQUIRED
name CDATA #IMPLIED>
<!ELEMENT layout (window)+>
<!ELEMENT window EMPTY>
<!--
attribute 'geometry' is: x y width height. All
values are percentuals of the screen size
-->
<!ATTLIST window
id ID #REQUIRED
geometry NMTOKENS #REQUIRED>
<!-- Altre preferenze -->
<!ELEMENT preferences (default-speed, modules)>
<!ELEMENT default-speed (%text;)>
<!ELEMENT modules (module)*>
<!ELEMENT module EMPTY>
<!ATTLIST module
id ID #REQUIRED
enabled (true | false) "false">