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

GenoPro Support Forum




Ron's GenoPro Beta XML to SVG Translator

Click to view RSS...
Author Ron's GenoPro Beta XML to SVG Translator
Posted Thursday, April 7, 2005 - Post #7622
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: 3 hours ago
Posts: 3,340, Visits: 25,607
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"


Edited: Saturday, October 1, 2005 by GenoProSupport
Posted Thursday, August 18, 2005 - Post #7623
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

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

Last Login: Sunday, March 21, 2021
Posts: 716, Visits: 12,927
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.
Posted Thursday, August 18, 2005 - Post #7624
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: 3 hours ago
Posts: 3,340, Visits: 25,607
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"


Edited: Saturday, October 1, 2005 by GenoProSupport
Posted Thursday, August 18, 2005 - Post #7625
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

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

Last Login: Sunday, March 21, 2021
Posts: 716, Visits: 12,927
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.
Posted Thursday, August 18, 2005 - Post #7626
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 2:09 PM
Posts: 4,887, Visits: 22,761
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)
Posted Thursday, August 18, 2005 - Post #7627
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: 3 hours ago
Posts: 3,340, Visits: 25,607
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"
Posted Thursday, August 18, 2005 - Post #7628
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 2:09 PM
Posts: 4,887, Visits: 22,761
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.


Edited: Saturday, October 1, 2005 by GenoProSupport
Posted Thursday, August 18, 2005 - Post #7629
Forum Master

Forum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum MasterForum Master

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

Last Login: Sunday, March 21, 2021
Posts: 716, Visits: 12,927
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.

Edited: Saturday, October 1, 2005 by GenoProSupport

Posted Thursday, August 18, 2005 - Post #7630
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Moderators
Customers
Gamma
FamilyTrees.GenoPro.com
Translator
GenoPro version: 3.1.0.1

Last Login: 2 days ago @ 2:09 PM
Posts: 4,887, Visits: 22,761
I don't mind people creating tools and making money if they can. I am very willing to add features to GenoPro to make it easy for users to develop tools, however I don't want to spend too much time testing other's tools. As for testing those tools, my time is limited as I want to finish GenoPro 2.0 :!:.
Posted Thursday, August 18, 2005 - Post #7631
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: 3 hours ago
Posts: 3,340, Visits: 25,607
I am happy to receive any comments, complimentary, constructive or critical. So thanks for letting me know of the problem.

The problem you describe, that of pedigree lines appearing under text associated with an individual, is not, in my opinion, a problem or bug in GenoPro. GenoPro defines a pedigree line that terminates at the centre of the gender symbol, which I believe is the correct way to do it. Any text that overlays these lines should obscure these lines. The generated SVG uses a couple of techniques, one being a flood filter suggested by 'honyk' of this forum, to achieve this. I thought this was working correctly now. If you can send an example SVG to the email address at the bottom of my tools page, I will see if I can fix it.

My original purpose in writing these VBScripts was to achieve more compatiblilty in the Gedcom export to allow better interworking with other packages. Dan has his own ideas on this which did not match my requirements hence the gnoxml2ged.vbs script.

I then started thinking about how to present my family tree on the web and when SVG was mentioned here I took up the challenge. By the way, I liked your use of 'zoomify' on your website, Maru-san, to add pictures to the genograms. I believe Dan is going to add a facility to have images on GenoMaps in the future. However in the mean time I am going to look into the possiblity of using text Labels to define image areas with the text specifying the GenoPro picture elements to use in the SVG.

In bringing my scripts to this forum my intention is to make them available to all who want to try them and to get feedback to improve their usefulness. So in a way their develoment is 'coordinated' by this GenoPro forum.

I am concious of the fact that we are all waiting for the full release of GenoPro 2.0. Dan has hectic timetable to get the things he wants implemented. I would not want his timetable to slip due to side issues such as my tools. Dan's decision to use XML gives GenoPro tremendous flexibility, as he has hinted at with the new report writer. I am also taking advantage of that flexibility.



'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