xsl-list
[Top] [All Lists]

RE: Problem with comparison

2003-08-20 14:01:29
Gosh, no response in four hours. Not what you expect when you're paying
premium rates for technical support.

I glance at all the messages on this list and I answer those that seem
to me to be either easy or interesting. I didn't respond to this one
because it didn't appear to be either. Perhaps others felt the same. Any
problem that provides two screenfuls of stylesheet code, no source
document, and a problem statement that reads "Now i need to compare the
ids of the keys with the ids of the attributes to print in the keys the
name of teh attributes." is not going to be easy, when you have no idea
of the document structure. 

The code is likely to be dead simple, but understanding the requirement
is a nightmare. I simply haven't the faintest idea what you want to do.
If you want responses, you need to take a little bit more care to
distill out the essence of your problem.

Michael Kay


-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
AROSO Jose Antonio
Sent: 20 August 2003 16:27
To: 'xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] Problem with comparison


Someone can help me?
I sent the this message 4 h ago and anybody answered me?


Hi.

In my program i have one problem.
In the following script:

<?xml version="1.0" ?> 
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
<xsl:output method="html"/>

<xsl:template match="ERwin4/Model">

<html>
      <head>
              <link rel="stylesheet" type="text/css" 
href="Style.css"/>
      </head> 
              <body> 
                              Attributes
                              <p/>
                              <xsl:for-each 
select="Entity_Groups/Entity/Attribute_Groups/Attribute" >
                                      <xsl:value-of select="@Name" /> 
                                      <xsl:value-of select="@id" />
                                      <br/>
                              </xsl:for-each>
                              <p/>
                              Keys
                              <p/>    
                              <xsl:for-each 
select="Entity_Groups/Entity/Key_Group_Groups/Key_Group">
                              
                                      <xsl:if 
test="@Name='Primary Key'">

                                              Primary Key
                                              <xsl:for-each 
select="Key_Group_Member_Groups/Key_Group_Member/Key_Group_Mem
berProps">
                              
                                                      <xsl:value-of
select="Key_Group_Member_Column" />

                                                      <br/>

                              
                                              </xsl:for-each>
                                      </xsl:if>
                                      <xsl:if 
test="@Name='Foreign Key1'">
                                              foreign key
                                              <xsl:for-each 
select="Key_Group_Member_Groups/Key_Group_Member/Key_Group_Mem
berProps">
                              
                                                      <xsl:value-of
select="Key_Group_Member_Column" />

                                                      <br/>   
                              
                                              </xsl:for-each>
                                      </xsl:if>
                              </xsl:for-each>

              </body>
</html>

</xsl:template>
</xsl:stylesheet>


I print the attributes(name + id) and the keys(primary and 
foreign keys ids). Now i need to compare the ids of the keys 
with the ids of the attributes to print in the keys the name 
of teh attributes. But i dont know how to do this

Anyone can help me?

p.s. The result of this script is like this:

Attributes 
id_cliente{EA31251A-877D-4F23-ABCE-02A2431A08CE}+00000000
nome{794CB74F-7326-447A-9550-4BD758B14792}+00000000
morada{560CE765-4F67-4464-BB7E-C1276D89047D}+00000000
linhaId{63AE341F-D09A-46F0-BA9B-8D7B09A66D71}+00000000
factId{DB06B249-5733-4DC1-92B1-DD3DA80ABE29}+00000000
id_artigo{08323CF6-4809-4E8C-ABCF-930A5F584CF6}+00000000
preco{A20C4702-5957-49C8-9A60-3A99F88671A1}+00000000
qtd{61E68EF0-4353-4153-B6C8-4B9B5759CD4B}+00000000
descricao{0A92C3B8-7075-4F19-BBEA-D5A75BF08872}+00000000
id_artigo{0D07B263-A951-4374-82D8-8578EDF1C538}+00000000
descricao{253CCBDC-3F69-422D-84E1-1C8EC7DCA108}+00000000
id_cliente{E1350B8B-371D-4C97-B89C-714A5EEFD886}+00000000
Keys 
Primary Key {EA31251A-877D-4F23-ABCE-02A2431A08CE}+00000000
Primary Key {63AE341F-D09A-46F0-BA9B-8D7B09A66D71}+00000000
foreign key {08323CF6-4809-4E8C-ABCF-930A5F584CF6}+00000000
{0A92C3B8-7075-4F19-BBEA-D5A75BF08872}+00000000
Primary Key {0D07B263-A951-4374-82D8-8578EDF1C538}+00000000
{253CCBDC-3F69-422D-84E1-1C8EC7DCA108}+00000000
foreign key {E1350B8B-371D-4C97-B89C-714A5EEFD886}+00000000



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



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



<Prev in Thread] Current Thread [Next in Thread>