• Welcome to Valhalla Legends Archive.
 

Question for editors

Started by Arta, July 06, 2005, 10:01 AM

Previous topic - Next topic

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:


<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>


Which would produce something like:


(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.


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?

UserLoser.


LivedKrad


MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Arta

What, ignores whitespace within values??!

MyndFyre

QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.