Project

General

Profile

1
<?php
2
$ignoreTypes = array(
3
                     "doc:description"         => true,
4
                     "doc:example"             => true,
5
                     "doc:moduleDescription"   => true,
6
                     "doc:moduleDocs"          => true,
7
                     "doc:moduleName"          => true,
8
                     "doc:recommendedUsage"    => true,
9
                     "doc:standAlone"          => true,
10
                     "doc:summary"             => true,
11
                     "doc:tooltip"             => true,
12
                     "xsd:annotation"          => true,
13
                     "xsd:appinfo"             => true,
14
                     "xsd:documentation"       => true,
15
                     "xsd:import"              => true,
16
                     "xsd:include"             => true,
17
                     "xsd:schema"              => true,
18
                     "AdditionalAbbreviations" => true,
19
                     "BacteriaStatus"          => true,
20
                     "BioCodeStatus"           => true,
21
                     "BotanyStatus"            => true,
22
                     "li"                      => true,
23
                     "p"                       => true,
24
                     "para"                    => true,
25
                     "PreferredAbbreviation"   => true,
26
                     "section"                 => true,
27
                     "Specification"           => true,
28
                     "SuffixAlgae"             => true,
29
                     "SuffixAnimalia"          => true,
30
                     "SuffixBacteriae"         => true,
31
                     "SuffixFungi"             => true,
32
                     "SuffixFungi"             => true,
33
                     "SuffixPlantae"           => true,
34
                     "title"                   => true,
35
                     "ul"                      => true,
36
                     "ZoologyStatus"           => true);
37
            
38
function isIgnoreType($nodeName) {
39
  global $ignoreTypes;
40
  return $ignoreTypes[$nodeName];
41
}
42

    
43
$files = array(
44
               'eml-access.xsd',
45
               'eml-coverage.xsd',
46
               'eml-documentation.xsd',
47
               'eml-literature.xsd',
48
               'eml-party.xsd',
49
               'eml-project.xsd',
50
               'eml-resource.xsd',
51
               'eml-text.xsd',
52
               'tcsv101.xsd',
53
               'tdwg_basetypes.xsd',
54
               'tdwg_dw_element.xsd',
55
               'tdwg_dw_geospatial.xsd',
56
               'veg-misc.xsd',
57
               'veg-organismobservation.xsd',
58
               'veg-plotobservation.xsd',
59
               'veg-plot.xsd');
60
foreach($files as $file) {
61
  $xmlDoc = new DOMDocument();
62
  $xmlDoc->load($file);
63
  $nodes = $xmlDoc->getElementsByTagName("*");
64
  foreach($nodes as $node) {
65
    $nodeName = preg_replace("/xs:/","xsd:",$node->nodeName);
66
    if(!isIgnoreType($nodeName)) {
67
      print $nodeName . "\n";
68
    }
69
  } 
70
}
71
?>
(4-4/9)