Valhalla Legends Forums Archive | BnetDocs Research and Discussion | Question for editors

AuthorMessageTime
Arta
Hi,

I'm thinking of changing the means for storing message formats to XML, rather that just plain text.

Converting those plain text fields into the format on the site requires lots of horrible string replacements, and often just doesn't look very good.

I like the flexibility of the "free entry" method though: i don't really want to create a table for message fields and enter them individually. That would make it hard to do things like SID_WARCRAFTGENERAL (linked above). So, I figure XML might be a good compromise: it's easy to add things to it, yet structured enough to display properly, and to enable a variety of cool other features I have planned.

The question is: are you all comfortable enough with XML to edit it? I'm not talking about anything horrible. Something like this is what I'm thinking:

[code]
<field>
  <indent>0</indent>
  <type>DWORD</type>
  <name>Cookie</name>
  <constraints>Must be nonzero</constraints>
  <notes>This field is optional and may be ignored: set it to 0xFFFFFFFF if you don't need it.</notes>
</field>
<note>
  <indent>0</indent>
  <text>For each number of something:</text>
<note>
<field>
  <indent>1</indent>
  <type>STRING</type>
  <name>User Name</name>
</field>
[/code]

Which would produce something like:

[code]
(DWORD)     Cookie (must be nonzero)*

For each number of something:

(STRING)    User Name

* This field is optional and may be ignored: set it to 0xFFFFFFFF if you don't need it.
[/code]

All attributes of fields would be optional or have default values except for  type and name. Such a system would improve formatting and make it much easier to access format information programatically.

Comments?
July 6, 2005, 3:01 PM
UserLoser.
Sounds good to me
July 6, 2005, 3:49 PM
LivedKrad
I'm game.
July 7, 2005, 6:46 PM
Myndfyr
One of the problems I've observed in XML is its lackluster disregard for whitespace.  Most libraries will ignore any whitespace you've provided -- if you could do something more relational, it might work out, or if we could use HTML inside of the XML, that'd be good too.
July 8, 2005, 1:02 AM
Arta
What, ignores whitespace within values??!
July 8, 2005, 1:37 AM
Myndfyr
Yes.
July 8, 2005, 3:09 AM

Search