summaryrefslogtreecommitdiff
path: root/testxml/xsdcheck.sh
blob: 1643071b10d1350d0f177e601b64802ade195a03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash

cd xsd
DIR="$(pwd)/../../../client-data"
rm ../errors.txt

function check {
    xmllint --format --schema tmw.xsd "${DIR}"/"${1}" 2>&1 >/dev/null | \
        grep -v ": Skipping import of schema located at " | \
        grep -v ".xml validates" | \
        grep -v ".manaplus validates" >>../errors.txt
}

xmllint --format --schema XMLSchema.xsd tmw.xsd 2>&1 >/dev/null | \
    grep -v ": Skipping import of schema located at " | \
    grep -v ".xsd validates" >>../errors.txt

check avatars.xml
check charcreation.xml
check deadmessages.xml
check effects.xml
check emotes.xml
check equipmentwindow.xml
check evol.manaplus
check features.xml
check itemcolors.xml
check items.xml
check maps.xml
check mods.xml
check monsters.xml
check npcdialogs.xml
check npcs.xml
check paths.xml
check pets.xml
check quests.xml
check skills.xml
check skillunits.xml
check sounds.xml
check status-effects.xml
check units.xml
check weapons.xml

find "${DIR}/graphics" -type f -name "*.xml" -exec ./checkfile.sh {} \; >>../errors.txt