Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7826071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:15:32+00:00 2026-06-02T09:15:32+00:00

hello and good day dear xml-friends, i am new to xml so do not

  • 0

hello and good day dear xml-friends,

i am new to xml so do not bear with me for the questions… i am currently making some tests with an xslt-processor –
I ve got an script that runs nicely on one test-dataset – and gives back good and valid results and contrary to this behaviour
i get back silly and dumb results if i run the same script – note: i get back a csv-formatted file with 2 MB that contains
only tabstops… funny but true…

so here my script is:

if i run this xslt-code on the following test-dataset i get only bad bad results – only tabstops… nothing more… what causes this errors. note – i get better results if i run the code againgst the second dataset .- see far below… and see the results at the end of this inital posting….

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="text" encoding="utf-8" />

    <xsl:template match="/">
        <xsl:apply-templates />
    </xsl:template>

    <xsl:template match="osm">
        <xsl:apply-templates />
    </xsl:template>

    <xsl:template match="node[tag[@k='amenity' and @v='restaurant']]">
        <xsl:value-of select="./@id"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./@lat"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./@lon"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'cuisine']/@v"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'name']/@v"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'wheelchair']/@v"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'website']/@v"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'addr:country']/@v"/>
        <xsl:text>&#x09;</xsl:text>
    <xsl:value-of select="./tag[@k = 'addr:city']/@v"/>
    <xsl:text>&#x09;</xsl:text>        
        <xsl:value-of select="./tag[@k = 'addr:street']/@v"/>
        <xsl:text>&#x09;</xsl:text>
        <xsl:value-of select="./tag[@k = 'addr:housenumber']/@v"/>
        <xsl:text>&#x0A;</xsl:text>
    </xsl:template>
        <!-- all non-restaurant nodes -->
    <xsl:template match="node[tag[@k='amenity' and @v!='restaurant']]" />

</xsl:stylesheet>

if i run this against this test-dataset – then i get only dumb results a file with only tabstops in. i have no glue what causes the error?

<node id="25242198" lat="49.0077605" lon="8.3560676" version="9" changeset="10151199" user="keinname" uid="165061" timestamp="2011-12-18T22:59:43Z">
    <tag k="addr:city" v="Karlsruhe" />
    <tag k="addr:country" v="DE" />
    <tag k="addr:housenumber" v="6" />
    <tag k="addr:postcode" v="76185" />
    <tag k="addr:street" v="Durmersheimer Straße" />
    <tag k="amenity" v="restaurant" />
    <tag k="beer_garden" v="yes" />
    <tag k="cuisine" v="german" />
    <tag k="name" v="Beim Schupi" />
    <tag k="opening_hours" v="Mo-Sa 17:00+; Su 12:00+" />
    <tag k="phone" v="+49 721 551220" />
    <tag k="website" v="http://www.schupi.de" />
</node>

[…]…

Note: i get back silly and bad results – only tabstops and nothing more..

but if if i run the above mentioned xslt-processor-code on the following xml-dataset i get back good results… see below – !!!

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="Osmosis SNAPSHOT-r26564">
  <node id="185612117" version="5" timestamp="2011-01-08T19:23:43Z" uid="290680" user="wheelmap_visitor" changeset="6906586" lat="48.8037523" lon="9.5248779">
    <tag k="addr:postcode" v="73614"/>
    <tag k="wheelchair" v="yes"/>
    <tag k="website" v="http://www.courage-restaurant.de/"/>
    <tag k="addr:country" v="DE"/>
    <tag k="name" v="Courage"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="addr:street" v="Künkelinstraße"/>
    <tag k="addr:city" v="Schorndorf"/>
    <tag k="addr:housenumber" v="33"/>
  </node>
  <node id="252619189" version="5" timestamp="2011-01-08T19:21:43Z" uid="290680" user="wheelmap_visitor" changeset="6906586" lat="48.8067032" lon="9.5314986">
    <tag k="addr:postcode" v="73614"/>
    <tag k="wheelchair" v="yes"/>
    <tag k="website" v="www.kesselhaus-schorndorf.de"/>
    <tag k="addr:country" v="DE"/>
    <tag k="name" v="Kesselhaus"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="addr:street" v="Arnoldstraße"/>
    <tag k="addr:city" v="Schorndorf"/>
    <tag k="addr:housenumber" v="3"/>
  </node>
  <node id="319597380" version="1" timestamp="2008-12-17T21:13:15Z" changeset="444629" lat="48.8277913" lon="9.5477029">
    <tag k="name" v="Gasthaus zur Linde"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="319597382" version="1" timestamp="2008-12-17T21:13:15Z" changeset="444629" lat="48.8282523" lon="9.5503109">
    <tag k="name" v="China-Garden"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="339591124" version="2" timestamp="2011-09-22T17:33:36Z" uid="290680" user="wheelmap_visitor" changeset="9366746" lat="48.7888015" lon="9.5079525">
    <tag k="cuisine" v="italian"/>
    <tag k="wheelchair" v="limited"/>
    <tag k="name" v="Pizzeria da Rocco"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="392682646" version="3" timestamp="2010-05-11T19:00:20Z" uid="12973" user="MattGPS" changeset="4671372" lat="48.8315734" lon="9.5468864">
    <tag k="name" v="Gasthaus an der Wieslauf"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="454516720" version="4" timestamp="2010-12-11T15:30:21Z" uid="12982" user="Michael Schulze" changeset="6625571" lat="48.8031264" lon="9.5344371">
    <tag k="addr:postcode" v="73614"/>
    <tag k="cuisine" v="regional"/>
    <tag k="website" v="http://www.deutscheshaus-schorndorf.de/"/>
    <tag k="addr:country" v="DE"/>
    <tag k="name" v="Deutsches Haus"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="addr:street" v="Sonnenscheinstraße"/>
    <tag k="addr:city" v="Schorndorf"/>
    <tag k="addr:housenumber" v="13"/>
  </node>
  <node id="572362430" version="3" timestamp="2010-07-04T06:59:50Z" uid="106522" user="neuntoeter" changeset="5130101" lat="48.807953" lon="9.5379673">
    <tag k="smoking" v="no"/>
    <tag k="name" v="Club Kneipe"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="613988559" version="1" timestamp="2010-01-15T01:20:03Z" uid="24748" user="mabapla" changeset="3621550" lat="48.7991827" lon="9.551828">
    <tag k="name" v="Gaststätte Schützenhaus"/>
    <tag k="amenity" v="restaurant"/>
  </node>
  <node id="859532091" version="1" timestamp="2010-08-13T23:05:14Z" uid="130472" user="fx99" changeset="5486736" lat="48.8062337" lon="9.5278548">
    <tag k="website" v="http://www.weinstube-buechsenmacher.de/"/>
    <tag k="name" v="Weinstube zum Büchsenmacher"/>
    <tag k="amenity" v="restaurant"/>
    <tag k="addr:housename" v="5"/>
    <tag k="addr:street" v="Höllgasse"/>
  </node>
  <node id="1625565012" version="1" timestamp="2012-02-09T18:00:04Z" uid="131968" user="changchun_1" changeset="10636279" lat="48.8151893" lon="9.5310692">
    <tag k="name" v="Gasthaus Sonne"/>
    <tag k="amenity" v="restaurant"/>
  </node>
</osm>

see the -fairly good !! – results i get when i run the xslt-processor on the second dataset: i have no glue why i get such nasty results – when i apply the xslt-processor on the first dataset…!?

185612117   48.8037523  9.5248779       Courage yes http://www.courage-restaurant.de/   DE  Schorndorf  Künkelinstraße  33

252619189   48.8067032  9.5314986       Kesselhaus  yes www.kesselhaus-schorndorf.de    DE  Schorndorf  Arnoldstraße    3

319597380   48.8277913  9.5477029       Gasthaus zur Linde                      

319597382   48.8282523  9.5503109       China-Garden                        

339591124   48.7888015  9.5079525   italian Pizzeria da Rocco   limited                 

392682646   48.8315734  9.5468864       Gasthaus an der Wieslauf                        

454516720   48.8031264  9.5344371   regional    Deutsches Haus      http://www.deutscheshaus-schorndorf.de/ DE  Schorndorf  Sonnenscheinstraße  13

any idea and pointer towards a solution is greatly wellcome… thx in advance!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:15:33+00:00Added an answer on June 2, 2026 at 9:15 am

    I get good results: 11 rows in case 2 and one row in case 1:

    25242198    49.0077605  8.3560676   german  Beim Schupi     http://www.schupi.de    DE  Karlsruhe   Durmersheimer Straße   6
    

    Which is exactly what I would expect to get.
    It would be strange for any xslt processor to fail a templated xslt sheet when only one record is present while working OK for multiple records.

    I suggest you have another look, and if it still fails, let us know which xslt processor you are using.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello and good day dear xml-friends, i am new to xml so do not
Hello good day I am trying to scrape an xml feed that was given
Hello and good day to you. Situation: For some reason, from time to time
I have this string @[123:peterwateber] hello! good day! I wanna change it to <a
Hello I asked this question to superuser but I did not get a good
I want to represent the list hi, hello, goodbye, good day, howdy (with that
Hello and good day to you. Is this true (is it required by standard)
Hello and good day to you. Following code fragment compiles on cl.exe (15.00.30729.01) and
Hello and good day to all. I have the following code to retrieve from
Hello and good day to all. I have an issue on coding, i have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.