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]

RE: Incrementing a Variable


I think I need to be more specific. Given the following xml:

<?xml version="1.0" encoding="UTF-8"?>
	<EditQuery>
		<Object>
			<com.cisco.elobit.eeng.bug.AvailableFieldList>
				<AvailableField>
					<Name>Project</Name>
      				<Id>1000</Id>
					<FormType>SELECT</FormType>
					<FieldType>CHARACTER</FieldType>
					<FieldLength>30</FieldLength>
					<FieldOrder>1</FieldOrder>
					<IntrinsicField>true</IntrinsicField>
					<ValueElement>ANY</ValueElement>
					<ValueElement>alpha project</ValueElement>
				</AvailableField>
			</com.cisco.elobit.eeng.bug.AvailableFieldList>
		</Object>
		<Object>
			<com.cisco.elobit.eeng.bug.ComplexQuery>
				<id>142002</id>
				<complexQueryField>
					<availableFieldId>1000</availableFieldId>
					<name>Project</name>
					<condOperator>=</condOperator>
					<fieldValue>ffe</fieldValue>
					<fieldLogical>AND</fieldLogical>
					<createdDate>5/9/2001</createdDate>
					<modifiedDate>5/9/2001</modifiedDate>
				</complexQueryField>
			</com.cisco.elobit.eeng.bug.AvailableFieldList>
		</Object>
	</EditQuery>

I loop through the <AvailableField> elements and for each one I do some
nifty HTML and I give that particular element I'm working on a number using
position() - 1 so the number always starts with 0. Each time I'm inside the
<AvailableField> element, I need to step out and check the
<complexQueryField> elements, compare their id with the Id in
<AvailableField> and if they match, do some nifty HTML and increment my
counter.

Problem is I need to know where my increment is for the next turn of events.
I thought there was an xsl:counter but that doesn't seem to be supported
anymore.

Anyone have suggestions or ideas?

Thanks in advance,

Jon

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Jon Wynacht
Sent: Thursday, May 10, 2001 3:24 PM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] Incrementing a Variable


Hey Group,

It was my understanding that you can increment a variable in xsl by 1, say
during each pass of a for loop. Is this true and if not, what's the best way
to achieve this?

Thanks,

Jon


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



 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]