RE: [xsl] format-number()-function question

Subject: RE: [xsl] format-number()-function question
From: "Amuchastegui, Maria" <Maria.Amuchastegui@xxxxxxxxxxx>
Date: Thu, 18 Dec 2003 15:14:49 -0500
You could create a named template with the format-number function, and then
call the template.

	<xsl:decimal-format name="EnglishDecimalFormat"
decimal-separator="." grouping-separator=","/>
	<xsl:template name="EnglishCurrency">
		<xsl:value-of select="format-number(., '$##,##0.00',

	<xsl:apply-templates select=".">
		<xsl:call-template name="EnglishCurrency"/>

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Jonny Pony
Sent: December 18, 2003 2:43 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] format-number()-function question


I'm using the format-number()-function and I wonderd if I could do this 
piece of code without the variable. What I mean is, inserting the 
"><xsl:value-of select="."/>" directly into the function. Is that somehow 
possible. Does it make sense?

<xsl:when test="@type = 'decimal'">
name="number"><xsl:value-of select="."/></xsl:variable>
select="format-number($number, '###,###.00')"/>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>


Since I don't know any XML-Schema forum:

I want for XML-output something like this
<Entrie type="decimal" digits="3">blabla</Entrie>
<Entrie type="integer" digits="0">blabla</Entrie>

My schema:
<xs:element name="Entrie" type="xs:string">
<xs:restriction base="xs:anyType">
<xs:attribute name="type" type="xs:string" use="required"/>
<xs:attribute name="digits" type="xs:integer" use="optional"/>

But this "schema code" doesn't function.
When I want to validate my xml against this schema in XMLSpy it says 
"unexpected attributes". Without attributes I can validate it. Strange.
Am I right or XMLSpy?
Or does anyone know an xml-schema forum to post this question

E-Mails sind Ihnen nicht schnell genug? MSN 
Messenger - Kommunikation in Echtzeit

 XSL-List info and archive:

 XSL-List info and archive:

Current Thread