How do I check for StartTime (the first one in xml doc) and
Here should go questions about transforming XML with XSLT and FOP.
			- 
				winkimjr2
 - Posts: 62
 - Joined: Thu Jun 26, 2014 9:00 pm
 
How do I check for StartTime (the first one in xml doc) and
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? I tried choose  but I am not getting any output.
Here is my xml code:
			
			
									
									
						Here is my xml code:
Code: Select all
<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>- 
				Radu
 - Posts: 9550
 - Joined: Fri Jul 09, 2004 5:18 pm
 
Re: How do I check for StartTime (the first one in xml doc)
Hi,
You can probably use an XPath like (//StartTime)[1] to select the first element in document order from the document.
XSLT specific questions can also be asked on the XSL-List:
http://www.mulberrytech.com/xsl/xsl-list/
Regards,
Radu
			
			
									
									You can probably use an XPath like (//StartTime)[1] to select the first element in document order from the document.
XSLT specific questions can also be asked on the XSL-List:
http://www.mulberrytech.com/xsl/xsl-list/
Regards,
Radu
Radu Coravu 
<oXygen/> XML Editor
http://www.oxygenxml.com
						<oXygen/> XML Editor
http://www.oxygenxml.com
			
				Jump to
				
			
		
			
			
	
	- Oxygen XML Editor/Author/Developer
 - ↳ Feature Request
 - ↳ Common Problems
 - ↳ DITA (Editing and Publishing DITA Content)
 - ↳ Artificial Intelligence (AI Positron Assistant add-on)
 - ↳ SDK-API, Frameworks - Document Types
 - ↳ DocBook
 - ↳ TEI
 - ↳ XHTML
 - ↳ Other Issues
 - Oxygen XML Web Author
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Content Fusion
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen JSON Editor
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen PDF Chemistry
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Feedback
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen XML WebHelp
 - ↳ Feature Request
 - ↳ Common Problems
 - XML
 - ↳ General XML Questions
 - ↳ XSLT and FOP
 - ↳ XML Schemas
 - ↳ XQuery
 - NVDL
 - ↳ General NVDL Issues
 - ↳ oNVDL Related Issues
 - XML Services Market
 - ↳ Offer a Service