Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   selecting all the columns in a table based on the column headersvalue (http://www.velocityreviews.com/forums/t685529-selecting-all-the-columns-in-a-table-based-on-the-column-headersvalue.html)

yawnmoth 05-25-2009 05:18 PM

selecting all the columns in a table based on the column headersvalue
 
<table>
<thead>
<tr>
<td>Part #</td>
<td>Description</td.
<td>Price</td>
</tr>
</thead>
<tr>
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</table>

Would it be possible to, using a single query, load every x'th <td> in
every <tr> after <thead> based on the position of the 'Price' <td> in
<thead>?

Martin Honnen 05-25-2009 05:37 PM

Re: selecting all the columns in a table based on the column headersvalue
 
yawnmoth wrote:
> <table>
> <thead>
> <tr>
> <td>Part #</td>
> <td>Description</td.
> <td>Price</td>
> </tr>
> </thead>
> <tr>
> <td>...</td>
> <td>...</td>
> <td>...</td>
> </tr>
> </table>
>
> Would it be possible to, using a single query, load every x'th <td> in
> every <tr> after <thead> based on the position of the 'Price' <td> in
> <thead>?


/table/tr/td[position() = count(../../thead/tr[1]/td[. =
'Price']/preceding-sibling::td) + 1]

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/


All times are GMT. The time now is 12:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57