LEX File Exchange EA Support Files
SC4 Wikipedia Network Addon Mod
Dependencies Chat

Author Topic: Two questions about 'new_properties.xml'  (Read 3281 times)

0 Members and 1 Guest are viewing this topic.

Offline Doodleroo

  • Forums Inhabitant
  • *
  • Posts: 3
  • Reputation: 0
  • Your slogan here
Two questions about 'new_properties.xml'
« on: June 03, 2013, 01:37:59 AM »

I have two questions about 'new_properties.xml':

1) What are the terms of use? Is this file intended for exclusive use with PIM-X or am I free to use it in connection with tools I develop myself? Note, these are private mini-tools, likely never to be released and even if they are released I will of course link to the original file here.
2) Is there a corresponding DTD file available somewhere?

Thanks in advance!

Offline Doodleroo

  • Forums Inhabitant
  • *
  • Posts: 3
  • Reputation: 0
  • Your slogan here
Re: Two questions about 'new_properties.xml'
« Reply #1 on: June 04, 2013, 04:46:33 AM »
Update: Since there has been no response, I went ahead and created a DTD myself.

While doing so I realized a couple of issues with the current 'new_properties.xml' version which cause problems if you want to process the file with standard XML tools; therefore I went ahead and applied a couple of changes:
  • the 'PROPERTIES' and 'PROPERTY' tags were used in two distinct contexts (to define exemplar properties and to define rules for categories); in order to resolve this ambiguity I introduced two new tags ('REQUIRED_PROPERTIES' and 'REQUIRED_PROPERTY') for use in the category case
  • the identifiers used are all hex numbers, this is not DOM compliant (DOM expects identifiers to start with a character); I solved this by prefixing all identifiers (and references to identifiers) with 'id_'
  • the identifiers were also being referenced using mixed case, which again is not DOM compliant; I solved this by converting all identifiers to lower case
  • additionally all empty tags will now close with '/>' instead of using an end tag
  • and while I was at it, I fixed a couple of spelling errors my spell checker found in the file :)
  • and of course I added a reference to the DTD

Now, I do not know if anybody else has any interest in this, but nonetheless I'll attach the DTD as well as the modified 'new_properties.xml' in a zip file.
Link: new_properties with

One issue remains on which I would appreciate input:
There are some ID conflicts concerning categories, the following categories share the same ID:
  • 'all others' and 'stage 7' share id 0xc96d2137
  • 'zot' and 'small landing strip' share id 0x0c8fbd21
  • 'stoplight' and 'airport - size 1' share id 0x0c8fbd31
  • 'flora prop' and 'medium landing strip' share id 0x0c8fbd22
  • 'tree prop' and 'large landing strip' share id 0x0c8fbd23
  • 'crime' and 'no wealth' share id 0x1c8fbd65

What would be the suggested resolution to this conflict? Assign some new IDs randomly? Or is there a specific method being used to determine these ids?

Thanks in advance!