Boat Parameter Schema - Help needed

Virtual Skipper 5 offer the possibility to import own boat 3D models.<br>
3D artists and players can now meet here to share models and advices.<br>
Virtual Skipper 5 offre la possibilité d'importer vos propres modèles 3D de bateaux.<br>
Les artistes 3D et les joueurs peuvent maintenant se réunir ici pour partager leurs modèles et conseils.
Locked
User avatar
CANKnot
Moderator
Posts: 1320
Joined: 09 Nov 2005, 22:21

Boat Parameter Schema - Help needed

Post by CANKnot »

I was wondering if the people working on boat models would be willing to send me their BoatParam.xml files?

I had asked for a schema file for the boat param files, but that doesn't seem to be forthcoming so I have generated a schema that can validate both the example BoatParam.xml file included with the importer and the ACC parameter file Sunburn posted. But I don't know if those two files captures all the ways the XML elements can be used. The more example parameter files I have to work with the better the resulting schema will be.

The schema that I have so far can be downloaded here. How you use the schema (if you do) will depend on what program you are using to edit the parameter file. Most XML editors will have some way to "Associate" a schema with an XML file.

Why should anyone care about an XML schema? Because it should make editing the parameter files much easier. XML editors can use the schema for auto-completion (i.e. add a "Sail" element and the editor automagically adds all the right tags in the right order) and to help catch things that will cause the boat importer or VSK to crash. If your parameter file does contain errors a schema will allow an XML editor to highlight the error and (hopefully) provide some sort of meaningful error messages.

I have also written a very simple program that will validate a boat parameter file with the schema for people using non-XML editors (Notepad etc.) You can get the BoatCheck program here. The Java source code is also available. The boatcheck program requires Java 5 and runs from the command line. Put the boatcheck.exe somewhere on the Window's path or in the same directory as the BoatParam.xml file. Open a command window and enter

C:\> boatcheck BoatParam.xml

or whatever the name of your boat parameter file is. The program will either tell you that you boat parameter file is likely correct or it will print one or more error messages. Sorry for the error messages, I have no control over them, and they make take some practice to decipher, but at least it will give you the line number to look at!

At the moment the boatcheck program does not check the contents of the elements, simply the structure of the XML. For example, you can put in any text as the BoatType, but VSK only excepts a few values. I hope to refine the schema once I have the structure worked out.

Once I have a working schema I hope to be able to create a visual editor for the boat parameter file that will free people from the need to muck around in XML, but I am not going to attempt that without a schema.

Cheers,
Keith
In theory there is no difference between theory and practice, but in practice there is.
User avatar
CANKnot
Moderator
Posts: 1320
Joined: 09 Nov 2005, 22:21

Post by CANKnot »

I would like to thank the people that have offered to send me their parameter files and want to point out that I will not divulge any information from the parameter files or make anyone's parameter files available to anyone else. Anything submitted will be held in the strictest confidence and the only thing I will release is a schema that is able to validate all the submitted parameter files. The schema(s) I generate will be free for all to use.

I should add that I am only interested in parameter files that don't cause VSK or the boat importer to crash! Please only send parameter files that VSK thinks are correct. Also, it is not important to have a final working version of your parameter file, that is I don't care if the parameter file you send makes your boat model sail like a brick as long as the elements you use are used in the way they will be in the final model. I don't care what the values of all the <Xs> and <Ys> are, as long as you have put them in the correct places.

PM me and I will send you my email address to submit parameter files.

Thanks,
Keith
In theory there is no difference between theory and practice, but in practice there is.
GBR13697
Capitaine
Posts: 153
Joined: 28 Oct 2005, 10:20

Post by GBR13697 »

CANKnot
Will be happy to send you my Fireball file shortly, but completion of the Spinnaker section is still a bit sparse. There is no spinnaker on the Sample Boat, so this section starts from scratch. It will probably be more use to you when it is more complete, and actually capable of making a spinnaker work!
GBR13697
Locked