[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

for-each error

Subject: for-each error
From: AROSO Jose Antonio <jose.santos@xxxxxxxxxxx>
Date: Mon, 4 Aug 2003 16:26:01 +0100
key_group_member_column
I have this xml file and a want to catch the name of Key_Group tag.




<Key_Group_Groups> 
	<Key_Group id="{D08BC66E-7CF2-41BA-9209-EEB09B61EF8F}+00000000"
Name="Primary Key"> 
		<Key_GroupProps> 
			<Key_Group_Type>PK</Key_Group_Type> 
			<Index_Generate>1</Index_Generate> 
		</Key_GroupProps> 
		<Key_Group_Member_Groups> 
		<Key_Group_Member
id="{66651F5C-4BE1-42D4-B2BB-7AE1B5FB0089}+00000000" Name="1"> 
		<Key_Group_MemberProps> 
	
<Key_Group_Member_Column>{63AE341F-D09A-46F0-BA9B-8D7B09A66D71}+00000000</Ke
y_Group_Member_Column> 
		<Key_Group_Sort_Order>ASC</Key_Group_Sort_Order> 
		<Key_Group_Position>1</Key_Group_Position> 
		</Key_Group_MemberProps> 
		</Key_Group_Member> 
		</Key_Group_Member_Groups> 
		</Key_Group> 
	
	<Key_Group id="{5E74B783-CF02-478E-803B-627C6B51C3B4}+00000000"
Name="Foreign Key1"> 	
		<Key_GroupProps> 
			<Key_Group_Type>IF1</Key_Group_Type> 
			<Index_Generate>1</Index_Generate> 
	
<Key_Group_Relationship_Pointer>{88094EBC-EFD2-4576-B735-9D758627DDA7}+00000
000</Key_Group_Relationship_Pointer> 
		</Key_GroupProps> 
		<Key_Group_Member_Groups> 
		<Key_Group_Member
id="{0E9546A0-9FAC-4503-9DD1-5622AFDB1257}+00000000" Name="1"> 
		<Key_Group_MemberProps> 
	
<Key_Group_Member_Column>{08323CF6-4809-4E8C-ABCF-930A5F584CF6}+00000000</Ke
y_Group_Member_Column> 
		<Key_Group_Sort_Order>ASC</Key_Group_Sort_Order> 
		<Key_Group_Position>1</Key_Group_Position> 
		</Key_Group_MemberProps> 
		</Key_Group_Member> 
		<Key_Group_Member
id="{E9F822CF-CF4B-4952-A511-ED459FE9E819}+00000000" Name="2"> 
		<Key_Group_MemberProps> 
	
<Key_Group_Member_Column>{0A92C3B8-7075-4F19-BBEA-D5A75BF08872}+00000000</Ke
y_Group_Member_Column> 
		<Key_Group_Sort_Order>ASC</Key_Group_Sort_Order> 
		<Key_Group_Position>2</Key_Group_Position> 
		</Key_Group_MemberProps> 
		</Key_Group_Member> 
		</Key_Group_Member_Groups> 
		</Key_Group> 
</Key_Group_Groups>


So i write a xsl code like this:

..........................
				<xsl:for-each
select="Attribute_Groups/Attribute">
				
						<xsl:variable name="aid"
select="@id" />
						<xsl:variable name="kid"
select="../../Key_Group_Groups/Key_Group/Key_Group_Member_Groups/Key_Group_M
ember/Key_Group_MemberProps/Key_Group_Member_Column" /> 
						<xsl:variable name="pkname"
select="../../Key_Group_Groups/Key_Group/@Name" />
						<xsl:value-of
select="$pkname" />
						<xsl:if test="$aid=$kid">
	

								CHAVE
PRIMARIA:
	
<xsl:value-of select="@Name" />
								<br/>
							
						</xsl:if>
	

				</xsl:for-each>		


But this code only catch the same name("Primary Key") inspite of "kid" print
all the Key_Group_Member_Column.


How can I solve this problem?


Best Regards

Jose 

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.