Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml ado recordset sorting

Status
Not open for further replies.

ChainsawJoe

Programmer
Dec 5, 2000
154
0
0
GB
I know how to sort XML using XSL <xsl:sort>, but this doesn't seem to work with and ADO XML recordset (rs: and z: and s: and all that)
Any ideas how to xsl:sort an XML doc created by ADO?
 
Joe,

I don't understand, are you saying that once you have obtained an XMLDOM object from an ADO source it cannot be transformed using XSL?

-pete
 
With plain xml, using <xsl:sort> is fine and peachy. The xml you get from an ADO source is in the form:
Code:
<s:Schema id='RowsetSchema'>
	<s:ElementType name='row' content='eltOnly' rs:CommandTimeout='30'>
		<s:AttributeType name='PersonId' rs:number='1' rs:writeunknown='true'>
			<s:datatype dt:type='int' dt:maxLength='4' rs:precision='10' rs:fixedlength='true' rs:maybenull='false'/>
		</s:AttributeType>
etc. . .
</s:schema>
and then you get the data in the form:
Code:
<rs:data>
	<z:row PersonId='1' PersStatusId='1' TitleId='1' Titleother='' FirstName='John' Surname='Smith' DOB='1960-01-09T00:00:00'
		 MaritalStatus='Married' Sex='M' Email='jsmith@jsmith.com' School='Educated to A Level at Eton.' Skills='Networking, Mangement and Investing.'
		 Notes='John is a highly likeable person who has made a significant contribution to every position he has held.'
		 CreateDate='2000-11-28T00:00:00' CreateUserId='1'/>
etc. . .
</rs:data>
and this doesn't seem to like use of <xsl:sort>. Am I just doing xsl:sorting all wrong, or is there a different way to do this with ADO results?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top