xsl-list
[Top] [All Lists]

Re: [xsl] I output a tab character, then the output file contains space, tab, space ... why?

2016-04-08 10:39:44
On 08.04.2016 17:36, Costello, Roger L. costello(_at_)mitre(_dot_)org wrote:

That solves the problem of showing the headers, but I also need to loop over 
some values, compute an appropriate value to output, and then follow the value 
with a tab (hex 9). Like this:

<xsl:for-each select="foo">
        <xsl:variable name="value" select="f:compute-value(.)"/>
        <xsl:sequence select="$value" />
        <xsl:sequence select="$field-separator"/>
</xsl:for-each>


I think that

  <xsl:value-of select="foo/f:compute-value(.)"
separator="{$field-separator}"/>

should do.


How can I output a tab (hex 9) without also getting the space (hex 20) 
characters surrounding the tab character?


See Eliot's answer on a pure XPath way.


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>