Using the latest Saxon parser.
This is a snip of a larger XML file.
<osm>
<node id="38275590">
<tag k="name" v="Wimbledon"/>
</node>
<node id="28377390">
<tag k="name" v="Westminster"/>
</node>
<node id="168325631">
<tag k="name" v="Brixton"/>
</node>
</osm>
This xslt/Xpath:
<xsl:template match="osm">
<xsl:result-document href="{'Underground_Now.txt'}">
<xsl:value-of select="node[tag[@k='railway'][@v='station']]/tag[@k='name']/concat(string(@v),'
')"/>
</xsl:result-document>
</xsl:template>
Returns this (I've used a bullet-point to indicate a space).
Wimbledon
•Westminster
•Brixton
Why is it adding a whitespace to the beginning of each line? Note: It isn't present in the first string.
Even if I remove the linefeed it returns this:
•Westminster•Brixton
I've tried setting:
<xsl:output indent="no"/>
I've tried incorporating normalize-space() in various forms, such as:
/concat(normalize-space(string(@v)),'
')
...but it produces the same output.
<xsl:value-of select="node[tag[@k='railway'][@v='station']]/tag[@k='name']" separator="
"/>.