Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) XML Version of mods (Read 3262 times)
[Unknown]
Guest


XML Version of mods
Dec 27th, 2002 at 2:30am
Print Post  
The current format of a mod is loosely SGML based, but what if a more XML-compliant version was used?

More information here.

-[Unknown]
  
Back to top
 
IP Logged
 
Eagle_f90
God Member
*****
Offline


For those with wings,
fly to your dreams.

Posts: 926
Location: Derry
Joined: Mar 7th, 2002
Gender: Male
Re: XML Version of mods
Reply #1 - Dec 27th, 2002 at 2:35am
Print Post  
What would be the advantage to this?
  

For those with wings, fly to your dreams

Dreams are what we find at the end of reality, your reality if what you find at the end of your dreams.

Back to top
WWW  
IP Logged
 
[Unknown]
New Member
*
Offline



Posts: 7
Location: Los Angeles, California
Joined: Dec 27th, 2002
Gender: Male
Re: XML Version of mods
Reply #2 - Dec 27th, 2002 at 7:57am
Print Post  
Quote:
The format for a current mod is SGML-based, but what if it were changed to be more with the times?  An XML version could be parsed by PHP/PL, and accessed through XPath. (just like in XSLT Grin)  This would make it easier to debug and execute mods, esp. without any errors or loops.  Further, it could be used to implement more functionality.

Here's an example:
Code
Select All
<?xml version="1.0"?>
<modification xmlns="http://www.yabbse.org/">
 <information>
  <name>XML Version of YaBBpak .mod File</name>
  <version>1.0</version>
  <yabbversion>1.5</yabbversion>
  <description>
   Gives a better standard for creating and deploying a modification.
  </description>
  <readme>
   Important details on the modification.
  </readme>
  <author>
   <name>[Unknown]</name>
   <email>unknown@gbaetc.homeip.net</email>
   <website>http://gbaetc.homeip.net/</website>
  </author>
  <website>http://gbaetc.homeip.net/about.page.-.will.have.one.if.anyone.cares.php</website>
 </information>
 <sql><![CDATA[
SELECT "Any SQL to be done could be provided too";
]]>
 </sql>
 <php><![CDATA[
<?php echo 'PHP code to be executed on install';?>
]]>
 </php>
 <perl>
<![CDATA[
print "Perl code to be executed on install";
]]>
 </perl>
 <file>
  <filename>$sourcedir/somefile.php</filename>
  <search>
   <find><![CDATA[original text to find....
]]>
   </find>
   <modify type="replace"><![CDATA[
new text to replace into...
can use "replace", "remove", "add after", and "add before."
]]>
   </modify>
  </search>
  <search>
   <find><![CDATA[
multiple searches, etc.]]>
   </find>
   <modify type="remove" />
  </search>
 </file>
</modification> 



Does anyone have any comments on this?

If people would be willing to use it, I would be more than happy to create a modification that would execute it.

Thanks,
-[Unknown]
  
Back to top
WWW  
IP Logged
 
Shoeb Omar
God Member
*****
Offline


Mod Writer

Posts: 5665
Location: San Diego
Joined: Jun 29th, 2001
Gender: Male
Re: XML Version of mods
Reply #3 - Dec 27th, 2002 at 10:17am
Print Post  
Moved to the board where it will get BM devs attention Cheesy
  

YaBB SP2 BETA!
Now taking pay jobs in PHP or Perl.  Contact me for details.
Back to top
IP Logged
 
Christer Alexander
God Member
*****
Offline


Make my day...

Posts: 3443
Location: Lethbridge
Joined: Feb 10th, 2002
Gender: Male
Re: XML Version of mods
Reply #4 - Dec 27th, 2002 at 10:26am
Print Post  
It'd be hell to convert all the mods in the db...right Shoeb? Roll Eyes
  

Code
Select All
unless(0) { stab("LoonyPandora"); next; } 

Back to top
IP Logged
 
[Unknown]
New Member
*
Offline



Posts: 7
Location: Los Angeles, California
Joined: Dec 27th, 2002
Gender: Male
Re: XML Version of mods
Reply #5 - Dec 27th, 2002 at 11:04am
Print Post  
Shoeb Omar: I would thank you, but I'm not one of those let's-give-someone-my-real-name kind of paranoid people.

Christer: I would of course write a converter to make old style mods into xml style ones.... that would be fairly easy.

-[Unknown]
  
Back to top
WWW  
IP Logged
 
Dummy Proof
God Member
*****
Offline


I hate Bosses!  Now get
to work!

Posts: 991
Location: Outside L.A.
Joined: Aug 8th, 2002
Gender: Male
Re: XML Version of mods
Reply #6 - Dec 27th, 2002 at 1:34pm
Print Post  
Guess I'm missing the advantage part somehow... could someone spell out for me?

Dummy
  

Ya can Idiot proof it...
Ya can Dummy proof it...
But ya can never...
...Blonde proof it!
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: XML Version of mods
Reply #7 - Dec 27th, 2002 at 1:52pm
Print Post  
This has been discussed a lot in the boardmod developer mailinglist. In the end it, we have NO advantage and several disadvantages of making mods XML conform.

The only advantage we could come up with is that it's XML conform Tongue so you can pretty much ignore this advantage since it doesn't help the people who want to install mods at all.

Make mods readable by other programs? It's way easier to simply read the current format, it only requires a couple lines of code to get the data. See the perl version of boardmod for example.

Now the disadvantages:
1. All mods have to be converted. Of course a converter could be written, but it would confuse people to have two different mod formats to handle.

2. XML is very limited concerning human-readability in our case. The current mod format is easy to create with a simple text editor, it is easy to read for everybody who wants to install the mods by hand, it is easy to edit and is small. Please note that XML requires a lot of additional tags and rules to be valid. There is no advantage in that for the user.
  

The Administrator.
Back to top
WWW  
IP Logged
 
[Unknown]
New Member
*
Offline



Posts: 7
Location: Los Angeles, California
Joined: Dec 27th, 2002
Gender: Male
Re: XML Version of mods
Reply #8 - Dec 27th, 2002 at 1:53pm
Print Post  
The current standard looks like it was put together quickly by a lazy person.  I think putting it into XML would allow for more features and better compatibility.

-[Unknown]
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: XML Version of mods
Reply #9 - Dec 27th, 2002 at 1:54pm
Print Post  
why?
  

The Administrator.
Back to top
WWW  
IP Logged
 
Tea-Master
Forum Administrator
*****
Offline



Posts: 1945
Location: north germany
Joined: Oct 21st, 2001
Gender: Male
Re: XML Version of mods
Reply #10 - Dec 27th, 2002 at 2:19pm
Print Post  
as michael said we already discussed this idea and we came to the end that we'll leave it as it is...

it sounds a lil' like it's new=>it's better as u young guys ever tell us old ones Wink *LOL* ok i'm 21 Tongue

nah i mean XML is a nice thing but there is no need IMO... it doesn't have that big advantages.

but if you're interessted in our previous discussions feel free to read them.

http://sourceforge.net/mailarchive/forum.php?thread_id=1132448&forum_id=11479
http://sourceforge.net/mailarchive/forum.php?thread_id=1132973&forum_id=11479
http://sourceforge.net/mailarchive/forum.php?thread_id=1428609&forum_id=11479

and plz do not hestitate to try to convince us that XML has much more advantages!
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: XML Version of mods
Reply #11 - Dec 27th, 2002 at 2:42pm
Print Post  
Here is a small overview of the the current advantages:

<table border=1 align=center><tr><td><font size=2><b>Property</b></font></td><td><font size=2><b>current format</b></font></td><td><font size=2><b>XML format</b></font></td></tr><tr><td><font size=2>easy to create</font></td><td><font size=2>X</font></td><td><font size=2>-</font></td></tr><tr><td><font size=2>easy to edit</font></td><td><font size=2>X</font></td><td><font size=2>-</font></td></tr><tr><td><font size=2>easy to read</font></td><td><font size=2>X</font></td><td><font size=2></font>-</td></tr><tr><td><font size=2>"good style" (programming point of view)</font></td><td><font size=2>-</font></td><td><font size=2>X</font></td></tr><tr><td><font size=2>easy to validate</font></td><td><font size=2>X</font></td><td><font size=2>X</font></td></tr><tr><td><font size=2>essy to extend</font></td><td><font size=2>X</font></td><td><font size=2>X</font></td></tr><tr><td><font size=2>small filesize</font></td><td><font size=2>X</font></td><td><font size=2>-</font></td></tr><tr><td><font size=2>easy to implement</font></td><td><font size=2>X</font></td><td><font size=2>X</font></td></tr></table>

Please note that it extremely important that the mod can easily be modified/read/created without any special software because this is the ONLY way to get more than a couple of people to make mods!

#enable_html
  

The Administrator.
Back to top
WWW  
IP Logged
 
[Unknown]
New Member
*
Offline



Posts: 7
Location: Los Angeles, California
Joined: Dec 27th, 2002
Gender: Male
Re: XML Version of mods
Reply #12 - Dec 27th, 2002 at 2:55pm
Print Post  
So, in other words you are saying a text file is better than HTML, just 'cuz it's easier.

Well, in that case, why not support both?  The advantages of XML (better tag support, parsing and error checking...) could be available to those willing to write it (or fill out a simple script/program).... and the old format would be available for those who were too lazy for the new one.

Mind you, this /could/ be confusing... unless it was made transparent.  If the first line of the .mod file is <?xml version="1.0"?>, it's xml.

Further, the <search for> sytax can get problematic... YaBBSE's manager won't recognize <Search for>, a problem that could be fixed with xml. (mind you, I realize it's SE's manager's fault.)

Further, you say it can be made in a text editor - well so can xml... Microsoft even has an XML Notepad especially for xml.  (although I prefer writing it in Notepad.)

What's more is that we aren't talking about people who know nothing about the field here - I would assume that anyone who makes a mod knows at least some Perl or PHP.  XML is no stranger monster... in fact, from what I know of Perl, I would say xml is easier than Perl.

Of course, it's 6:53 am, and I haven't slept yet... so likely I'm not making any sense... but still, I think it could be a good thing.

-[Unknown]
  
Back to top
WWW  
IP Logged
 
[Unknown]
New Member
*
Offline



Posts: 7
Location: Los Angeles, California
Joined: Dec 27th, 2002
Gender: Male
Re: XML Version of mods
Reply #13 - Dec 27th, 2002 at 2:58pm
Print Post  
Quote:
Here is a small overview of the the current advantages:
Property current format XML format
easy to create X -
easy to edit X -
easy to read X -
"good style" (programming point of view) - X
easy to validate X X
essy to extend X X
small filesize X -
easy to implement X X

Please note that it extremely important that the mod can easily be modified/read/created without any special software because this is the ONLY way to get more than a couple of people to make mods!


I must disagree. here's how I see it.
Property current format XML format
easy to create 5 3
easy to edit 5 4
easy to read 3 5
"good style" (programming point of view) 1 5
easy to validate 3 4
essy to extend 3 4
small filesize 4 3
easy to implement 4 4

-[Unknown]
  
Back to top
WWW  
IP Logged
 
Administrator
Forum Administrator
*****
Offline


Yummm

Posts: 7
Location: Modders Rile
Joined: Oct 7th, 2014
Gender: Male
Re: XML Version of mods
Reply #14 - Dec 27th, 2002 at 3:12pm
Print Post  
Quote:
So, in other words you are saying a text file is better than HTML, just 'cuz it's easier.
Exactly. We don't have need for "HTML" here. People are familiar with writing "text" rather than "html". Our aim is to make it as easy as possible for the user, NOT the programmer.

Quote:
Well, in that case, why not support both?  The advantages of XML (better tag support, parsing and error checking...) could be available to those willing to write it (or fill out a simple script/program).... and the old format would be available for those who were too lazy for the new one.
That's an interesting idea, however it only makes sence when you have real advantages compared to the old format. And I think that's the problem. Why would the tag support be better? Why parsing and error checking? The current format only requires VERY basic programming skills for writing a good parser.

Quote:
Mind you, this /could/ be confusing... unless it was made transparent.  If the first line of the .mod file is <?xml version="1.0"?>, it's xml.
Seeing the difference isn't a problem for a programmer. But what about the user who never saw XML, php or even perl?

Quote:
Further, the <search for> sytax can get problematic... YaBBSE's manager won't recognize <Search for>, a problem that could be fixed with xml. (mind you, I realize it's SE's manager's fault.)
As I said, only very basic programming skills are required to write a proper implementation.

Quote:
Further, you say it can be made in a text editor - well so can xml... Microsoft even has an XML Notepad especially for xml.  (although I prefer writing it in Notepad.)

What's more is that we aren't talking about people who know nothing about the field here - I would assume that anyone who makes a mod knows at least some Perl or PHP.  XML is no stranger monster... in fact, from what I know of Perl, I would say xml is easier than Perl.
You assume the user is a programmer, I don't! Sure, XML is easy, for sure easier than perl. But most users don't have clue about programming at all. Most barely know html! Just go through the support boards and look at the questions. They ask about the very basic and are unable to handle to smallest bit of programming themselfs. Of course there are exceptions, but still they are "exceptions". You can't assume the user is skilled in this field.

Quote:
Of course, it's 6:53 am, and I haven't slept yet
Get some sleep, this topic won't run away so fast Wink
  

The Administrator.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint