Hi,
esf2xml is capable of displaying more meaningful xmls, so instead of:
<rec type='DATE'>
<u>1676</u>
<asc>summer</asc>
</rec>
<rec type='DATE'>
<u>0</u>
<asc>summer</asc>
</rec>
You'd see:
<date>summer 1676</date>
<date />
(Did you know summer of year 0 is null date indicator? I bet you didn't.)
And instead of:
<rec type='TRAIT'>
<s>C_Admiral_Good</s>
<i>8</i>
</rec>
You'd see:
<trait name="C_Admiral_Good" level="8" />
And instead of:
<rec type='CAMPAIGN_VICTORY_CONDITIONS'>
<ary type='REGION_KEYS'>
<rec type='REGION_KEYS'>
<s>venice</s>
</rec>
<rec type='REGION_KEYS'>
<s>hungary</s>
</rec>
<rec type='REGION_KEYS'>
<s>austria</s>
</rec>
<rec type='REGION_KEYS'>
<s>rumelia</s>
</rec>
<rec type='REGION_KEYS'>
<s>prussia</s>
</rec>
<rec type='REGION_KEYS'>
<s>west_pommerania</s>
</rec>
<rec type='REGION_KEYS'>
<s>west_prussia</s>
</rec>
</ary>
</rec>
You'd see:
<victory_conditions>
venice
hungary
austria
rumelia
prussia
west_pommerania
west_prussia
</victory_conditions>
This was basically the idea all along.
Low-level XML was only step one.
Anyway - what I need now is for someone to go over all xmls generated and
compile list of such mappings.
I could automatically generate <foo a='1' b='2' c='3' /> but attributes like a=/b=/c= are
fairly worthless, so I won't follow that path.
Volunteers? It shouldn't be that much harder than db table labeling,
and this will help me with opening campaign map more than buying me beer.
Not that I mind beer.
How to contribute
Preferred format is just like above, as list of pairs:
current low level XML
better semantic XML
If mapping is not-trivial, and it will often be, describe what variations
there are, and how they should work, as with <date /> above.
Remember you're ultimately describing it to a computer, so be precise,
and don't expect too much intelligence from the machine.
And remember I want byte perfect round trips, but XML attribute order is not preserved, so <traits C_Admiral_Good="8" C_Whatever="4" /> won't do,
as it is identical as <traits C_Whatever="4" C_Admiral_Good="8" /> on DOM level.
I might change my mind about byte perfect round trips, but the reason would need to be really really good.





Reply With Quote









