Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xsl sort

From: sheela.37@-----.---
To: NULL
Date: 12/11/2006 4:05:00 AM

Hi

I have an issue regarding xsl sort.
I have implemented the following lines for sort :

<xsl:for-each select="ANNOTATIONDATA/ANNOTATIONS/ANNOTATION">
<xsl:sort select="*[name() = $SortCol]" order="{$SortOrd}"
data-type="{$SortType}"/>

This works fine if i loop through
ANNOTATIONDATA/ANNOTATIONS/ANNOTATIONS but my sort condition also
involves the childnodes of  EXTENDEDITEMS (Supposing the column header
includes ENTEREDBYNAME, ANNOTATIONTEXT, EXPDATE and TEXT).
Now i need the SortCol to be validated against both main loop of
ANNOTATIONS and also the childnodes of EXTENDEDITEMS.

My xml looks like this.


<ANNOTATIONDATA>
	<EXTENDEDITEMSDEFINITION>
		<EXPDATE ItemName="expdate" SummaryLabel="expdate" ItemType="DT" />
		<TEXT ItemName="Text" SummaryLabel="Te" ItemType="TX" />
	</EXTENDEDITEMSDEFINITION>
	<ANNOTATIONS>
		<ANNOTATIONS>
			<ANNOTATIONID>1305</ANNOTATIONID>
			<ENTEREDDATETIME>11 Dec 2006 17:11</ENTEREDDATETIME>
			<ENTEREDBYNAME>Jill</ENTEREDBYNAME>
			<ANNOTATIONTEXT>expdate: &lt;b&gt;11 Dec 2006&lt;</ANNOTATIONTEXT>
			<EXTENDEDITEMS>
				<EXPDATE>
					<EXTITEMDATAID>8826</EXTITEMDATAID>
					<EXTENDEDITEMID>162</EXTENDEDITEMID>
					<ITEMTYPE>DT</ITEMTYPE>
					<ITEMCODE>expdate</ITEMCODE>
				</EXPDATE>
				<TEXT>
					<EXTITEMDATAID>8827</EXTITEMDATAID>
					<EXTENDEDITEMID>165</EXTENDEDITEMID>
					<ITEMTYPE>TX</ITEMTYPE>
					<ITEMCODE>Text</ITEMCODE>
				</TEXT>
			</EXTENDEDITEMS>
			<EXPIREDIND>0</EXPIREDIND>
		</ANNOTATION>
		<ANNOTATION>
			<ANNOTATIONID>1379</ANNOTATIONID>
			<ENTEREDDATETIME>11 Dec 2006 17:07</ENTEREDDATETIME>
			<ENTEREDBYNAME>Jack</ENTEREDBYNAME>
			<ANNOTATIONTEXT>expdate: &lt;b&gt;11 </ANNOTATIONTEXT>
			<EXTENDEDITEMS>
				<EXPDATE>
					<EXTITEMDATAID>8822</EXTITEMDATAID>
					<EXTENDEDITEMID>162</EXTENDEDITEMID>
					<ITEMTYPE>DT</ITEMTYPE>
					<ITEMCODE>expdate</ITEMCODE>
				</EXPDATE>
			</EXTENDEDITEMS>
			<EXPIREDIND>0</EXPIREDIND>
		</ANNOTATION>
	</ANNOTATIONS>
</ANNOTATIONDATA>

Do anyone have any idea regarding this issue????



transparent
Print
Mail
Digg
delicious
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