C++ and XML...

Kit Plummer plug-devel@lists.PLUG.phoenix.az.us
Mon Jul 16 10:59:00 2001


The basic XML structure would look something like the following:

<xml file>
----------

<?xml version="1.0"?>
	<!-- preflight checklist prompts -->
	<preflight>
		<prompt>
			<question>Aircraft Documents?</question>	
			<answer>Check</answer>
		</prompt>
		<prompt>
			<question>Battery On?</question>
			<answer>Check</answer>
		</prompt>
		<prompt>
			<question>Flaps Down?</question>
			<answer>Check</answer>
		</prompt>
	</preflight>

----------
<xml file>

Granted this is an extremely stripped down checklist, but it would do in
the scheme of prototyping.  Also, there would be another root structure
for other checklists like emergency.

The menu structure to get to the various checklists would be hardcoded
rather than pulled from a file because it would be the same regardless
of aircraft.

Anyway, what I think is to happen is:

- The app is in a wait state, prompting for checklist name (preflight).

- Once (preflight) is entered, the checklist is parsed and then cycled
sequentially until the hash is complete.  NOTE: Future consideration
will need to be given to the fact that it is possible for a negative
answer.  In that case the given point in the checklist will need to be
marked in memory.  I haven't thought about this much...

I am working on a formal DTD and XML files for each checklist.  I should
be able to finalize something within the next couple of days. (I have to
teach class today and tomorrow.)

Kit

On 17 Jul 2001 12:13:41 -0700, Rob Wehrli wrote:
> Kit Plummer wrote:
> > 
> > Thanks Rob.  We are working on the DTD now.  For simple prototyping I
> > have been using Perl and and module called XML::Simple which simply
> > pulls the XML from a declared file and puts into a hash.
> 
> I'm not against PERL, especially for a rapid prototype, however, if that
> is the case, then Java is probably a better choice; especially since the
> ViaVoice SDK is available for Java--if my memory serves me correctly.
> 
> I tend to like C++/C for speed and for integration into X-based GUI
> apps...though, in this case, it doesn't "sound" as if a GUI is needed
> :)  Given the amount of work I've done in XML using C and C++ under
> Linux, Solaris and PC-Weeniedoze, I'm rather confident that "rapid
> prototyping" is but a few hours rather than a few days.  Why not shoot
> me a sample of the DTD and the XML and I'll create an application; if it
> looks good enough, perhaps we can use it in a "Devel Session" meeting? 
> Everyone here will be able to participate or lurk as desired.  You folks
> can get a view of whether I'm the world's biggest trash talker or have
> my act at least partially together :)
> 
> > 
> > BTW: Although not GPLd, IBM's ViaVoice runs really well on Linux and
> > they have the SDK available for download.  We have done some preliminary
> > testing with that.
> > 
> > Kit
> > 
> 
> Take Care.
> 
> Rob!
> _______________________________________________
> PLUG-devel mailing list  -  PLUG-devel@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>