Ron's GenoPro Beta XML to SVG Translator
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 
GenoPro Support Forum
Home        Members    Who's On
Welcome Guest ( Login | Register )
        



Ron's GenoPro Beta XML to SVG Translator Expand / Collapse
Author
Message
Post #7622 Posted 4/7/2005 9:37:33 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 8:14:43 AM
GenoPro Version: 2.0.1.6
Posts: 1,151, Visits: 5,403
From Topic6403-59-1.aspx#1335
I was interested in this discussion on VBScript to convert the xml to svg and followed the instructions ie: made text box, downloaded the two files vbs and xsl, renamed my xml file to match after down loading the viewer but on clicking on the vbs I get an error :-
Script: C:\Complete Family Trees\complete tree\test\gnoxml2svg.vbs
Line: 7
Char: 1
Error: Object required: 'xml'
Code : 800A01A8
Source: Microsoft VBScript runtime error
I am obviously missing something, but as I am a bit of a novice in this stuff I've got a bit lost.
Any ideas where I went wrong.

Sorry Iain, I haven't tested the VBScript for some time (I use msxsl.exe) and you've found the line I slipped in without testing! (slapped wrist :oops: )
Change line 7 from
xml.preserveWhiteSpace = false
to
xsltTree.preserveWhiteSpace = false
. I'll update web page shortly.

P.S. you will also need the 'gzipped' Ecmascript file (gnoxml2svg.esz) that can also be downloaded from my tools page.



'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Post #7623 Posted 8/18/2005 6:50:23 PM


Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 2 days ago @ 7:55:16 AM
GenoPro Version: 2.0.1.6
Posts: 720, Visits: 6,070
First of all thanks to Ron for providing these tools.

Have successfully created a svg file from xml. Unfortunately it stopps opening half way. I can see the frame, the text lines below and above, but inside nothing, since it stopps there. Will your tool work only for Windows XP? I have ME. First I thought it could be because of the viewer version 3.0. I changed to 6.0, same result. Or because of japanese characters (vertical) for some persons?

When selecting a genomap receive following message:
svgdoc.getElementByld(...)* is null or not an object
line: 111, column 15

In another instance the line was 115 and column 8

Checked these lines, but they are empty lines.
Post #7624 Posted 8/18/2005 6:50:23 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 8:14:43 AM
GenoPro Version: 2.0.1.6
Posts: 1,151, Visits: 5,403
When selecting a genomap receive following message:
svgdoc.getElementByld(...)* is null or not an object
line: 111, column 15

The line numbers refer to the Ecma/Javascript gnoxml2svg.es(z). This error one line 115 generally occurs when you have not added the bounding text label box to your GenoMap, as described in http://myweb.tiscali.co.uk/ronsweb/genealogy/tools.htm#tool4 or when the ONLY text within it is not EXACTLY the same as the GenoMap name. Please double check and let me know the result. The xsl gets a list of the GenoMaps and then looks for Labels to size the initial zoom. If no matching label is found then no SVG objects will be generated for that map.

The inner frame will be empty until a valid map is selected. Selecting an invalid map will stop other valid ones from being selected subsequently, as the script then tries to hide the missing invalid map and fails with the error on line 111.

I'll see if I can trap these errors in the next version to give a more meaningful error message.

If you manage to get a valid SVG file, it should display in IE with an Adobe SVG plug-in on any Windows OS or even Apple MAC.



'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Post #7625 Posted 8/18/2005 6:50:23 PM


Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 2 days ago @ 7:55:16 AM
GenoPro Version: 2.0.1.6
Posts: 720, Visits: 6,070
Thanks for your prompt reply. Followed the instructions this time properly and received the result I wanted. The svg file shows up.

In order to make this tool universal the font needs to be a valid unicode, since in my case I have a mixture of german and japanese names. Is this too much to ask for? The german names horizontal, the japanese vertical. Sorry for asking.
Post #7626 Posted 8/18/2005 6:50:24 PM


Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master This user is an important contributor to the translation of GenoPro 

Group: Administrators
Last Login: Today @ 8:36:29 AM
GenoPro Version: 2.4.0.3
Posts: 3,523, Visits: 14,877
Good news for all of you. This morning, I added a new tag named "boundary_rect". All you have to do is open your genealogy tree and visit each GenoMap once. GenoPro computes the boundary rectangle before displaying the GenoMap, so I am using this trick to update "boundary_rect" tag. Then save (or export) your family tree to have the "boundary_rect" tag will be written to the XML file. Here is a sample code of the "boundary_rect" tag:
<GenoMap name="GenoMap1" zoom="80" position="-1047,671" boundary_rect="(-2023,1933),(244,202)"/>

This fix will be available in Beta 13 8)


Post #7627 Posted 8/18/2005 6:50:24 PM


Grand Master

Grand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand MasterGrand Master This user is a contributor to FamilyTrees.GenoPro.com This user is an important contributor to the GenoPro community 

Group: Customers
Last Login: Today @ 8:14:43 AM
GenoPro Version: 2.0.1.6
Posts: 1,151, Visits: 5,403
Thanks for sorting that so quickly Dan, but see also below. I'll change my XSL to use it once I can get my hands on Beta 13.

maru-san, 1st the good news: yes displaying other language characters wasn't a problem, I just switched font-family to 'Arial Unicode MS'. I have updated the download page. Let me know if you find differently.

And now the bad news: Vertical text is a problem at present because the GenoPro beta XML files don't indicate the text direction! This can be shown by opening your .xml files in GenoPro instead of the .gno ones. You will notice all vertical text reverts to horizontal.

So a request to Dan for another SVG fix in Beta 13: Can you put a text direction attribute or element in the .xml file as well as in the .gno if vertical text is ticked?



'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Post #7628 Posted 8/18/2005 6:50:24 PM


Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master This user is an important contributor to the translation of GenoPro 

Group: Administrators
Last Login: Today @ 8:36:29 AM
GenoPro Version: 2.4.0.3
Posts: 3,523, Visits: 14,877
And now the bad news: Vertical text is a problem at present because the GenoPro beta XML files don't indicate the text direction!

Thanks for finding this bug. I added the vertical text as last minute feature in Beta12g and forgot to update the code in the XML import/export module. The fix will be in Beta 13 too.

The flag for vertical text can be found under the letter v in the enable attribute.
<Individual id="ind00001">
  <name>Daniel Morin
    <display lines="1" format="%F">Daniel</display>
    <first>Daniel</first>
    <last>Morin</last>
  </name>
  <position size="X">-280,-160</position>
  <display>
    <flags enable="v" />
  </display>
  <gender>M</gender>
</Individual>

The enable attribute can have multiple flags. For instance the <flags enable="bpv" /> means border aroud the object, pregnancy symbol and vertical text.


Post #7629 Posted 8/18/2005 6:50:24 PM


Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master This user is an important contributor to the translation of GenoPro This user is an important contributor to the GenoPro community This user is a contributor to FamilyTrees.GenoPro.com 

Group: Customers
Last Login: 2 days ago @ 7:55:16 AM
GenoPro Version: 2.0.1.6
Posts: 720, Visits: 6,070
Have created a svg file with 4 genomaps, linked via hyperlinks.

Realized a similar problem on some persons as mentioned under Printing a GenoGram to a virtual PDF printer.

Since this is apparently a problem of genopro, I will mention it here, however I am not quite sure whether Dan will accept to test something, which was not created by GenoPro in this forum, since there are more items which needs to be modified and tested in the tools made by Ron. This is especially true since Ron is offering his tools for other GenoPro users as well. I have tried some of them and I think he is on the right pass, but they should be coordinated by GenoPro in order to get the full potential out of GenoPro. Ron, if you like to have my additonal comments, please let me know. I like to help.