Gtkdialg accepts XML data that is not well-formed

  • Thread starter =?ISO-8859-1?Q?J=FCrgen_Kahrs?=
  • Start date
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

Hello,

I just tried to get the example script of the
Gtkdialog tool running:

http://linux.pte.hu/~pipas/gtkdialog/

This tool claims to use an XML description of
a GUI and run it. Indeed, the example works.
What puzzles me is the fact that the example
is not well-formed XML:

<vbox>
<frame Print fields>
<hbox>
....

I used xmlwf and xmllint and both didnt eat this.
Anyway, Gtkdialog eats it. How can this work ?
 
M

Manuel Collado

Jürgen Kahrs escribió:
Hello,

I just tried to get the example script of the
Gtkdialog tool running:

http://linux.pte.hu/~pipas/gtkdialog/

This tool claims to use an XML description of
a GUI and run it. Indeed, the example works.
What puzzles me is the fact that the example
is not well-formed XML:

<vbox>
<frame Print fields>
<hbox>
...

I used xmlwf and xmllint and both didnt eat this.
Anyway, Gtkdialog eats it. How can this work ?

Well, quoting the Gtkdialog docs:

"The dialog description language is a simple XML like language capable
to denote any complex dialog box containing widgets and boxes. "

So it doesn't claim to be XML, but just XML-like. Probably read with a
simple ad-hoc parser (not an XML compliant one). The source tarball
contains files like "gtkdialog_lexer.c", "gtkdialog_parser.c", etc.

Regards.
 
?

=?ISO-8859-1?Q?J=FCrgen_Kahrs?=

Hello Manuel,
Well, quoting the Gtkdialog docs:

"The dialog description language is a simple XML like language capable
to denote any complex dialog box containing widgets and boxes. "

Thanks for finding this out.
On their web page they introduce the first example
with the sentence.

The following shell script will load and execute a Glade XML file

So, I thought they really use XML files.
So it doesn't claim to be XML, but just XML-like. Probably read with a
simple ad-hoc parser (not an XML compliant one). The source tarball
contains files like "gtkdialog_lexer.c", "gtkdialog_parser.c", etc.

XML-like sounds nice, but it becomes useless when
I cannot parse it with a proper XML parser.
It is incomprehensible to me why someone should
define an XML-like format. Only Microsoft and IBM
can make money by adopting a standard in this way.
 
M

Manuel Collado

Jürgen Kahrs escribió:
Hello Manuel,
...
On their web page they introduce the first example
with the sentence.

The following shell script will load and execute a Glade XML file

So, I thought they really use XML files.

Well, it seems that Gtkdialog accepts two different input formats:

- True-XML glade files (option -g)
- XML-like Gtkdialog files (option -f)
...
XML-like sounds nice, but it becomes useless when
I cannot parse it with a proper XML parser.
It is incomprehensible to me why someone should
define an XML-like format. Only Microsoft and IBM
can make money by adopting a standard in this way.

Yes, it is hurtful (or at least confusing) to invent new file formats and
pretend they are similar and almost-compatible with well stablished
standards, when in fact they aren't.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top