You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Patrick Moore <pa...@rioport.com> on 2001/03/24 00:30:22 UTC
SQL bug? or Xalan bug ? Or user error?
Hi there --
Why do I get two different behaviors? Retrieving a row from the table and
try to display the corresponding column label I get two different results.
Is this a bug in the Xpath code?
Thanks
-Patrick Moore-
<xsl:template match="col">
<TD>
<!-- Here is the column data -->
<xsl:variable name="pos" select="position()" />
<xsl:variable name="col_name1"
select="../../column-header[$pos]/@column-label" />
<xsl:variable name="col_name2"
select="../../column-header[position()]/@column-label" />
col_name1=<xsl:value-of select="$col_name1"/>;
col_name2=<xsl:value-of select="$col_name2"/>
</TD>
</xsl:template>
Results in:
<TD>
col_name1=ALBUM_ID;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=ALBUM_DISPLAY_NAME;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=ALBUM_SORT_NAME;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=SONG_ID;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=SONG_DISPLAY_NAME;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=SONG_SORT_NAME;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=ARTIST_ID;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=ARTIST_DISPLAY_NAME;
col_name2=ALBUM_ID</TD>
<TD>
col_name1=ARTIST_SORT_NAME;
col_name2=ALBUM_ID</TD>
Re: SQL bug? or Xalan bug ? Or user error?
Posted by John Gentilin <jg...@smart911.com>.
This looks strange, I plan to work on the SQL extensions over the next few
days
I will add that to the list to check into. Problem is I have several
outstanding
bug fixes but I do not have the authority to commit them. Scott was working
on getting the CVS account set up but I think he has been on the read lately.
Patrick Moore wrote:
> Hi there --
>
> Why do I get two different behaviors? Retrieving a row from the table and
> try to display the corresponding column label I get two different results.
> Is this a bug in the Xpath code?
>
> Thanks
>
> -Patrick Moore-
>
> <xsl:template match="col">
> <TD>
> <!-- Here is the column data -->
> <xsl:variable name="pos" select="position()" />
> <xsl:variable name="col_name1"
> select="../../column-header[$pos]/@column-label" />
> <xsl:variable name="col_name2"
> select="../../column-header[position()]/@column-label" />
> col_name1=<xsl:value-of select="$col_name1"/>;
> col_name2=<xsl:value-of select="$col_name2"/>
> </TD>
> </xsl:template>
>
> Results in:
>
> <TD>
> col_name1=ALBUM_ID;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=ALBUM_DISPLAY_NAME;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=ALBUM_SORT_NAME;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=SONG_ID;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=SONG_DISPLAY_NAME;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=SONG_SORT_NAME;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=ARTIST_ID;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=ARTIST_DISPLAY_NAME;
> col_name2=ALBUM_ID</TD>
> <TD>
> col_name1=ARTIST_SORT_NAME;
> col_name2=ALBUM_ID</TD>