[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] format-number()-function question
Hi,
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> </xsl:choose> Thanks Jonny Since I don't know any XML-Schema forum: I want for XML-output something like this ... <Row> <Entrie type="decimal" digits="3">blabla</Entrie> <Entrie type="integer" digits="0">blabla</Entrie> </Row> My schema: ... <xs:sequence> <xs:element name="Entrie" type="xs:string"> <xs:complexType> <xs:complexContent> <xs:restriction base="xs:anyType"> <xs:attribute name="type" type="xs:string" use="required"/> <xs:attribute name="digits" type="xs:integer" use="optional"/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|