|
Subject: [xsl] Trouble with position! From: "Adam J Knight" <adam@xxxxxxxxxxxxxxxxx> Date: Fri, 15 Apr 2005 12:44:29 +1000 |
Hi all,
With this xml structure in mind:
<dfile>
<df_column_names>
<df_column name="employee_name" type="hyperlink">Name:</df_column>
<df_column name="department" type="text">Department:</df_column>
<df_column name="position" type="text">Position:</df_column>
</df_column_names>
<df_data_row>
<data_key>1695</data_key>
<df_data>Charles Hilditch</df_data>
<df_data>Processing</df_data>
<df_data>Mill Supervisor</df_data>
</df_data_row>
</dfile>
I am trying to select the type attribute for a particular df_data element.
<xsl:for-each select="./df_data">
<xsl:value-of select="/dfile/df_column_names/df_column[position()]/@type"/>
</xsl:for-each>
My algorithm is simply select the type attribute from df_column whose
position Is equal to current df_data element being processed.
I keep getting the type attribute for the first db_column name only.
Thanx to those who respond.
Cheers,
Adam
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] xsl, and different xml ve, Michael Kay | Thread | Re: [xsl] Trouble with position!, omprakash . v |
| [xsl] xsl, and different xml versio, Jake Briggs | Date | RE: [xsl] xsl, and different xml ve, Aron Bock |
| Month |