|
Subject: [xsl] comparing 2 childs of 2 childs From: André Moniz <ei99041@xxxxxxxx> Date: Mon, 22 Mar 2004 13:51:39 +0000 |
Hi all, my xml is representing a database structure.. and so it goes
like this:
<DataSet>
<DataTable TableName="tabela">
<Column>
<ColumnName>id</ColumnName>
</Column> .. and then more columns
<Foreign_Keys>
<FK_COLUMN_NAME>CO</FK_COLUMN_NAME>
.. then even more childs..
</Foreign_Keys>
and more foreing keys..
Anyway.. the point is that i want for each Column.. to compare with
the all Foreign_Keys/FK_COLUMN_NAME and then if is equal print
something... in case he doesn't find one column that doesn't match any
foreign_key it means is not a foreign key so prints another thing...
Anyone has good ideas? I did something like this... maybe you can
change it and then give me an ideia
<xsl:template name="ListagemValores">
<xsl:param name="thisField"/>
<xsl:for-each select="$thisField/Column">
<TD>
<xsl:variable name="coluna">
<xsl:value-of select="ColumnName"/>
</xsl:variable>
<xsl:for-each select="../Foreign_Keys">
<xsl:choose>
<xsl:when test="FK_COLUMN_NAME = $coluna">
<db:dataLabel fieldName="{$coluna}">
<db:tableData name="list_{FK_NAME}"
foreignTable="{PK_TABLE_NAME}" visibleFields="descricao"
storeField="{PK_COLUMN_NAME}"/></db:dataLabel>
</xsl:when>
<xsl:otherwise>
<!-- <db:label fieldName="{$coluna}" />-->
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</TD>
</xsl:for-each>
</xsl:template>
Thanks
Andri Moniz
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Recursively removing empt, Andrew Welch | Thread | RE: [xsl] comparing 2 childs of 2 , Jarno.Elovirta |
| Re: [xsl] Using the document functi, Robert Koberg | Date | [xsl] tools XSL:FO, Gianni Ferrari |
| Month |