'dflemstr' said:
OK, I'm sorry to have brought this up in the way I did. It's just that I have used alot of application frameworks and utilities that use XML. XML is there for a reason, and that is that it should be possible for any application to use the data provided by the XML file, and making it easy to use a format.
I do not see what I said as moaning. I only tried to highlight problems that will happen, sooner or later, because the PXML format has alot of problems. (For example: What happens with multiple standalone tags? What if you want to associate the app with MIME types and not only extensions? How does the format handle encodings other than UTF-8 (for languages other than english)? etc) This rises alot of problems for a programmer, and for someone who would like to write a PXML file.
You make some very good points, and I think your proposal is more "proper" than the way it is going to be done.
But it doesn't matter. lib_pnd is available for use, and the issues you brought up(like the one below) can be handled by a more lenient or smarter parser.
'dflemstr' said:
1. You use specific tags for language instead of "xml:lang". This means that the menu program needs to know ALL the ISO codes in the world and look for them just to translate the menu.
Proposal: Instead of "<description><de_DE>....", PLEASE use "<description xml:lang="de_DE">...."
There is no reason it has to know all the possible ISO codes. It simply has to look in <description> for a tag with a language matching the one currently used on the Pandora. Easy peasy.
Current user is on "en_UK" - look for "en_UK"; no "en_UK" found; look for "en_"; found "en_US".
'dflemstr' said:
I could volunteer to not only make a format that is compatible across all platforms, fully XML compatible, with a XSD spec, and with a C library function (no library needed) that can parse this file and give the result as a struct. Anyone else in the community could of course help with this.
We could even make it like this: The current PXML format continues to exist, until I release the new version (in max 3 days or so), and if I don't make it, I will stop complaining and just accept the current format.
What does everyone think about that?
I'm inclined to say... if it works currently, leave it be. It's just personal preference. For many people, less symbols is simpler, and xml:lang="en_US" is more complex than <en_US></en_US>
I have a bit of experience with XML parsers - not proper ones, though. I wrote a lenient/smart one a few years ago. It can read any compliant XML files, but it also supports one additional feature:
non-escaped tags.
CODE
<smartxml>
<explanation>Use the <explanation> and </explanation> tags to enter an explanation.</explanation>
<explanation>Do not forget to include the closing tag, </explanation>
</explanation>
</smartxml>
Unfortunately, nothing else could figure the files out, so I ended up adding escaping to my XML writer. (which the reader handled fine too - fully compliant.
)
For image-flipping previews, I'd do something like this:
CODE
// Flip pictures every 6 seconds.
<preview repeat="yes" time="6000">
<pic>Pic_01.png</pic>
<pic>Pic_02.png</pic>
<pic>Pic_03.png</pic>
</preview>
CODE
// Short Animation, wait 6 seconds, another short animation
<preview repeat="yes" time="6000">
<pic time="20">Pic_01.png</pic>
<pic time="20">Pic_02.png</pic>
<pic time="20">Pic_03.png</pic>
<pic time="20">Pic_04.png</pic>
<pic time="20">Pic_05.png</pic>
<pic time="20">Pic_06.png</pic>
<pic time="20">Pic_07.png</pic>
<pic>Pic_08.png</pic>
<pic time="20">Pic_11.png</pic>
<pic time="20">Pic_12.png</pic>
<pic time="20">Pic_13.png</pic>
<pic time="20">Pic_14.png</pic>
<pic time="20">Pic_15.png</pic>
<pic time="20">Pic_16.png</pic>
<pic time="20">Pic_17.png</pic>
<pic>Pic_18.png</pic>
</preview>
I don't care how image flipping is implemented, but it would be useful to have.