GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




xmltoolkit concat problems

Click to view RSS...
Author
Posted Friday, October 11, 2013 - Post #32599
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 9:34 PM
Posts: 1,589, Visits: 32,062
Running the toolkit produced this error message
Error at line 1380, position 8 (Toolkit.js): Expected token ')' found 'NAME'.

Places/Place[Name=concat("33, ",'"',"the Albany" -->Albany <--Road, Camberwell","")]
    msxml6.dll 80004005
   
Looking at line 1380 the problem is because of quote marks.

The address it is trying to resolve is
33, "the Albany" Albany Road, Camberwell

The xml file reads
 <custom_tag1>33, &quot;the Albany&quot; Albany Road, Camberwell</custom_tag1>

Changing "the Albany" to the Albany (just the one family) allowed the toolkit to run. Have just thought that using a single quote might have worked and been a better alternative.
Posted Friday, October 11, 2013 - Post #32601
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 hours ago
Posts: 3,428, Visits: 26,566
Yes my code is a bit half baked here. The replace method call should be replacing all occurrences of double quotes not just the first one.  I can fix that. 


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Monday, October 14, 2013 - Post #32607
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 9:34 PM
Posts: 1,589, Visits: 32,062
One step forward; two steps back
Having got the toolkit to run, the resulting xml file causes problems for GenoPro. On being imported  there is a message
Error at line 931313: Duplicate ID 'place07422' for object Place

The error log shows many lines of the type
Error at line 1006199: Duplicate ID 'contact04921' for object Contact.

Despite all this noise it reports
'Import complete with 0 errors!'

Looking at the xml file line 931313 is extremely long but when cut and re-pasted consists of over 8000 line of the this sort (3 lines here)
    <Contacts><Contact ID="contact00001"><Place>place03369</Place></Contact><Contact ID="contact00002"><Place>place03370</Place></Contact><Contact ID="contact00003"><Place>place03371</Place></Contact><Contact ID="contact00004"><Place>place03371</Place></Contact><Contact ID="contact00005"><Place>place03372</Place></Contact><Contact ID="contact00006"><Place>place03372</Place></Contact><Contact ID="contact00007"><Place>place03372</Place></Contact><Contact ID="contact00008"><Place>place03372</Place></Contact><Contact

I should say that the large file I am trying to process has been created from several sources including direct input; gedcom from other people and gedcom created from translation of htm files. In case this is a sourcs of problems I have just run the toolkit on such a file of 700 individuals without problems
Posted Monday, October 14, 2013 - Post #32608
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 hours ago
Posts: 3,428, Visits: 26,566
Having reviewed the code involved here, (written some while back!) I can see there is a potential issue with newly allocated IDs if the .gno tables are not sorted in ID order or the numeric part of the ID exceeds 99999.  At present the code takes the ID of the last record of that type and adds one to it and assumes it will be below 100000.  If the list is not in ascending numerical order then a duplicate can occur.

However I think GenoPro re-allocates IDs when a duplicate is found (you can also reset them yourself by erasing the contents of the ID column in table view and then saving the .gno)  and so this is perhaps why 0 errors are reported and therefore perhaps no harm done.

I'll see if I can improve the code to avoid this in future.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Edited: Monday, October 14, 2013 by genome
Posted Monday, October 14, 2013 - Post #32609
Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: Yesterday @ 9:34 PM
Posts: 1,589, Visits: 32,062
Deleted ind & fam IDs but problem remains. Highest ID is ind35234. The xml file appears to be in Individual order.
Would the file help?
Posted Monday, October 14, 2013 - Post #32610
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 4 hours ago
Posts: 3,428, Visits: 26,566
Its the Place and Contact records that need to be in ID order or maybe whose IDs are deleted to hopefully circumvent the problem as this is where the new records get created by the Toolkit.  

You can send the file via PM or GenoPro's File/Send to me (genome) if you like and I will use it to test my theory and solution.  As I say I think I Know where the problem lies but also I want to add the HTA tabbed dialogue so a new version may be a week or so away, but could be sooner. Whistling


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse
Active: 2 - 1 guest, 0 members, 0 anonymous.
Refresh
No members currently viewing this topic!