Subject: RE: [xsl] XSl, sorting, namespaces and data-types, a problem? From: Ernst Wolthaus <ernst.wolthaus@xxxxxx> Date: Mon, 6 May 2002 15:01:59 +0200 |
Addition to my previous post: I think I discovered the problem: When the XSL transforms my XML, the type-info gets reversed like this: <intNumber dt:dt="i4" xmlns:dt="urn:schemas-microsoft-com:datatypes">4</intNumber> But how can I change the XSL so that the attribute order doesn't get changed? Thanks, Ernst Wolthaus -----Original Message----- From: Ernst Wolthaus [mailto:ernst.wolthaus@xxxxxx] Sent: maandag 6 mei 2002 14:39 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] XSl, sorting, namespaces and data-types, a problem? Hi there, I'm using the following xsl: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:param name="sortorder" select="'descending'"/> <xsl:param name="sortfield" select="'xxx'"/> <xsl:template match="*|text()|@*"> <xsl:copy> <xsl:apply-templates select="*|text()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="root"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates select="data"> <xsl:sort select="*[name()=$sortfield]" order="{$sortorder}" /> </xsl:apply-templates> </xsl:copy> </xsl:template> </xsl:stylesheet> And I'm using the following XML: <?xml version="1.0"?> <root> <data> <intNumber xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">0</intNumber> <strName/> </data> <data> <intNumber xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">1</intNumber> <strName>strName 1</strName> </data> <data> <intNumber xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">2</intNumber> <strName>strName 2</strName> </data> <data> <intNumber xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="i4">3</intNumber> <strName>strName 3</strName> </data> </root> Now here's my problem: When I strip away the type info, the XSL sorting works fine. When I add the type-info, I seem to "loose" the content. I've added this XML to a HTML-table as a data island. intNumber is not displayed, the cells stay empty, strName is displayed as should be. What's happening? Greetz, Ernst Wolthaus __________________________ CMG Trade, Transport & Industry B.V. Microsoft Web Development Kralingseweg 241-249, 3062 CE ROTTERDAM Postbus 8566, 3009 AN ROTTERDAM Phone: (010) 253 7000 Fax: (010) 253 7021 E-mail: mailto:ernst.wolthaus@xxxxxx The Information contained in this E-mail and its attachments is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or taking any actions in reliance of the contents of this E-mail and any attachments is strictly prohibited and may be unlawful. CMG is neither liable for the proper and complete transmission of the information contained in this E-mail and any attachments nor for any delay in its receipt. If received in error, please contact CMG on +31 (0)20 50 33 000 quoting the name of the sender and the addressee and then delete it from your system. Please note that CMG does not accept any responsibility for viruses and it is your responsibility to scan the Email and attachments (if any). No contracts may be concluded on behalf of CMG by means of E-mail communications. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSl, sorting, namespaces and , Ernst Wolthaus | Thread | RE: [xsl] XSl, sorting, namespaces , Stuart Celarier |
[xsl] XSl, sorting, namespaces and , Ernst Wolthaus | Date | Re: [xsl] A simple basic question, Oleg Tkachenko |
Month |