How do debug XSL

How do debug XSL

Anonymous
Not applicable
617 Views
1 Reply
Message 1 of 2

How do debug XSL

Anonymous
Not applicable

Hi,
How to I debug XSL files?
I tried to modify the FormatNumber function on NumberFormatting.xsl to change the decimal separator from period to comma.

 

	//This was the original code:
	return rNumber.toString();
	
	//I changed to this
	//return Replace(rNumber.toString(), ".", ",");

 

Also tried writing replace in lowercase.

I tried adding the replace function in earthworks.xsl:

 

<xsl:value-of select="landUtils:FormatNumber(string(0.0), string($SourceVolumeUnit), string($Earthwork.Volume.unit), string($Earthwork.Volume.precision), string($Earthwork.Volume.rounding))"/>
<!-- <xsl:value-of select="replace(landUtils:FormatNumber(string(0.0), string($SourceVolumeUnit), string($Earthwork.Volume.unit), string($Earthwork.Volume.precision), string($Earthwork.Volume.rounding)),'.',',')"/> -->

 

In all three cases the result was a blank page in the browser.

Greetings from Paraguay.

Claudio Bogado Pompa.

0 Likes
Accepted solutions (1)
618 Views
1 Reply
Reply (1)
Message 2 of 2

tyronebk
Collaborator
Collaborator
Accepted solution

You need to format your method call like this:

return rNumber.toString().replace(".", ",");

replace needs to be called with "dot notation" and with all lowercase letters.