Inserting into XML tables at arbitrary points

Brian Ablaza bablaza at stargroup1.com
Tue Mar 19 13:43:33 PST 2002


>
>In one, I break the interface to XML tables, which is a bad thing. 
>That would be treating the table where I'm inserting as a plain-old 
>Frontier table, ie someTable[5], changing the name by incrementing 
>the serial numbers in the names of the sub tables:
>
>000050000\tfoo -> 000060000\tfoo,
>000060000\tbar -> 000070000\tbar,
>etc.
>
>Creating the new subtable for the new element for position 5, and 
>renaming it to 000050000\tnewElement.
>
>This breaks when Userland changes the interface to XML tables.

I may be presuming here, but I think you're making bad assumptions.

I always thought that the reason for the 9-digit number with digits 
in the middle of zeros for object names in Frontier xml tables was 
specifically to address your issue. After all, Userland could have 
chosen to name element 5 "000000005\tfoo".

If you need to insert an element between element 5 and element 6, 
just preface it with 000050010 (or some such). You can therefore 
insert up to 9,999 elements between element 5 and element 6.

I have never seen any documentation to indicate that there is a 
permanent relationship between the name of the xml object and its 
index in the table, so I don't think anything will break. In fact, I 
believe that the more important function of the leading number string 
is to allow objects with the same name to co-exist in the same table 
(something that is not permitted in Frontier, but is common in xml). 
So it may not matter at all to Userland what those leading 9 
characters are, as long as they make a unique name.

'Course, I could be wrong.

Brian Ablaza
Chief Technology Officer
Star Interactive

856.488.2015




More information about the Frontier-Users mailing list