[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl]


Subject: RE: [xsl] <xsl:if>
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Fri, 8 Aug 2003 15:27:04 +0100

As far as I can see, each Key_Group_MemberProps contains only one
Key_Group_Member_Column, therefore the variable $kid will contain
exactly one node, therefore the comparison with $kid[2] will always
return false.

Now what really puzzles me is, what did you find this so difficult to
debug? Even if you couldn't see what was going on by inspecting the
code, surely some very simple tracing using xsl:message would have given
you the answer?

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> AROSO Jose Antonio
> Sent: 08 August 2003 12:02
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: RE: [xsl] <xsl:if>
> 
> 
>  </Entity>
> - <Entity id="{3BF06454-D203-46E3-9B3D-9FF95D85F1F7}+00000000"
> Name="artigos">
> - <EntityProps>
>   <Name>artigos</Name> 
>   <Type>1</Type> 
>   <Index_Generate>1</Index_Generate> 
>   </EntityProps>
> - <Attribute_Groups>
> - <Attribute id="{0D07B263-A951-4374-82D8-8578EDF1C538}+00000000"
> Name="id_artigo">
> - <AttributeProps>
>   <Name>id_artigo</Name> 
>   <Type>0</Type> 
>   <Datatype>NUMBER</Datatype> 
>   <Null_Option>1</Null_Option> 
>   <Order>1</Order> 
>   <Physical_Order>1</Physical_Order> 
>  
> <Parent_Domain>{39146A35-A713-4CAA-9FBF-9AA575FA9F44}+00000003
> </Parent_Domai
> n> 
>   <DO_Color_Inherited>0</DO_Color_Inherited> 
>   <DO_Font_Inherited>0</DO_Font_Inherited> 
>   </AttributeProps>
> + <History_Information_Groups>
> - <History_Information 
> id="{299075E8-63D8-4B0A-977C-C43CE6900382}+00000000"
> Name="">
> - <History_InformationProps>
>   <Type>1</Type> 
>   <Created_Time>1049381783</Created_Time> 
>   <Default_Object_Alternative_Id 
> RO="Y">0</Default_Object_Alternative_Id> 
>   </History_InformationProps>
>   </History_Information>
>   </History_Information_Groups>
>   </Attribute>
> - <Attribute id="{253CCBDC-3F69-422D-84E1-1C8EC7DCA108}+00000000"
> Name="descricao">
> - <AttributeProps>
>   <Name>descricao</Name> 
>   <Type>0</Type> 
>   <Null_Option>1</Null_Option> 
>   <Order>2</Order> 
>   <Physical_Order>3</Physical_Order> 
>  
> <Parent_Domain>{39146A35-A713-4CAA-9FBF-9AA575FA9F44}+00000002
> </Parent_Domai
> n> 
>   <DO_Color_Inherited>0</DO_Color_Inherited> 
>   <DO_Font_Inherited>0</DO_Font_Inherited> 
>   </AttributeProps>
> + <History_Information_Groups>
> - <History_Information 
> id="{B0C2C207-7CF6-43E5-9886-05F9BB0A68BB}+00000000"
> Name="">
> - <History_InformationProps>
>   <Type>1</Type> 
>   <Created_Time>1049381783</Created_Time> 
>   <Default_Object_Alternative_Id 
> RO="Y">0</Default_Object_Alternative_Id> 
>   </History_InformationProps>
>   </History_Information>
>   </History_Information_Groups>
>   </Attribute>
> - <Attribute id="{E1350B8B-371D-4C97-B89C-714A5EEFD886}+00000000"
> Name="id_cliente">
> - <AttributeProps>
>   <Name>id_cliente</Name> 
>   <Type>100</Type> 
>   <Definition>Identificação do cliente</Definition> 
>   <Datatype>NUMBER</Datatype> 
>   <Null_Option>0</Null_Option> 
>   <Order>3</Order> 
>   <Physical_Order>2</Physical_Order> 
>  
> <Parent_Attribute>{EA31251A-877D-4F23-ABCE-02A2431A08CE}+00000
> 000</Parent_At
> tribute> 
>  
> <Parent_Relationship>{D7967793-AA47-4BD8-88EB-561CC30C1003}+00
> 000000</Parent
> _Relationship> 
>  
> <Parent_Domain>{39146A35-A713-4CAA-9FBF-9AA575FA9F44}+00000003
> </Parent_Domai
> n> 
>   <Hide_in_Logical>false</Hide_in_Logical> 
>   <Hide_in_Physical>false</Hide_in_Physical> 
>   <DO_Font_Color>0</DO_Font_Color> 
>   <Master_Attribute 
> RO="Y">{EA31251A-877D-4F23-ABCE-02A2431A08CE}+00000000</Master
> _Attribute> 
>   <DO_Color_Inherited>-1</DO_Color_Inherited> 
>   <DO_Font_Inherited>-1</DO_Font_Inherited> 
>   </AttributeProps>
> + <History_Information_Groups>
> - <History_Information 
> id="{6B532EE6-4883-4605-82B9-F020711D1687}+00000000"
> Name="">
> - <History_InformationProps>
>   <Type>1</Type> 
>   <Created_Time>1049381783</Created_Time> 
>   <Default_Object_Alternative_Id 
> RO="Y">0</Default_Object_Alternative_Id> 
>   </History_InformationProps>
>   </History_Information>
>   </History_Information_Groups>
>   </Attribute>
>   </Attribute_Groups>
> - <Key_Group_Groups>
> - <Key_Group id="{DD2D981A-AA4F-42CB-AD66-9F6E418610E6}+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="{0EDFB797-AB32-42DF-A9DE-0E73BC25BE1B}+00000000"
> Name="1">
> - <Key_Group_MemberProps>
>  
> <Key_Group_Member_Column>{0D07B263-A951-4374-82D8-8578EDF1C538
> }+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="{FC9A0684-0DDA-48B3-A719-2235CE63E438}+00000000"
> Name="2">
> - <Key_Group_MemberProps>
>  
> <Key_Group_Member_Column>{253CCBDC-3F69-422D-84E1-1C8EC7DCA108
> }+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 id="{47AFBD75-A596-4313-B7BE-F3F5F564B831}+00000000"
> Name="Foreign Key1">
> - <Key_GroupProps>
>   <Key_Group_Type>IF1</Key_Group_Type> 
>   <Index_Generate>1</Index_Generate> 
>  
> <Key_Group_Relationship_Pointer>{D7967793-AA47-4BD8-88EB-561CC
> 30C1003}+00000
> 000</Key_Group_Relationship_Pointer> 
>   </Key_GroupProps>
> - <Key_Group_Member_Groups>
> - <Key_Group_Member 
> id="{056C0BEE-DCDD-4E87-8F92-CDE7BE024985}+00000000"
> Name="1">
> - <Key_Group_MemberProps>
>  
> <Key_Group_Member_Column>{E1350B8B-371D-4C97-B89C-714A5EEFD886
> }+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_Groups>
> 
> 
> -----Original Message-----
> From: Michael Kay [mailto:mhk@xxxxxxxxx]
> Sent: sexta-feira, 8 de Agosto de 2003 11:55
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] <xsl:if>
> 
> 
> And your source document is?
> 
> Michael Kay
> 
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> > AROSO Jose Antonio
> > Sent: 08 August 2003 10:01
> > To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> > Subject: RE: [xsl] <xsl:if>
> > 
> > 
> > 	<xsl:for-each
> > select="Key_Group_Member_Groups/Key_Group_Member/Key_Group_Mem
> > berProps">
> > 		<xsl:variable name="kid" 
> > select="Key_Group_Member_Column" />
> > 
> > 		<xsl:variable name="aname"
> > select="../../../../../Attribute_Groups/Attribute/@Name" />
> > 
> > 		<xsl:variable name="aid"
> > select="../../../../../Attribute_Groups/Attribute/@id" />
> > 	
> > 
> > 		<xsl:value-of select="$kid[1]" />
> > 								
> > 		<xsl:if test="$aid[1]=$kid[1]">  //this
> > instruction compare very well
> > 	
> > 
> > 			<xsl:value-of select="$aname[1]" /><br/>
> > 			<xsl:value-of select="$kid[2]" />
> > 			<xsl:value-of select="$aid[2]" />
> > 
> > 			<xsl:if test="$aid[2]=$kid[2]">   
> > //this instruction
> > dont compare very well
> > 				ola
> > 			</xsl:if>
> > 			<br/>
> > 	
> > 
> > 		</xsl:if>
> > 
> > 									
> > 							
> > 	</xsl:for-each>
> > 			
> > 			
> > 
> > -----Original Message-----
> > From: Michael Kay [mailto:mhk@xxxxxxxxx]
> > Sent: quinta-feira, 7 de Agosto de 2003 21:54
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: RE: [xsl] <xsl:if>
> > 
> > 
> > Show us your code and we will tell you where it is wrong.
> > 
> > Michael Kay
> > 
> > > -----Original Message-----
> > > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
> > > AROSO Jose Antonio
> > > Sent: 07 August 2003 16:56
> > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Subject: [xsl] <xsl:if>
> > > 
> > > 
> > > Hi.
> > > 
> > > I have two variables x1 e x2.
> > > 
> > > When i compare the x1[1] with x2[1] the comparison is 
> correct. But 
> > > when i compare x1[2] with x2[2] the comparison is wrong. 
> However i 
> > > print the content of this two positions of the variables 
> and it is 
> > > equal.
> > > 
> > > I dont know what is happen.
> > > Anyone can help me?
> > > 
> > > Best Regards
> > > 
> > > Jose
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  XSL-List info and archive:
> > http://www.mulberrytech.com/xsl/xsl-list
> > > 
> > 
> > 
> >  XSL-List info
> > and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > 
> >  XSL-List info and archive:  
> http://www.mulberrytech.com/xsl/xsl-list
> > 
> 
> 
>  XSL-List info 
> and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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



Current Thread