Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sort xml and output xml

From: "Jim Andersen" <jba020@----------.--.------->
To: NULL
Date: 12/5/2006 1:16:00 PM

p.lepin@c... wrote:
> Since you failed to mention what you're using for
> processing

I'm using a .NET 2.0 XMLDataSource. I point it to my xml-file and my 
xslt-file.

>, I assume it's some XSLT 1.0-compliant
> processor.
>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <levelone>
>> <child ID="1" sort="5"><name>Paul</name></child>
>> <child ID="2" sort="1"><name>Adam</name></child>
>> <child ID="3" sort="2"><name>Will</name></child>
>> <root>
>
> That's not an XML file. It's not well-formed.

Yes. A typo in my posting. The last element "root" should have been 
"levelone"


>> I've been searching for hours, but all the examples I
>> have seen creates an HTML file.
>
> That's mighty strange, especially since XML is the
> default output method.

And now I found out why. I had (from one of the examples I found) learned 
that I could also put an instruction in the XML document that said to always 
use a specific XSL-file. Something along the lines of : <xsl-stylesheet 
output="htm/txt">
Removing that line made the output into XML.

> Presuming you meant something like:
>
> <levelone>
> <child ID="1" sort="5"><name>Paul</name></child>
> <child ID="2" sort="1"><name>Adam</name></child>
> <child ID="3" sort="2"><name>Will</name></child>
> </levelone>

I did.

> The following XSLT should do the trick:

And it did. Thx a heap. Now I can start to find out why :-)

/jim 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent