(keitai-l) Re: open source keitai tools (was Re: Re: western phone, imode si

From: Nick May <nick_at_kyushu.com>
Date: 02/26/02
Message-id: <fc.000f761000068de83b9aca0047ed4f5a.68deb@kyushunet.com>
keitai-l@appelsiini.net writes:
From a memory/parsing pont of view I can see why "fall_back" is used, but
it's really not very elegant or XML-like.  Why not just make the devices
nestable where children inherit values from their immediate parent?

<device id="default">
    <parameter id="W">W</parameter>
    <device id="imode">
        <parameter id="X">X</parameter>
        <device id="502i>
            <parameter id="Y">Y</parameter>
            <device id="SO502i">
                <parameter id="Z">Z</parameter>
            </device>
        </device>
    </device>
</device>

I can't comment on "how xml-like it is", but it seems a little harder for
human parsing (this human) because of all the nesting. That is not to say
I commend the "fall back" method particularly.

The only real drawback I can see for this is that parsing it would probably
be memory intensive.  However, the XML file could be used to comple a
handler class and bunch of ResouceBundles along the lines of
java.util.Locale

My feeling is that ease of maintenance and clarity (to humans) is the most
important feature. The xml file should not be written with a particular
language in mind or to be fast to parse in Java, or whatever, if that
makes maintenance harder.

Is it not better that each language takes the xml file and parses it into
whatever form it pleases? (as I think Mika T suggested).

leap@gol.com writes
If you really want close alignment between your
XML inheritance hierarchy and instantiations of Java

So I feel that this is specifically "NOT" something we should worry about
too much...

Nick
Received on Tue Feb 26 13:31:19 2002