PDA

View Full Version : Intermediate <id-00000> entries in XML library files?



demonsbane
March 28th, 2011, 18:40
Maybe any of you can help me with this question:

In an XML file for a FG2 library, do you know how to add an intermediate entry between <id-00054> and <id-00055>, for instance?

I have some large libraries and it is a real pain the need to change manually most of the id-numbers for the entries just because an update to the XML file consisting in the addition of a few new entries between <id-00054> and <id-00055> in a XML file containing about 200+.

(Writing fractions isn't working here, nor writing <id-000541> as an intermediate entry between <id-00054> and <id-00055>).

This issue is bogging me down a lot regarding the creation of FG2 Libraries. I appreciate any help.

Regards

Stitched
March 28th, 2011, 20:01
Does the id numbering matter? I think the entries that appear in FG2 get sorted alphabetically, regardless, of order in the XML.

I could be wrong, of course.



Maybe any of you can help me with this question:

In an XML file for a FG2 library, do you know how to add an intermediate entry between <id-00054> and <id-00055>, for instance?

I have some large libraries and it is a real pain the need to change manually most of the id-numbers for the entries just because an update to the XML file consisting in the addition of a few new entries between <id-00054> and <id-00055> in a XML file containing about 200+.

(Writing fractions isn't working here, nor writing <id-000541> as an intermediate entry between <id-00054> and <id-00055>).

This issue is bogging me down a lot regarding the creation of FG2 Libraries. I appreciate any help.

Regards

cpbs
March 28th, 2011, 20:15
Technically it does not matter where you put it <id-xxxx> inside the list, it will list them in numerical order.

So if you wanted to put something in between <id-00054> and <id-00055> then all you need to do is put another <-> like <id-00054-1> etc. You can even put this at the end of the who list in the module instead of trying to cut and past it in between items so when FGII reads it, it will auto list in the library.

This at least works for me in 3.5 library but I think it works for all rulesets.

Zeus
March 28th, 2011, 20:39
Real numbers might also work e.g. <id-00041.5>, I seem to remember trying this myself in the distant past but can't remember if it worked or not. Give it a try and let us know.

Having said that the display order of lists is not necessarily tied to the database node's name. The display order is actually determined by the windowlists onSortCompare() method and how it determines the sorting for the list.

e.g. nodename1 > nodename2 or perhaps a specific field field1 > field2

i believe the default behaviour for onSortCompare(), if not defined, is set to compare node names, however it really depends on how the windowclass is defined and what ordering the author put in place when the ruleset was written.

demonsbane
March 28th, 2011, 21:17
Does the id numbering matter? I think the entries that appear in FG2 get sorted alphabetically, regardless, of order in the XML.

I could be wrong, of course.

Yes, the id-numbering matters. I don't use the option of sorting the entries alphabetically because that overrides the order that I put in the entries. By following the id-numbers, the entries are displayed according to their numerical order.


Real numbers might also work e.g. <id-00041.5>, I seem to remember trying this myself in the distant past but can't remember if it worked or not. Give it a try and let us know. (. . .)

Last time that I tried decimal numbers, it wasn't working. Anyway thanks for your answer, DrZeuss!



Technically it does not matter where you put it <id-xxxx> inside the list, it will list them in numerical order.

So if you wanted to put something in between <id-00054> and <id-00055> then all you need to do is put another <-> like <id-00054-1> etc.

Yes, this works: I just tested it. Great!

Thank you very much.

Greetings

Griogre
March 29th, 2011, 05:45
You can also do something like <id-00054a> and use alpha characters.

demonsbane
March 29th, 2011, 11:58
You can also do something like <id-00054a> and use alpha characters.

I'm jotting down this, too. Thank you Griogre.