|
Subject: [xsl] Where did my tabs go? Trying to understand xsl:value-of, tabs and the separator attribute From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Mon, 16 Oct 2006 20:11:18 +0200 |
Two entities: <!ENTITY tab "	" > <!ENTITY separator "" >
A character map:
<xsl:character-map name="separator">
<xsl:output-character character="&separator;" string="&tab;"/>
</xsl:character-map>An applied output method: <xsl:output method="text" indent="no" use-character-maps="separator" />
A variable: <xsl:variable name="tabchar" select="'	'" />
With the following statements gives: (a tab) <xsl:value-of select="$tabchar" /> (a tab) <xsl:value-of select="'	'" /> (no tab) <xsl:value-of select="'&tab;'" /> (no tab) <xsl:value-of select="'&separator;'" />
(tabs) <xsl:value-of select="somenode" separator="{$tabchar}" />
(tabs) <xsl:value-of select="somenode" separator="	" />
(no tabs) <xsl:value-of select="somenode" separator="{&tab;}" />
(no tabs) <xsl:value-of select="somenode" separator="{&separator;}" />Cheers -- Abel Braaksma http://www.nuntia.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Encompassing Element extr, David Carlisle | Thread | Re: [xsl] Where did my tabs go? Try, David Carlisle |
| Re: [xsl] [XSLT 2.0] Checking that , Florent Georges | Date | Re: [xsl] Where did my tabs go? Try, David Carlisle |
| Month |