Click here to Skip to main content
12,068,967 members (65,801 online)

Web Development

 
GeneralRe: JSP and JSTL and so on ... Pin
SheraX11-Dec-12 8:12
memberSheraX11-Dec-12 8:12 
QuestionSMTP Programming Pin
DisIsHoody9-Dec-12 14:49
memberDisIsHoody9-Dec-12 14:49 
AnswerRe: SMTP Programming Pin
vbmike10-Dec-12 9:49
membervbmike10-Dec-12 9:49 
GeneralRe: SMTP Programming Pin
DisIsHoody10-Dec-12 14:30
memberDisIsHoody10-Dec-12 14:30 
GeneralRe: SMTP Programming Pin
Richard MacCutchan10-Dec-12 22:36
mvpRichard MacCutchan10-Dec-12 22:36 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 10:40
memberDisIsHoody11-Dec-12 10:40 
GeneralRe: SMTP Programming Pin
Richard MacCutchan11-Dec-12 11:26
mvpRichard MacCutchan11-Dec-12 11:26 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 11:44
memberDisIsHoody11-Dec-12 11:44 
GeneralRe: SMTP Programming Pin
Richard MacCutchan11-Dec-12 11:58
mvpRichard MacCutchan11-Dec-12 11:58 
GeneralRe: SMTP Programming Pin
DisIsHoody11-Dec-12 12:20
memberDisIsHoody11-Dec-12 12:20 
QuestionXSLT Transforms - how to get just some of in a for-each Pin
QuickBooksDev8-Dec-12 3:26
memberQuickBooksDev8-Dec-12 3:26 
AnswerRe: XSLT Transforms - how to get just some of in a for-each Pin
Chris Grove13-Dec-12 20:46
memberChris Grove13-Dec-12 20:46 
GeneralRe: XSLT Transforms - how to get just some of in a for-each Pin
QuickBooksDev17-Dec-12 1:42
memberQuickBooksDev17-Dec-12 1:42 
GeneralRe: XSLT Transforms - how to get just some of in a for-each Pin
Chris Grove17-Dec-12 4:43
memberChris Grove17-Dec-12 4:43 
Hi,
I haven't done anything like this before but I did a quick bit of hunting around and something like this might do it for you. Please note this is totally untested and is just an idea. I thought about how to do a while or a normal for loop in XSL and then try and find away of checking if the element at position x existed. This is cobbled together from a couple of SO posts and my own take on how to put it together.

Sources:
http://stackoverflow.com/questions/11127693/how-to-do-a-while-like-loop-in-xslt[^]
http://stackoverflow.com/questions/5791053/xslt-if-tag-exists-apply-template-if-not-choose-static-value[^]
http://www.sourceware.org/ml/xsl-list/2000-08/msg01503.html[^]

From those articles this is what I have cobbled together:
<xsl:template name="for_loop">
	<xsl:param name="num">1</xsl:param> <!-- param has initial value of 1 -->
	<xsl:param name="limit"></xsl:param> <!-- this should be the expected number of opt elements, passed into the template -->
	<xsl:if test="not($num = $limit)">
		<xsl:choose>
			<xsl:when test="not(opt[position() = $num)"> <!-- true if the element DOES NOT exist -->
				<!-- create your empty xml here -->
			</xsl:when>
			<xsl:otherwise>
				<!-- the element exists get the data and output that -->
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="for_loop">
			<xsl:with-param name="num">
				<xsl:value-of select="$num + 1">
			</xsl:with-param>
                        <xsl:with-param name="limit">
				<xsl:value-of select="$limit">
			</xsl:with-param>
		</xsl:call-template>
	</xsl:if>
</xsl:template>

Hope this helps.

Chris
GeneralRe: XSLT Transforms - how to get just some of in a for-each Pin
QuickBooksDev17-Dec-12 5:55
memberQuickBooksDev17-Dec-12 5:55 
GeneralRe: XSLT Transforms - how to get just some of in a for-each Pin
Chris Grove17-Dec-12 6:43
memberChris Grove17-Dec-12 6:43 
QuestionPop Up JQuery Quick Link Pin
Janiel Major5-Dec-12 23:02
memberJaniel Major5-Dec-12 23:02 
AnswerRe: Pop Up JQuery Quick Link Pin
vbmike7-Dec-12 5:09
membervbmike7-Dec-12 5:09 
AnswerRe: Pop Up JQuery Quick Link Pin
ryanb3112-Dec-12 5:41
memberryanb3112-Dec-12 5:41 
Question[HELP] Whois can using PHP to generate this one? Pin
jimmy.suharry4-Dec-12 22:37
memberjimmy.suharry4-Dec-12 22:37 
AnswerRe: [HELP] Whois can using PHP to generate this one? Pin
S.M. Zamshed Farhan12-Jan-13 6:54
memberS.M. Zamshed Farhan12-Jan-13 6:54 
QuestionTool for big WEB project with huge loads Pin
Junoli2-Dec-12 10:37
memberJunoli2-Dec-12 10:37 
AnswerRe: Tool for big WEB project with huge loads Pin
Richard A. Abbott2-Dec-12 11:47
memberRichard A. Abbott2-Dec-12 11:47 
Questionselect an item in gridview Pin
ptvce2-Dec-12 2:50
memberptvce2-Dec-12 2:50 
AnswerRe: select an item in gridview Pin
Richard MacCutchan2-Dec-12 4:00
mvpRichard MacCutchan2-Dec-12 4:00 
Questioni php question Pin
gamaan1-Dec-12 5:00
membergamaan1-Dec-12 5:00 
AnswerRe: i php question Pin
gamaan1-Dec-12 5:03
membergamaan1-Dec-12 5:03 
AnswerRe: i php question Pin
S.M. Zamshed Farhan12-Jan-13 7:03
memberS.M. Zamshed Farhan12-Jan-13 7:03 
QuestionHTML Pin
DivyamS30-Nov-12 20:35
memberDivyamS30-Nov-12 20:35 
AnswerRe: HTML Pin
S.M. Zamshed Farhan15-Jan-13 5:21
memberS.M. Zamshed Farhan15-Jan-13 5:21 
Questionthe protocol 'net.pipe' is not supported-WCF Pin
mallikharjuna22128-Nov-12 1:50
membermallikharjuna22128-Nov-12 1:50 
AnswerRe: the protocol 'net.pipe' is not supported-WCF Pin
Richard A. Abbott28-Nov-12 2:38
memberRichard A. Abbott28-Nov-12 2:38 
GeneralRe: the protocol 'net.pipe' is not supported-WCF Pin
mallikharjuna22128-Nov-12 3:34
membermallikharjuna22128-Nov-12 3:34 
GeneralRe: the protocol 'net.pipe' is not supported-WCF Pin
Richard A. Abbott28-Nov-12 4:11
memberRichard A. Abbott28-Nov-12 4:11 
Questionhow to get data when using header('location:'.$url) ??? Pin
aa_zz26-Nov-12 5:27
memberaa_zz26-Nov-12 5:27 
AnswerRe: how to get data when using header('location:'.$url) ??? Pin
S.M. Zamshed Farhan15-Jan-13 5:24
memberS.M. Zamshed Farhan15-Jan-13 5:24 
QuestionWeb technologies Pin
Junoli25-Nov-12 12:28
memberJunoli25-Nov-12 12:28 
SuggestionRe: Web technologies Pin
Jon Andersson29-Nov-12 11:21
memberJon Andersson29-Nov-12 11:21 
Questionbreak-word CSS Pin
Jon Andersson23-Nov-12 8:15
memberJon Andersson23-Nov-12 8:15 
AnswerRe: break-word CSS Pin
vbmike24-Nov-12 5:08
membervbmike24-Nov-12 5:08 
GeneralRe: break-word CSS Pin
Jon Andersson24-Nov-12 14:13
memberJon Andersson24-Nov-12 14:13 
GeneralRe: break-word CSS Pin
vbmike29-Nov-12 10:58
membervbmike29-Nov-12 10:58 
GeneralRe: break-word CSS Pin
Jon Andersson29-Nov-12 11:04
memberJon Andersson29-Nov-12 11:04 
GeneralRe: break-word CSS Pin
vbmike29-Nov-12 11:10
membervbmike29-Nov-12 11:10 
AnswerRe: break-word CSS Pin
Jon Andersson29-Nov-12 11:14
memberJon Andersson29-Nov-12 11:14 
GeneralRe: break-word CSS Pin
vbmike29-Nov-12 12:06
membervbmike29-Nov-12 12:06 
GeneralRe: break-word CSS Pin
Richard A. Abbott29-Nov-12 13:00
memberRichard A. Abbott29-Nov-12 13:00 
AnswerRe: break-word CSS Pin
Jon Andersson29-Nov-12 20:33
memberJon Andersson29-Nov-12 20:33 
GeneralRe: break-word CSS Pin
vbmike30-Nov-12 10:17
membervbmike30-Nov-12 10:17 
GeneralRe: break-word CSS Pin
Richard A. Abbott30-Nov-12 10:37
memberRichard A. Abbott30-Nov-12 10:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.160208.1 | Last Updated 7 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid