[xsl] format-number()-function question

Subject: [xsl] format-number()-function question
From: "Jonny Pony" <jonnypony666@xxxxxxxxxxx>
Date: Thu, 18 Dec 2003 19:42:30 +0000

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:choose> <xsl:when test="@type = 'decimal'"> <xsl:variable name="number"><xsl:value-of select="."/></xsl:variable> <xsl:value-of select="format-number($number, '###,###.00')"/>
</xsl:when> <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? http://messenger.msn.de MSN Messenger - Kommunikation in Echtzeit

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread