SC4D Homepage
BSC File Exchange
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 

News:

Have a city to share that's not from SC4? Our MD Section is here for you too!


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

0 Members and 1 Guest are viewing this topic.

Offline Doodleroo

Two questions about 'new_properties.xml'
« on: June 03, 2013, 01:37:59 AM »
Hello,

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!

Sim City 4 Devotion Forums

Two questions about 'new_properties.xml'
« on: June 03, 2013, 01:37:59 AM »

Re: Two questions about 'new_properties.xml'

Offline Doodleroo

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 DTD.zip

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!

Sim City 4 Devotion Forums

Re: Two questions about 'new_properties.xml'
« Reply #1 on: June 04, 2013, 04:46:33 AM »

 


If you experience visual glitches in our site, we strongly suggest you to use Firefox to browse the forums. Also a 1024*768 or higher resolution is highly recommended to view this site

Latest News

Have a city to share that's not from SC4? Our MD Section is here for you too!

SMF 2.0.15 | SMF © 2017, Simple Machines
TinyPortal © 2005-2011
SMFAds for Free Forums

Page created in 0.345 seconds with 49 queries.