Hi, I had to increase the memory limits for java, aside from that I did not change the program a bit.
0 make
java -Xmx8192m -jar saxon.jar -t -s:map2.osm -xsl:second.xsl -o:map.svg
Saxon-HE 9.4.0.4J from Saxonica
Java version 1.8.0_121
Stylesheet compilation time: 388 milliseconds
Processing file:/home/me/Documents/programs/osvg/map2.osm
Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Building tree for file:/home/me/Documents/programs/osvg/map2.osm using class net.sf.saxon.tree.tiny.TinyBuilder
Tree built in 1298 milliseconds
Tree size: 1625641 nodes, 0 characters, 1414313 attributes
Validation error at xsl:value-of on line 138 of second.xsl:
FORG0001: Cannot convert string to double: ""
at xsl:apply-templates (file:/home/me/Documents/programs/osvg/second.xsl#61)
processing /osm/relation[9]
at xsl:apply-templates (file:/home/me/Documents/programs/osvg/second.xsl#51)
processing /osm
Transformation failed: Run-time errors were reported
make: *** [makefile:2: map.svg] Error 2
An inspection of map.svg yielded that it is mostly empty (BTW: The gawk cmd is printing only lines that contain more than spaces or nothing at all to a new file (map2.svg), from map.svg):
% gawk '{ if($0 ~ /^ *$/){ next; } print $0 }' map.svg > map2.svg
% ls -l map*
-rw-r--r-- 1 me me 1248581516 Jun 5 18:25 map.osm
-rw-r--r-- 1 me me 175824 Jun 5 19:38 map.svg
-rw-r--r-- 1 me me 32605887 Jun 5 19:22 map2.osm
-rw-r--r-- 1 me me 37588 Jun 5 21:07 map2.svg
The map2.svg file is so small that I'm including most of it here:
<?xml version="1.0" encoding="UTF-8"?>
<!-- minlon: 82.5--><!-- minlat: 27.9--><!-- maxlon: 82.3--><!-- maxlat: 28.1--><?xml-stylesheet type="text/css"$
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:f="http://lapin-bleu.net/ns"
xmlns:p="http://lapin-bleu.net/osm2svg/ns"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
viewBox="0 0 -20000.000000000284 20000.000000000284"
width="100%"
height="100%"
id="svgroot"
preserveAspectRatio="none">
<g>
<polyline class="route train" points=""/>
</g>
<g>
<polyline class="route train" points=""/>
</g>
<g>
<polyline class="route train" points=""/>
</g>
The "route trains" sections continue till the end of the file. That is, the file does not have the valid ending tags, or any ending tags for that matter, it just ends.
Thank you
Hi, I had to increase the memory limits for java, aside from that I did not change the program a bit.
An inspection of map.svg yielded that it is mostly empty (BTW: The gawk cmd is printing only lines that contain more than spaces or nothing at all to a new file (map2.svg), from map.svg):
The map2.svg file is so small that I'm including most of it here:
The "route trains" sections continue till the end of the file. That is, the file does not have the valid ending tags, or any ending tags for that matter, it just ends.
Thank you