Traveller Store CotI Features New Posts Mark Forums Read Register

Go Back > Citizens of the Imperium > General Traveller Discussions > Software Solutions

Software Solutions Discussions on Traveller related software.

Thread Tools Display Modes
Old December 27th, 2011, 12:09 PM
robject's Avatar
robject robject is offline
Join Date: Mar 2002
Posts: 13,537
Gallery : 9
Visit robject's Blog
robject has disabled reputation
Default XML Format: Sector Listing

My Goal. Minimally intrusive organization of existing data.

Standard Markup. I need a standard markup language, because I don't want to have to write a custom parser at the file level, and I don't want to force anyone else to write a custom parser at the file level. Writing software is enough work as it is. No reason to bog us down at square one.

XML Format. I don't like XML, but it's universal, and I find I can stand it if it is only lightly used. Which is all I want anyway. Any programming language I use which can parse YAML or JSON can also parse XML just as easily; therefore, I am happy to read and write in all three formats to suit the needs of others.

Light Touch. I've found that a non-intensive, light-touch of XML markup improves sector listings with very little overhead. They're still human-readable, with the bonus of being machine-readable.

The trick is keeping the UWP list as a block of text, rather than pre-parsed data.

Yes, the coder will still have to parse that UWP block. But the initial splitting of the file and parsing its meta-data is done for you. Parsing a block of UWPs is largely a solved problem, and we can blog about how it can be done in generic and specific ways.

Example. I am only including the first few UWPs in the example.

    Alt="Sector iH"
    Milieu="Second Survey"
    Ref="10080 Ring/Ray 62864"

<Subsector Index="A">Pretoria</Subsector>
<Subsector Index="B">Lamas</Subsector>
<Subsector Index="C">Antra</Subsector>
<Subsector Index="D">Million</Subsector>
<Subsector Index="E">Sabine</Subsector>
<Subsector Index="F">Inar</Subsector>
<Subsector Index="G">Dunmag</Subsector>
<Subsector Index="H">Atsah</Subsector>
<Subsector Index="I">Star Lane</Subsector>
<Subsector Index="J">Vincennes</Subsector>
<Subsector Index="K">Usani</Subsector>
<Subsector Index="L">Geniishir</Subsector>
<Subsector Index="M">Gulf</Subsector>
<Subsector Index="N">Zeng</Subsector>
<Subsector Index="O">Kamlar</Subsector>
<Subsector Index="P">Vast Heavens</Subsector>

<Notes />

<Borders>...see Travellermap's API for border formatting</Borders>
<Labels>......see Travellermap's API for label formatting</Labels>
<Routes>...see Travellermap's API for route formatting</Routes>
<Allegiances>...see Travellermap's API for allegiance formatting</Allegiances>

Pack            0102 C680879-5    De Ri                   811 Im G V +M V
Ximenes         0105 B430413-8    De Ni Po                314 Im M V 
Bolivar         0106 D354530-3    Ag Ni                   400 Im K V 
Ranim           0108 C899587-6    Ni                      111 Im G V K V 
Harran          0110 C452332-8    Lo Po                   202 Im G V +M V
Carbuncle       0201 A7308A7-A    De Na Po                902 Im G V 
Graff           0203 B98A7BA-9    Wa                      214 Im M V M V 
Kedin           0204 E423520-5    Ni Po                   311 Im F V K V* 
Iamir           0208 C590A94-8 S  De Hi In                302 Im F V 
Keats           0210 C959314-8    Lo                      111 Im F V G V 
Etienne         0302 B4247CA-B                            900 Im M III -M V 
Wulfe           0303 A52799A-F    Hi In                   802 Im M V M V 
Umkarguu        0305 C575744-4    Ag                      300 Im K V 
Antraillia      0306 D350410-4 S  De Ni Po                402 Im G V 
Leng            0402 C73A210-7    Lo Wa                   601 Im G V M V +M V
Imka            0405 D786688-5    Ag Ni Ri                423 Im G V K V 
Merel           0407 E650416-3    De Ni Po                204 Im K V 
Ninmah          0409 D670835-6    De                      812 Im M V 
(etc etc)

Imperiallines magazine
My Helpful Stuff for Traveller5
IMTU tc+ t5++ 3i(+) au ls+ / OTU 44% an+ dt+ ge- j- jf+ n- pi+ pp+ tr+ tv- uwp+ xb+
Tools Link

Last edited by robject; December 27th, 2011 at 11:55 PM..
Reply With Quote

To see more of this thread, please login or register.


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Survey Schema (Excel <=> XML) Ver. 1 robject Software Solutions 2 August 2nd, 2011 11:06 PM
Excel importing and exporting XML UWP data robject Software Solutions 47 April 18th, 2007 01:41 AM
Subsector Map sizes (on paper), UWP Listing Styles & Sector Maps Gruffty Imperial Interstellar Scout Service 10 January 12th, 2006 07:37 AM
Traveller XML star database tjoneslo Software Solutions 16 November 28th, 2003 03:25 PM

This website and its contents are copyright ©2010-2013 Far Future Enterprises. All rights reserved. Traveller is a registered trademark of Far Future Enterprises .
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright (c) 2010-2013, Far Future Enterprises. All Rights Reserved.