Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 11th, 2014, 10:39 AM
Friend of Wrox
 
Join Date: Apr 2013
Posts: 101
Thanks: 14
Thanked 0 Times in 0 Posts
Default How do I check to see if StartTime exist before using it?

In my xml there are 2 StartTime one near the top and another one which is the child of CourtSessionBlock. Sometimes, there will only be one StartTime which is the child of CourtSessionBlock. This is why I need to check to see if there is StartTime near the top. If it is there then I will use it. If it is not there, then I will use the one in the CourtSessionBlock. How do I do this?
Here is my xml code:
Code:
<Setting ID="21613643" InternalSettingID="1622304543" Date="07/21/2014">
	<HearingDate>07/21/2014</HearingDate>
	<StartTime>8:30 AM</StartTime>
	<EndTime>9:30 AM</EndTime>
	<CourtSessionName>Jackie - Doe</CourtSessionName>
	<CourtSessionID ID="3177494" InternalCourtSessionID="1612374333"/>
	<Calendar Word="05CAL">My County Court</Calendar>
	<CalendarBaseCaseCategory>Probate Health</CalendarBaseCaseCategory>
	<CourtResource>
		<Type Word="JUD">Judicial Officer</Type>
		<Code Word="00951B">Jane, Doe</Code>
	</CourtResource>
	<CourtSessionBlock InternalCourtSessionBlockID="1614615037">
		<StartTime>8:30 AM</StartTime>
		<EndTime>9:30 AM</EndTime>
	</CourtSessionBlock>
	<InterpreterNeeded>false</InterpreterNeeded>
	<TimestampCreate>07/15/2014 09:27:49:607</TimestampCreate>
	</Setting>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!! on Checkbox click how to check from database whether clicked check match. damandeep BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 14th, 2011 08:39 AM
how to check if a record does NOT exist in a table? Greywacke Pro PHP 2 January 1st, 2010 04:14 AM
XSLT Check if directory exist ArnArn XSLT 3 November 23rd, 2008 03:44 PM
check for image field exist goldenstate ASP.NET 2.0 Basics 2 May 22nd, 2007 12:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.