[xquery-talk] Finding a name and the resulting
Michael Kay
mhk at mhk.me.uk
Thu Aug 17 10:24:04 PDT 2006
>
> Now I am looking for a name followed by a number.
Sorry, but what in this input is the "name", and what is the "number"?
>
> <td align="left" colspan="1" rowspan="1" valign="TOP"
> width="200"> <b>Bob Stevens:
> </b>
> </td>
> <td align="center" colspan="1" rowspan="1" valign="TOP"
> width="75"> <b/> <p class="purple"> <b>
>
> <b>SCMM9</b>
> </b>
> </p>
> <b>
> </b>
> </td>
>
> Other pages have varying numbers of columns but this is the
> simplest page with a single name, followed by a letter/number
> combo. Some early documents are just a number.
>
> What I need is to parse out the names and their document,
> from a pre-generated list, and fed into an array. So a list
> of Tom, Dick and Harry would mean Tom was [0] in the array,
> Dick is [1], etc.
>
We can help you write the query, but we can't help you with the
specification, unless we have a much better indication of the range of
inputs you have to deal with, and the output you want to produce.
As a general rule, incidentally, the "fuzzier" your input, the more benefit
you get from a pattern-matching approach such as XSLT's template rules.
Michael Kay
http://www.saxonica.com/
More information about the talk
mailing list