Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Why are spaces so hard ... XSLT Transforming..

$
0
0

Hi

I have some XSLT doing something like

<xsl:value-of select="myObj:OurStringFunc(@testName, 'padright', 30)" />

I can correctly get the custom function to work HOWEVER i can't get it to display corectly space wise

A google suggests several ways :

1. Use <xsl:text> HOWEVER this causes an error because "value-of select" is NOT allowed inside this.

<xsl:text><xsl:value-of select="myObj:OurStringFunc(@testName, 'padright', 30)" /></xsl:text>

2. It references <xsl:preserve-spaceelements="td span"/>
But how to have a dummy element type, e.g. spacesrule so you can

<xsl:preserve-spaceelements="spacesrule"/>

<spacesrule><value-of-select></spacesrule> ???

3. I have seen reference to use &#160; instead of spaces, but this only puts out "text&#160; in the rendered html...

>> Does someone know how i can control spaces from a "value-of select" ??

Thanks


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>