[Pipet Devel] Re: Comment on Re: The Loci Project

J.W. Bizzaro bizzaro at bc.edu
Tue Jun 1 19:44:59 EDT 1999


This has turned into an interesting discussion on the purpose and use of XML. 
It would be nice to hear more opinions.

Your point that XML "is to represent data that is obvious to humans but hard for
computers" is well understood, but how about visa versa?  Can XML be used to
represent data that is hard for humans but obvious for computers?  I can think
of one case where a complete GUI is represented not by C or Java, but by XML.

Here is a simple GUI, a button in a window, made with an IDE called "GLADE"":

------------------8<---------------------
<?xml version="1.0"?>
<GTK-Interface>

<project>
  <name>project1</name>
  <directory></directory>
  <source_directory></source_directory>
  <pixmaps_directory>pixmaps</pixmaps_directory>
  <language>C</language>
  <gettext_support>False</gettext_support>
  <use_widget_names>False</use_widget_names>
  <main_source_file>gladesrc.c</main_source_file>
  <main_header_file>gladesrc.h</main_header_file>
  <handler_source_file>gladesig.c</handler_source_file>
  <handler_header_file>gladesig.h</handler_header_file>
</project>

<widget>
  <class>GtkWindow</class>
  <name>window1</name>
  <title>window1</title>
  <type>GTK_WINDOW_TOPLEVEL</type>
  <position>GTK_WIN_POS_NONE</position>
  <allow_shrink>True</allow_shrink>
  <allow_grow>True</allow_grow>
  <auto_shrink>False</auto_shrink>

  <widget>
    <class>GtkFixed</class>
    <name>fixed1</name>

    <widget>
      <class>GtkButton</class>
      <name>button1</name>
      <x>32</x>
      <y>16</y>
      <width>112</width>
      <height>40</height>
      <can_focus>True</can_focus>
      <label>button1</label>
    </widget>
  </widget>
</widget>

</GTK-Interface>
------------------8<---------------------

If you know anything about even HTML, you've got an idea as to how this works. 
And it is LANGUAGE INDEPENDENT!  Could it be argued that this use of XML is
"illegal" and should not have been done?

XML/SGML is a fantastic middle ground between human and computer and works both
ways.  Limiting it to document and database markup for Web-based applications
would be a shame.


:-)
Jeff
-- 
J.W. Bizzaro                  mailto:bizzaro at bc.edu
Boston College Chemistry      http://www.uml.edu/Dept/Chem/Bizzaro/
--




More information about the Pipet-Devel mailing list