Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: Sort xml and output xml [Thread Next] Re: Sort xml and output xmlTo: 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
