From 57abf3ab685201918aa1c90a62005189bdc96389 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Thu, 10 Apr 2014 00:27:06 -0400 Subject: [PATCH] Make the XML validation phase check against the schema, and fixed all the errors it found --- osx/BoE.xcodeproj/project.pbxproj | 5 ++- rsrc/dialogs/dialog.xsd | 32 +++++++++------- rsrc/dialogs/edit-terrain.xml | 48 ++++++++++++------------ rsrc/dialogs/inventory-full.xml | 4 +- rsrc/dialogs/monster-info.xml | 62 +++++++++++++++---------------- rsrc/dialogs/pc-info.xml | 2 +- 6 files changed, 81 insertions(+), 72 deletions(-) diff --git a/osx/BoE.xcodeproj/project.pbxproj b/osx/BoE.xcodeproj/project.pbxproj index 31e4171c..d9165fa1 100644 --- a/osx/BoE.xcodeproj/project.pbxproj +++ b/osx/BoE.xcodeproj/project.pbxproj @@ -2487,13 +2487,16 @@ files = ( ); inputPaths = ( + "$(SRCROOT)/../rsrc/dialogs/*.xml", ); name = "Validate Dialog Definitions"; outputPaths = ( + "$(DERIVED_FILE_DIR)/data/dialogs/*.xml", ); runOnlyForDeploymentPostprocessing = 0; shellPath = "/bin/bash -v"; - shellScript = "\ncd ../rsrc/dialogs/\nxmllint --nonet --noout --stream --load-trace --loaddtd --dtdvalid \"$SOURCE_ROOT/../rsrc/dialogs/dialog.dtd\" \"$SOURCE_ROOT/../rsrc/dialogs\"/*.xml\n"; + shellScript = "\ncd ../rsrc/dialogs/\nset -o pipefail\nxmllint --nonet --noout --schema \"$SOURCE_ROOT/../rsrc/dialogs/dialog.xsd\" \"$SOURCE_ROOT/../rsrc/dialogs/\"*.xml 2>&1 | sed 's/%20/ /g'\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/rsrc/dialogs/dialog.xsd b/rsrc/dialogs/dialog.xsd index 354839ee..d7948490 100644 --- a/rsrc/dialogs/dialog.xsd +++ b/rsrc/dialogs/dialog.xsd @@ -145,6 +145,7 @@ + @@ -173,7 +174,7 @@ - + @@ -186,6 +187,7 @@ + @@ -219,18 +221,22 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + diff --git a/rsrc/dialogs/edit-terrain.xml b/rsrc/dialogs/edit-terrain.xml index 36265da8..0b115edc 100644 --- a/rsrc/dialogs/edit-terrain.xml +++ b/rsrc/dialogs/edit-terrain.xml @@ -49,30 +49,30 @@ Special properties: - None - Change when step on - Damaging terrain - Is a bridge - Change while occupied - Dangerous terrain - Reserved - Crumbling terrain - Lockable terrain - Unlockable terrain - Reserved - Is a sign - Call special when step - Reserved - Is a container - Waterfall - Conveyor belt - Reserved - Reserved - Reserved - Blocked to monsters - Town entrance - Change when used - Call special when used + None + Change when step on + Damaging terrain + Is a bridge + Change while occupied + Dangerous terrain + Reserved + Crumbling terrain + Lockable terrain + Unlockable terrain + Reserved + Is a sign + Call special when step + Reserved + Is a container + Waterfall + Conveyor belt + Reserved + Reserved + Reserved + Blocked to monsters + Town entrance + Change when used + Call special when used Extra values: *flag1 diff --git a/rsrc/dialogs/inventory-full.xml b/rsrc/dialogs/inventory-full.xml index 5cd48ea1..0876ad60 100644 --- a/rsrc/dialogs/inventory-full.xml +++ b/rsrc/dialogs/inventory-full.xml @@ -2,7 +2,7 @@ - + No room in your inventory. - + \ No newline at end of file diff --git a/rsrc/dialogs/monster-info.xml b/rsrc/dialogs/monster-info.xml index ac4de161..3032430e 100644 --- a/rsrc/dialogs/monster-info.xml +++ b/rsrc/dialogs/monster-info.xml @@ -2,35 +2,35 @@ - 1Immunities: - 2Monster Info: - 3 \ No newline at end of file diff --git a/rsrc/dialogs/pc-info.xml b/rsrc/dialogs/pc-info.xml index c9fb3188..25a2f61c 100644 --- a/rsrc/dialogs/pc-info.xml +++ b/rsrc/dialogs/pc-info.xml @@ -33,7 +33,7 @@ - +