Index: ps/trunk/binaries/data/mods/public/gui/gui.dtd
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/gui.dtd (revision 15376)
+++ ps/trunk/binaries/data/mods/public/gui/gui.dtd (nonexistent)
@@ -1,205 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Property changes on: ps/trunk/binaries/data/mods/public/gui/gui.dtd
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Index: ps/trunk/binaries/data/mods/public/art/actors/actor.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/actors/actor.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/actors/actor.rnc (revision 15377)
@@ -0,0 +1,68 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element actor {
+ attribute version { xsd:positiveInteger }, (
+ element group {
+ element variant {
+ attribute name { text }? &
+ attribute frequency { xsd:nonNegativeInteger }? &
+ element mesh {
+ text
+ }? &
+ element textures {
+ element texture {
+ attribute file { text }? &
+ attribute name { text }
+ }*
+ }? &
+ element decal {
+ attribute width { xsd:float } & # X
+ attribute depth { xsd:float } & # Z
+ attribute angle { xsd:float } &
+ attribute offsetx { xsd:float } &
+ attribute offsetz { xsd:float }
+ }? &
+ element particles {
+ attribute file { text }
+ }? &
+ element colour { list {
+ xsd:nonNegativeInteger, # R
+ xsd:nonNegativeInteger, # G
+ xsd:nonNegativeInteger # B
+ } }? &
+ element animations {
+ element animation {
+ attribute name { text } &
+ attribute file { text }? &
+ attribute speed { xsd:nonNegativeInteger } &
+ attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
+ attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
+ attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
+ }*
+ }? &
+ element props {
+ element prop {
+ (attribute actor { text }? &
+ attribute attachpoint { text } &
+ attribute minheight { xsd:float }? &
+ attribute maxheight { xsd:float }? &
+ attribute selectable { "true" | "false" }?)
+ }*
+ }?
+ }*
+ }* &
+ element castshadow { # flag; true if present
+ empty
+ }? &
+ element float { # flag; true if present
+ empty
+ }? &
+ element material {
+ text
+ }?
+ )
+}
Index: ps/trunk/binaries/data/mods/public/art/actors/actor.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/actors/actor.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/actors/actor.rng (revision 15377)
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/art/materials/material.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/materials/material.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/materials/material.rnc (revision 15377)
@@ -0,0 +1,42 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element material {
+ element alternative {
+ attribute material { text } &
+ attribute quality { xsd:decimal { minInclusive = "0" } }? &
+ attribute if { text }?
+ }* &
+ element alpha_blending { # flag; true if present
+ empty
+ }? &
+ element shader {
+ attribute effect { text }
+ } &
+ element define {
+ attribute name { text },
+ attribute value { text }
+ }* &
+ element conditional_define {
+ attribute name { text },
+ attribute value { text },
+ attribute type { text },
+ (attribute conf { text }
+ | ( attribute min { xsd:float }?, attribute max { xsd:float }? ))
+ }* &
+ element uniform {
+ attribute name { text },
+ attribute value { list { # X Y Z W
+ xsd:float,
+ xsd:float?,
+ xsd:float?,
+ xsd:float?
+ } }
+ }* &
+ element renderquery {
+ attribute name { text }
+ }*
+}
Index: ps/trunk/binaries/data/mods/public/art/materials/material.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/materials/material.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/materials/material.rng (revision 15377)
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/art/particles/particle.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/particles/particle.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/particles/particle.rnc (revision 15377)
@@ -0,0 +1,44 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element particles {
+ element texture {
+ text
+ }? &
+ element blend {
+ attribute mode { "add" | "subtract" | "over" | "multiply" }
+ }? &
+ element start_full { # flag; true if present
+ empty
+ }? &
+ element use_relative_velocity { # flag; true if present
+ empty
+ }? &
+ element constant {
+ attribute name { text } &
+ attribute value { xsd:float }
+ }* &
+ element uniform {
+ attribute name { text } &
+ attribute min { xsd:float } &
+ attribute max { xsd:float }
+ }* &
+ element copy {
+ attribute name { text } &
+ attribute from { text }
+ }* &
+ element expr {
+ attribute name { text } &
+ attribute from { text } &
+ attribute mul { xsd:float } &
+ attribute max { xsd:float }
+ }* &
+ element force {
+ attribute x { xsd:float }? &
+ attribute y { xsd:float }? &
+ attribute z { xsd:float }?
+ }*
+}
Index: ps/trunk/binaries/data/mods/public/art/particles/particle.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/particles/particle.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/particles/particle.rng (revision 15377)
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ add
+ subtract
+ over
+ multiply
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/art/terrains/terrain.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/terrains/terrain.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/terrains/terrain.rnc (revision 15377)
@@ -0,0 +1,21 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element Terrains {
+ element Terrain {
+ attribute groups { text } & # comma-separated list of groups
+ attribute mmap {
+ list {
+ xsd:integer { minInclusive = "0" maxInclusive = "255" }, # R
+ xsd:integer { minInclusive = "0" maxInclusive = "255" }, # G
+ xsd:integer { minInclusive = "0" maxInclusive = "255" } # B
+ }
+ }? &
+ attribute angle { xsd:float }? & # degrees
+ attribute size { xsd:float }? &
+ attribute movementclass { text }?
+ }
+}
Index: ps/trunk/binaries/data/mods/public/art/terrains/terrain.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/terrains/terrain.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/terrains/terrain.rng (revision 15377)
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+
+
+
+ 0
+ 255
+
+
+
+ 0
+ 255
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rnc (revision 15377)
@@ -0,0 +1,33 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element terrain {
+ element textures {
+ element texture {
+ attribute name { text } &
+ attribute file { text }
+ }*
+ } &
+ element material {
+ text
+ }? &
+ element alphamap {
+ text
+ }? &
+ element props {
+ attribute groups { text }? & # comma-separated list of groups
+ attribute mmap {
+ list {
+ xsd:integer { minInclusive = "0" }, # R
+ xsd:integer { minInclusive = "0" }, # G
+ xsd:integer { minInclusive = "0" } # B
+ }
+ }? &
+ attribute angle { xsd:float }? & # degrees
+ attribute size { xsd:float }? &
+ attribute movementclass { text }?
+ }*
+}
Index: ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/terrains/terrain_texture.rng (revision 15377)
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/art/textures/texture.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/art/textures/texture.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/textures/texture.rnc (revision 15377)
@@ -0,0 +1,19 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element Textures {
+ element File {
+ attribute pattern { text }? &
+ attribute format { "dxt1" | "dxt3" | "dxt5" | "rgba" | "alpha" }? &
+ attribute mipmap { "true" | "false" }? &
+ attribute normal { "true" | "false" }? &
+ attribute alpha { "none" | "player" | "transparency" }? &
+ attribute filter { "box" | "triangle" | "kaiser" }? &
+ attribute kaiserwidth { xsd:float }? &
+ attribute kaiseralpha { xsd:float }? &
+ attribute kaiserstretch { xsd:float }?
+ }*
+}
Index: ps/trunk/binaries/data/mods/public/art/textures/texture.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/art/textures/texture.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/art/textures/texture.rng (revision 15377)
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ dxt1
+ dxt3
+ dxt5
+ rgba
+ alpha
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+
+
+ none
+ player
+ transparency
+
+
+
+
+
+
+ box
+ triangle
+ kaiser
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/audio/sound_group.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/audio/sound_group.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/audio/sound_group.rnc (revision 15377)
@@ -0,0 +1,37 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+##
+# Types #
+##
+flag = "0" | "1"
+
+start = SoundGroup
+
+SoundGroup = element SoundGroup {
+ element Gain { xsd:float }? &
+ element Looping { flag }? &
+ element Omnipresent { flag }? &
+ element HeardBy { "owner" }? &
+ element Distanceless { flag }? &
+ element Pitch { xsd:float }? &
+ element Priority { xsd:float }? &
+ element RandOrder { flag }? &
+ element RandGain { flag }? &
+ element GainUpper { xsd:float }? &
+ element GainLower { xsd:float }? &
+ element RandPitch { flag }? &
+ element PitchUpper { xsd:float }? &
+ element PitchLower { xsd:float }? &
+ element ConeGain { xsd:float }? &
+ element ConeInner { xsd:float }? &
+ element ConeOuter { xsd:float }? &
+ element Replacement { text }? &
+ element Threshold { xsd:float }? &
+ element Decay { xsd:float }? &
+ element Sound { text }+ &
+ element Path { text }
+}
Index: ps/trunk/binaries/data/mods/public/audio/sound_group.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/audio/sound_group.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/audio/sound_group.rng (revision 15377)
@@ -0,0 +1,135 @@
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ owner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/gui/gui.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/gui.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/gui/gui.rnc (revision 15377)
@@ -0,0 +1,272 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+start = objects | setup | sprites | styles
+
+##
+# Types #
+##
+# xsd:boolean could be used instead of this definition,
+# though it considers "1" & "0" as valid values.
+bool = "true" | "false"
+align = "left" | "center" | "right"
+valign = "top" | "center" | "bottom"
+wrapmode = "repeat" | "mirrored_repeat" | "clamp_to_edge"
+coord = xsd:string { pattern = "-?\d*\.?\d+(%([\+\-]\d*\.?\d+)?)?" }
+clientarea = list { coord, coord, coord, coord }
+# color can be a name or "R G B A" format string
+rgba = list { xsd:integer { minInclusive = "0" maxInclusive = "255" },
+ xsd:integer { minInclusive = "0" maxInclusive = "255" },
+ xsd:integer { minInclusive = "0" maxInclusive = "255" },
+ xsd:integer { minInclusive = "0" maxInclusive = "255" }?}
+ccolor = rgba | xsd:string { pattern = "[A-Za-z]+" }
+size = list { xsd:decimal, xsd:decimal }
+pos = list { xsd:decimal, xsd:decimal }
+rect = list { xsd:decimal, xsd:decimal, xsd:decimal, xsd:decimal }
+
+##
+# Defines #
+##
+unique_settings =
+ attribute name { text }?,
+ [ a:defaultValue = "empty" ] attribute type { text }?,
+ attribute style { text }?
+# This could probably be made more specific/strict
+# with more information regarding the use/meaning
+# of these attributes.
+base_settings =
+ attribute absolute { bool }?&
+ attribute enable { bool }?&
+ attribute ghost { bool }?&
+ attribute hidden { bool }?&
+ attribute size { clientarea }?&
+ attribute z { xsd:decimal }?
+# Defaults are not put in here, because it ruins the concept of styles.
+ex_settings =
+ attribute anchor { valign }?&
+ attribute buffer_zone { xsd:decimal }?&
+ attribute buffer_width { xsd:decimal }?&
+ attribute button_width { xsd:decimal }?&
+ attribute checked { bool }?&
+ attribute clip { bool }?&
+ attribute dropdown_size { xsd:decimal }?&
+ attribute dropdown_buffer { xsd:decimal }?&
+ attribute enabled { bool }?&
+ attribute font { text }?&
+ attribute fov_wedge_color { ccolor }?&
+ attribute hotkey { text }?&
+ attribute cell_id { xsd:integer }?&
+ attribute independent { bool }?&
+ attribute input_initvalue_destroyed_at_focus { bool }?&
+ attribute mask { bool }?&
+ attribute mask_char { xsd:string { minLength = "1" maxLength = "1" } }?&
+ attribute max_length { xsd:nonNegativeInteger }?&
+ attribute maxwidth { xsd:decimal }? &
+ attribute multiline { bool }?&
+ attribute offset { pos }?&
+ attribute scrollbar { bool }?&
+ attribute scrollbar_style { text }?&
+ attribute scroll_bottom { bool }?&
+ attribute sound_closed { text }?&
+ attribute sound_disabled { text }?&
+ attribute sound_enter { text }?&
+ attribute sound_leave { text }?&
+ attribute sound_opened { text }?&
+ attribute sound_pressed { text }?&
+ attribute sound_selected { text }?&
+ attribute sprite { text }?&
+ attribute sprite2 { text }?&
+ attribute sprite_heading { text }?&
+ attribute sprite_bar { text }?&
+ attribute sprite_background { text }?&
+ attribute sprite_disabled { text }?&
+ attribute sprite_list { text }?&
+ attribute sprite2_disabled { text }?&
+ attribute sprite_over { text }?&
+ attribute sprite2_over { text }?&
+ attribute sprite_pressed { text }?&
+ attribute sprite2_pressed { text }?&
+ attribute sprite_selectarea { text }?&
+ attribute square_side { xsd:decimal }?&
+ attribute textcolor { ccolor }?&
+ attribute textcolor_disabled { ccolor }?&
+ attribute textcolor_over { ccolor }?&
+ attribute textcolor_pressed { ccolor }?&
+ attribute textcolor_selected { ccolor }?&
+ attribute text_align { align }?&
+ attribute text_valign { valign }?&
+ attribute tooltip { text }?&
+ attribute tooltip_style { text }?
+
+##
+# Objects #
+##
+objects = element objects { (script | object)* }
+script =
+ element script {
+ text &
+ attribute file { text }? &
+ attribute directory { text }?
+ }
+object =
+ element object {
+ ((object
+ | action
+ | \attribute
+ | def
+ | \include
+ | item
+ | repeat
+ | translatableAttribute)*
+ | text),
+ unique_settings,
+ base_settings,
+ ex_settings
+ }
+action =
+ element action {
+ text,
+ attribute on { text },
+ attribute file { text }?
+ }
+\attribute =
+ element attribute {
+ (keep | translate)*,
+ attribute id { text }
+ }
+def =
+ element def {
+ translatableAttribute?,
+ (
+ attribute id { text }&
+ attribute color { ccolor }?&
+ attribute heading { text }?&
+ attribute width { text }?
+ )
+ }
+\include =
+ element include {
+ attribute file { text }
+}
+item =
+ element item {
+ text,
+ attribute enabled { bool }?
+ }
+keep = element keep { text }
+repeat =
+ element repeat {
+ object+,
+ attribute count { text }
+ }
+translate = element translate { text }
+translatableAttribute =
+ element translatableAttribute {
+ text,
+ (
+ attribute id { text }&
+ attribute comment { text }?&
+ attribute context { text }?
+ )
+ }
+
+##
+# Styles #
+##
+styles = element styles { style* }
+style =
+ element style {
+ attribute name { text },
+ base_settings,
+ ex_settings
+ }
+
+##
+# Setup #
+##
+setup = element setup { (icon | scrollbar | tooltip | color)* }
+scrollbar =
+ element scrollbar {
+ attribute name { text }&
+ attribute width { xsd:decimal }&
+ attribute alwaysshown { bool }?&
+ attribute maximum_bar_size { xsd:decimal }?&
+ attribute minimum_bar_size { xsd:decimal }?&
+ attribute scroll_wheel { bool }?&
+ attribute show_edge_buttons { bool }?&
+ attribute sprite_button_top { text }?&
+ attribute sprite_button_top_pressed { text }?&
+ attribute sprite_button_top_disabled { text }?&
+ attribute sprite_button_top_over { text }?&
+ attribute sprite_button_bottom { text }?&
+ attribute sprite_button_bottom_pressed { text }?&
+ attribute sprite_button_bottom_disabled { text }?&
+ attribute sprite_button_bottom_over { text }?&
+ attribute sprite_bar_vertical { text }?&
+ attribute sprite_bar_vertical_over { text }?&
+ attribute sprite_bar_vertical_pressed { text }?&
+ attribute sprite_back_vertical { text }?
+ }
+icon =
+ element icon {
+ attribute name { text }&
+ attribute size { size }&
+ attribute sprite { text }&
+ attribute cell_id { text }?
+ }
+tooltip =
+ element tooltip {
+ attribute name { text }&
+ attribute sprite { text }?&
+ attribute anchor { valign }?&
+ attribute buffer_zone { xsd:decimal }?&
+ attribute font { text }?&
+ attribute maxwidth { xsd:decimal }?&
+ attribute offset { pos }?&
+ attribute textcolor { ccolor }?&
+ attribute delay { xsd:integer }?&
+ attribute use_object { text }?&
+ attribute hide_object { bool }?
+ }
+color =
+ element color {
+ rgba,
+ attribute name { text }
+ }
+
+##
+# Sprites #
+##
+sprites = element sprites { sprite* }
+sprite =
+ element sprite {
+ (effect?, image+),
+ attribute name { text }
+ }
+image =
+ element image {
+ effect?,
+ (
+ attribute texture { text }?&
+ attribute size { clientarea }?&
+ attribute texture_size { clientarea }?&
+ attribute real_texture_placement { rect }?&
+ attribute cell_size { size }?&
+ attribute backcolor { ccolor }?&
+ attribute bordercolor { ccolor }?&
+ attribute border { bool }?&
+ attribute z_level { xsd:float }?&
+ attribute fixed_h_aspect_ratio { xsd:decimal }?&
+ attribute round_coordinates { bool }?&
+ attribute wrap_mode { wrapmode }?
+ )
+ }
+effect =
+ element effect {
+ attribute add_color { ccolor }?,
+ attribute multiply_color { ccolor }?,
+ attribute grayscale { empty }?
+ }
Index: ps/trunk/binaries/data/mods/public/gui/gui.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/gui.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/gui/gui.rng (revision 15377)
@@ -0,0 +1,815 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ false
+
+
+
+
+ left
+ center
+ right
+
+
+
+
+ top
+ center
+ bottom
+
+
+
+
+ repeat
+ mirrored_repeat
+ clamp_to_edge
+
+
+
+
+ -?\d*\.?\d+(%([\+\-]\d*\.?\d+)?)?
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 255
+
+
+ 0
+ 255
+
+
+ 0
+ 255
+
+
+
+ 0
+ 255
+
+
+
+
+
+
+
+
+ [A-Za-z]+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/gui/gui_page.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/gui_page.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/gui/gui_page.rnc (revision 15377)
@@ -0,0 +1,11 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element page {
+ element include {
+ text
+ }*
+}
Index: ps/trunk/binaries/data/mods/public/gui/gui_page.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/gui/gui_page.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/gui/gui_page.rng (revision 15377)
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/maps/scenario.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/scenario.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/maps/scenario.rnc (revision 15377)
@@ -0,0 +1,120 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+start = Scenario
+
+##
+# Defines #
+##
+colour_rgb =
+ attribute r { xsd:decimal { minInclusive = "0" maxInclusive = "1" } },
+ attribute g { xsd:decimal { minInclusive = "0" maxInclusive = "1" } },
+ attribute b { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }
+
+suncolour_rgb = # RGB can be > 1 due to overbrightness
+ attribute r { xsd:decimal { minInclusive = "0" } },
+ attribute g { xsd:decimal { minInclusive = "0" } },
+ attribute b { xsd:decimal { minInclusive = "0" } }
+
+pos_xyz =
+ attribute x { xsd:float },
+ attribute y { xsd:float },
+ attribute z { xsd:float }
+
+pos_xz =
+ attribute x { xsd:decimal },
+ attribute z { xsd:decimal }
+
+angle = attribute angle { xsd:float }
+
+##
+# Scenario #
+##
+# TODO: bounds are not documented for many of these
+Scenario = element Scenario {
+ attribute version { xsd:positiveInteger } &
+ element Environment {
+ element LightingModel { text }? & # Deprecated
+ element SkySet { text } &
+ element SunColour { suncolour_rgb } &
+ element SunElevation { angle } &
+ element SunRotation { angle } &
+ element TerrainAmbientColour { colour_rgb } &
+ element UnitsAmbientColour { colour_rgb } &
+ element Fog {
+ element FogFactor {
+ xsd:decimal { minInclusive = "0" } # TODO: what is the max?
+ } &
+ element FogThickness {
+ xsd:decimal { minInclusive = "0" } # TODO: what is the max?
+ } &
+ element FogColour { colour_rgb }
+ }? &
+ element Water {
+ element WaterBody {
+ element Type { text } & # Not implemented
+ element Colour { colour_rgb } &
+ element Height { xsd:decimal } &
+ element Shininess { xsd:decimal }? & # Deprecated
+ element Waviness { xsd:decimal } &
+ element Murkiness { xsd:decimal } &
+ element Tint { colour_rgb } &
+ element ReflectionTint { colour_rgb } &
+ element ReflectionTintStrength { xsd:decimal }
+ }
+ } &
+ element Postproc {
+ element Brightness { xsd:decimal },
+ element Contrast { xsd:decimal },
+ element Saturation { xsd:decimal },
+ element Bloom { xsd:decimal },
+ element PostEffect { text }
+ }?
+ } &
+ element Terrain {
+ attribute patches { xsd:positiveInteger }?,
+ attribute texture { text }?,
+ attribute priority { xsd:nonNegativeInteger }?,
+ attribute height { xsd:positiveInteger }?
+ }? &
+ element Script {
+ text
+ }? &
+ element Camera { # Camera can have weird float values
+ element Position { pos_xyz },
+ element Rotation { angle },
+ element Declination { angle }
+ } &
+ element ScriptSettings {
+ text
+ } &
+ element Entities {
+ element Entity {
+ attribute uid { xsd:positiveInteger } &
+ element Template { text } &
+ element Player { xsd:nonNegativeInteger }? &
+ element Position {
+ pos_xz
+ } &
+ element Orientation {
+ attribute y { xsd:decimal }
+ } &
+ element Obstruction {
+ attribute group { xsd:positiveInteger },
+ attribute group2 { xsd:positiveInteger }?
+ }? &
+ element Actor {
+ attribute seed { xsd:integer }
+ }?
+ }*
+ }? &
+ element Paths { # Unused
+ empty
+ }? &
+ element Triggers { # Unused
+ empty
+ }?
+}
Index: ps/trunk/binaries/data/mods/public/maps/scenario.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/maps/scenario.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/maps/scenario.rng (revision 15377)
@@ -0,0 +1,297 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+
+
+
+
+ 0
+ 1
+
+
+
+
+ 0
+ 1
+
+
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0
+
+
+
+
+
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rnc (revision 15377)
@@ -0,0 +1,30 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element Pathfinder {
+ element MaxSameTurnMoves { xsd:nonNegativeInteger } &
+ element PassabilityClasses {
+ element * {
+ element MinWaterDepth { xsd:decimal }? & # TODO: fixed type
+ element MaxWaterDepth { xsd:decimal }? &
+ element MaxTerrainSlope { xsd:decimal }? &
+ element MinShoreDistance { xsd:decimal }? &
+ element MaxShoreDistance { xsd:decimal }?
+ }+
+ } &
+ element MovementClasses {
+ element * {
+ attribute Speed { xsd:decimal } &
+ attribute Cost { xsd:decimal } &
+ element UnitClasses {
+ element * {
+ attribute Speed { xsd:decimal } &
+ attribute Cost { xsd:decimal }
+ }*
+ }?
+ }+
+ }
+}
Index: ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/simulation/data/pathfinder.rng (revision 15377)
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rnc
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rnc (nonexistent)
+++ ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rnc (revision 15377)
@@ -0,0 +1,17 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+##
+# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
+# and use a converter tool like trang to generate the Relax NG XML (.rng) file
+##
+
+element TerritoryManager {
+ element ImpassableCost {
+ xsd:integer { minInclusive = "0" maxInclusive = "255" }
+ } &
+ element BorderThickness {
+ xsd:decimal
+ } &
+ element BorderSeparation {
+ xsd:decimal
+ }
+}
Index: ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rng
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rng (nonexistent)
+++ ps/trunk/binaries/data/mods/public/simulation/data/territorymanager.rng (revision 15377)
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+ 0
+ 255
+
+
+
+
+
+
+
+
+
+
Index: ps/trunk/source/tools/xmlvalidator/validate.pl
===================================================================
--- ps/trunk/source/tools/xmlvalidator/validate.pl (nonexistent)
+++ ps/trunk/source/tools/xmlvalidator/validate.pl (revision 15377)
@@ -0,0 +1,177 @@
+use strict;
+use warnings;
+
+use File::Find;
+use XML::LibXML;
+
+use constant VERBOSE_OUTPUT => 1;
+
+my $vfsroot = '../../../binaries/data/mods';
+
+sub vfs_to_physical
+{
+ my ($vfspath) = @_;
+ my $fn = "$vfsroot/public/$vfspath";
+ return $fn;
+}
+
+sub vfs_to_relative_to_mods
+{
+ my ($vfspath) = @_;
+ my $fn = "public/$vfspath";
+ return $fn;
+}
+
+sub find_files
+{
+ my ($vfspath, $extn) = @_;
+ my @files;
+ my $find_process = sub {
+ return $File::Find::prune = 1 if $_ eq '.svn';
+ my $n = $File::Find::name;
+ return if /~$/;
+ return unless -f $_;
+ return unless /\.($extn)$/;
+ $n =~ s~\Q$vfsroot\E/public/~~;
+ push @files, $n;
+ };
+ find({ wanted => $find_process }, "$vfsroot/public/$vfspath");
+
+ return @files;
+}
+
+sub validate
+{
+ my ($name, $arr, $schemapath) = @_;
+ my @files = @{$arr};
+ print "\nValidating ".$name."s...\n";
+
+ my $rngschema = XML::LibXML::RelaxNG->new( location => vfs_to_physical($schemapath) );
+ my $errorcount = 0;
+
+ for my $f (sort @files)
+ {
+ my $doc = XML::LibXML->new->parse_file(vfs_to_physical($f));
+
+ eval { $rngschema->validate( $doc ); };
+
+ if ($@)
+ {
+ if (VERBOSE_OUTPUT)
+ {
+ # strip $vfsroot from messages
+ $@ =~ s/$vfsroot//g;
+ warn $@;
+ }
+ else
+ {
+ warn "$f validation failed\n";
+ }
+
+ $errorcount++;
+ }
+ }
+ print "\n$errorcount $name validation errors\n";
+}
+
+sub validate_actors
+{
+ my @files = find_files('art/actors', 'xml');
+ validate('actor', \@files, 'art/actors/actor.rng');
+}
+
+sub validate_guis
+{
+ # there are two different gui XML schemas depending on path
+ my @files = find_files('gui', 'xml');
+ my (@guipages, @guixmls);
+ for my $f (@files)
+ {
+ if ($f =~ /^gui\/page_/)
+ {
+ push @guipages, $f;
+ }
+ else
+ {
+ push @guixmls, $f;
+ }
+ }
+
+ validate('gui page', \@guipages, 'gui/gui_page.rng');
+ validate('gui xml', \@guixmls, 'gui/gui.rng');
+}
+
+sub validate_maps
+{
+ my @files = find_files('maps/scenarios', 'xml');
+ push @files, find_files('maps/skirmishes', 'xml');
+ validate('map', \@files, 'maps/scenario.rng');
+}
+
+sub validate_materials
+{
+ my @files = find_files('art/materials', 'xml');
+ validate('material', \@files, 'art/materials/material.rng');
+}
+
+sub validate_particles
+{
+ my @files = find_files('art/particles', 'xml');
+ validate('particle', \@files, 'art/particles/particle.rng');
+}
+
+sub validate_simulation
+{
+ my @file = ('simulation/data/pathfinder.xml');
+ validate('pathfinder', \@file, 'simulation/data/pathfinder.rng');
+ @file = ('simulation/data/territorymanager.xml');
+ validate('territory manager', \@file, 'simulation/data/territorymanager.rng');
+}
+
+sub validate_soundgroups
+{
+ my @files = find_files('audio', 'xml');
+ validate('sound group', \@files, 'audio/sound_group.rng');
+}
+
+sub validate_terrains
+{
+ # there are two different terrain XML schemas depending on path
+ my @files = find_files('art/terrains', 'xml');
+ my (@terrains, @terraintextures);
+ for my $f (@files)
+ {
+ if ($f =~ /terrains.xml/)
+ {
+ push @terrains, $f;
+ }
+ else
+ {
+ push @terraintextures, $f;
+ }
+ }
+
+ validate('terrain', \@terrains, 'art/terrains/terrain.rng');
+ validate('terrain texture', \@terraintextures, 'art/terrains/terrain_texture.rng');
+}
+
+sub validate_textures
+{
+ my @files;
+ my @texturefiles = find_files('art/textures', 'xml');
+ for my $f (@texturefiles)
+ {
+ push @files, $f if $f =~ /textures.xml/;
+ }
+ validate('texture', \@files, 'art/textures/texture.rng');
+}
+
+validate_actors();
+validate_guis();
+validate_maps();
+validate_materials();
+validate_particles();
+validate_simulation();
+validate_soundgroups();
+validate_terrains();
+validate_textures();