For doing some tests with xslt i want to run a request to find out certain entity - let us take for example the restaurants. we want to find out all the restaurants in the area. now we can run that directly on the bz2 compressed file, that we downloaded - for example if we use the following code:
well i splitted the file with xml_split -which is a great perl-module from CPAN. The problem: with the following xslt-processor i get only bad results - the parsed files werent not parsed enough i only get a minor set of informations when i run the code on a xml-file. see the xslt-processor - and below - a litte data-chunk out of the file i run and parse if you want to check it - just get the little dataset - note it is a splitted file here you can get it: https://rapidshare.com/#!download|643p12|2523227518|germany-001.xml|100000 Note: see therefore the important lines: Note: here we have a much more little-file which is very very small - compared with the one that is mentioned above. https://rapidshare.com/files/2447253717/germany-081.xml Here we have the xslt-processor that has difficulties with gathering theinformation - the xslt-procssor should be reengineerd a bit. well i tried seferal things ... but at the moment i got stuck some how...: Some musings regarding the overhaul of the code: well at least it looks like the code needs an overhaul. hmmm - i should consider changing the code to make it clearer and avoid errors. Well above all: i think i should make useage of XPaths like select="tag/@id" and tag[@k='country']/@v. But above all - i really think that i should consider refactoring this code to make better use of template. What do you think.. Below i show you the code that runs against the two files - mainly against this one here: https://rapidshare.com/files/2447253717/germany-081.xml <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>
how to rework the xslt in order to work smooothly? and here below we have a data-chunk out of the xml-file that we have parsed: see it
see the results - note there are missing some parts - unfortunatly.. Question: How can we rearrange and reengineer the code so that it procudes better results on the above mentioned files: By the way:here you can get it: https://rapidshare.com/#!download|643p12|2523227518|germany-001.xml|100000 asked 28 Apr '12, 18:24 tagtheworld Frederik Ramm ♦ |
help.osm.org is not the best place to ask questions about xslt or other general problems not related to gis. You may find other sites that have more xslt experts than osm, like http://stackoverflow.com/