This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Node Selection


I am using Xalan for xsl transformations.  I have some xml with multiple
<Activity> nodes in it for each part that is processed.  The activity nodes
are not sorted in any way in the xml.  I want to select only the latest
activity (by Date, Time) to process in the transform for my output to show
the last activity scan on this part and ignore all other activity scans.
Here is an example of the xml.
<Part> 
	<PartNumber>978599</PartNumber> 
	<Activity> 
		<ActivityLocation> 
			<DepartmentNumber>07</DepartmentNumber> 
			<DepartmentName>Grinding</DepartmentName> 
		</ActivityLocation> 
		<Status> 
			<Code>I</Code> 
			<Description>In-Process</Description> 
		</Status> 
		<Date>20010521</Date> 
		<Time>180800</Time> 
	</Activity>
	<Activity> 
		<ActivityLocation> 
			<DepartmentNumber>07</DepartmentNumber> 
			<DepartmentName>Grinding</DepartmentName> 
		</ActivityLocation> 
		<Status> 
			<Code>R</Code> 
			<Description>Received</Description> 
		</Status> 
		<Date>20010520</Date> 
		<Time>081800</Time> 
	</Activity>
	<Activity> 
		<ActivityLocation> 
			<DepartmentNumber>05</DepartmentNumber> 
			<DepartmentName>Shipping</DepartmentName> 
		</ActivityLocation> 
		<Status> 
			<Code>S</Code> 
			<Description>Shipped</Description> 
		</Status> 
		<Date>20010523</Date> 
		<Time>073300</Time> 
	</Activity>
	<Activity> 
		<ActivityLocation> 
			<DepartmentNumber>05</DepartmentNumber> 
			<DepartmentName>Shipping</DepartmentName> 
		</ActivityLocation> 
		<Status> 
			<Code>R</Code> 
			<Description>Received</Description> 
		</Status> 
		<Date>20010523</Date> 
		<Time>060700</Time> 
	</Activity>
</Part>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]