Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Alternative Civs > Clash of Civilizations > Online Technology Editor
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
04.Sep: `FC` 2.0.5 COMPLETED AND RELEASED
27.Jul: `FC` 2.0.4 COMPLETED AND RELEASED
16.Jul: `FC` 2.0.3 COMPLETED AND RELEASED

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Richard Bruns is offline Richard Bruns
King
NC, USA
Nov 1999
time: 06:16
  Old Post 12-12-2001 07:51 Visit Richard Bruns's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Online Technology Editor Support Apolyton, buy Galactic Civilizations: Deluxe Edition

After what has easily been the most grueling programming project in my life, I have finally finished Version 1.0 of my ASP XML Technology editor. I don't think its too shabby considering I barely knew any HTML at the beginning of the semester and I had to research all the XML stuff myself.

Check it out.

I will also put a link to it on my Clash website, which can be recched simply by clicking the "www" link in any of my posts.

Current Functionality:
1) View, modify and rename any XML file on the server.
2) View all parts of the XML file in an XSL formatted table. This includes globals, technologies and helpers, applications and required techs, and activities and recipients.
3) Modify any of the above values in the XML file.

Current Limitations
1) If you want to view anything other than Simple_Tech_Test.xml, you have to know the name of the file and type it in. (There isn't much else up there anyway)
2) It can't yet add and delete any records/nodes; you are limited to modifying the ones already in the table.
3) There is no input validation at all.

Soon I hope to deal with those limitations. I should also think about making the pages look better.

Feedback would be appreciated. I turned it in as my Honors project when it was only half done, and my teacher said it surpassed expectations. But that was only the second level programming class. What do you guys think? Can we use this?

Last edited by Richard Bruns on 12-12-2001 at 07:58

Mark_Everson is offline Mark_Everson
Clash of Civilizations Project Lead
Canton, MI
Jan 1970
time: 00:16
  Old Post 12-12-2001 08:00 Visit Mark_Everson's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

Hi Richard:

It looks pretty cool. I didn't play with anything since I am too tired .

What is ASP?

Cya,

Mark

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:16
Thumbs up  Old Post 12-12-2001 12:52
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

The XSL is nice! Can't think of anything to add.
Mark, ASP is Active Server Pages. It's a way to process data on the server based on some request rather than e.g. sending an applet code to run on the client.
I'll post comments about the content in another thread.

About modification/creation:
Richard, if you could add a button or something for "new activity" and so on in the Modify form, it would be nice.
I am puzzled as to why your example file displays fine in Netscape but a modified file doesn't.
It would be cool to put in a few carriage returns in the generated xml should some fool (like me) try to read it (I had to insert returns by hand before viewing it with my favorite editor). Admittedly, this is hardly important.

Richard Bruns is offline Richard Bruns
King
NC, USA
Nov 1999
time: 06:16
  Old Post 12-12-2001 20:00 Visit Richard Bruns's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Get a bigger avatar today!

quote:
Originally posted by LDiCesare
Richard, if you could add a button or something for "new activity" and so on in the Modify form, it would be nice.

As I said, adding new stuff is on my "to-do" list. I was thinking of giving the user the option of generating the input form with a lot of blank input boxes under the filled-in ones. That way the parser would just read them all at once and save me a lot of trouble. I'd make the parser ignore the tech if the name box was blank, so that also gives the delete functionality we need.

quote:
I am puzzled as to why your example file displays fine in Netscape but a modified file doesn't.

Are you talking about displaying in the editor or viewing the straight XML file?

If the editor, that may be due to the fact that I broke all the rules of proper table generation. I have one sub procedure that dynamically draws each table with input elements from the XML file, so the number of columns is not constant throughout the table. Internet Explorer autimatically corrects for this, but Netscape may not. If it is a problem, I may have to write a different procedure for every part of the tech file, and manually insert extra formatting instructions to make a proper table.

If the problem is displaying the XML file, it may be due to the fact that the XML file generated by the code is one long unformatted string, while the example file is formatted nicely (I wrote it by hand.) I have to figure out how to make the editor format the file.

quote:
It would be cool to put in a few carriage returns in the generated xml should some fool (like me) try to read it (I had to insert returns by hand before viewing it with my favorite editor).

I would gladly do this if I knew how. Do you know the VB code for this off the top of your head?

When messing with a different tech file, I noticed that the editor only displays the first word of a technology; it cuts off anything after a space. I'll have to fix that as well.

Also I will need to optimize the code to try to get it to run faster. But that can wait until after the thing does what it is supposed to.

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:16
  Old Post 12-12-2001 21:00
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Browse Apolyton AD-FREE

quote:
Do you know the VB code for this off the top of your head?

Not really but it depends on what function you call. You can add (Chr(13) + Chr(10)) to the string you write, which is line-feed + carriage-return (Windows being *@!# to use 2 characters instead of one). If tat doesn't work, which method do you call to write your file? I think Write (but not Print) puts one at the end automatically, but calling it more than once would probably be bad in terms of performance.

Richard Bruns is offline Richard Bruns
King
NC, USA
Nov 1999
time: 06:16
  Old Post 12-12-2001 21:16 Visit Richard Bruns's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton buy from Amazon

quote:
Originally posted by LDiCesare
I think Write (but not Print) puts one at the end automatically, but calling it more than once would probably be bad in terms of performance.


I tried writing out the XML file like that, but it requires using the Filesystem object and that was hideously slow. It took (I timed this) two seconds for every line that I wrote to the file. So now I am loading all the data into a DOM parser and saving it by:

objDom.Save (Server.MapPath(datafile))

This runs a lot faster, but I can't figure out how to format it nicely. The stuff is loaded into the DOM with a plethora of procedures like this:

Sub SetTechValue(detailname, number)

Set Detail = objDom.createElement(detailname)
Entry.appendChild Detail
Detail.Text = Request.Form("technology" & detailname & number)

End Sub

I can't figure out where or how I put code in to make the output look nice. I guess I'll have to keep trawling the web.

Richard Bruns is offline Richard Bruns
King
NC, USA
Nov 1999
time: 06:16
  Old Post 13-12-2001 20:33 Visit Richard Bruns's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Update Got spare money?

Users now have the ability to add any number of new entries of any kind. From the start screen, you enter how many new entries you want, and what default values you want the new entries to have. This makes it easy to enter large amounts of data at once with only a few mouse clicks.

You can also delete any entry by simply erasing its name before you click "submit."

I have also fixed the bug that caused it to only display the first word of a name with spaces. Now the thing is actually a useful tool. It can do anything required to build up and edit the file, assuming the users know what they are doing. There is still no input validation, nor is there likely to be for a while.

Next, I need to modify it to deal with the changes in the XML file. I also need to come up with a better file management system and see if I can get output that is formatted to be human-readable.

Gary Thomas is offline Gary Thomas
Prince
New Zealand
Mar 2001
time: 17:16
  Old Post 13-12-2001 21:45
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

A truly impressive effort!

Of course we naturally are now thinking in terms of online editors for military material, maps, scenarios and the like.

How about it?

Cheers

Richard Bruns is offline Richard Bruns
King
NC, USA
Nov 1999
time: 06:16
  Old Post 13-12-2001 22:54 Visit Richard Bruns's homepage!
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Enter the AD-FREE zone

I could probably adapt this to other XML files, like the military one, without too much trouble. But don't be fooled into thinking that this is anything other than a fancy XML file generator. It was designed to replace Notepad as an XML editing tool.

I wouldn't have a clue about how to do maps or any graphical stuff. This is all server-side, no scripting, which means that interactivity is close to nil.

All the entries have to be input at once, since the thing basically builds the XML file from nothing based on what is in the textbox elements. If you save to the same filename, it simply overwrites what is there. I haven't figured out how to load a file and only edit or change part of it.

Also, this thing is incapable of changing the structure of the XML file or any of the tag names. It relies on knowing exactly what the names of the tags are and how they are structured. Each and every one of those textboxes has to have a unique and loopable name.

I've only had one semester of VB and one for VB script, and XML wasn't in those classes at all. This thing is pushing my abilities to the limit.

Which, of course, makes it a lot of fun to work on.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:16.
Apolyton Time is 00:16.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0353 seconds (89.48% PHP - 10.52% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net