|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Using a parameter in a select within a recursive
> My datafile looks something like this:
>
> <FIELD_1>
> <FIELD_2>
> <FIELD_3>
> <FIELD_4>
> <FIELD_5>
> ...
> <FIELD_142>
Change the design if you can. It's much cleaner to use <FIELD nr="4">.
You're not using XML the way it was designed to be used, so you're giving
yourself an uphill struggle. If you can't change the original input,
consider writing a transformation that turns it into something more
sanitary, which you can then run as the first step in your transformation
pipeline.
> <fo:block><xsl:value-of
> select="concat('FIELD_',$number)"
>
> However, the output gives me:
> FIELD_1 FIELD_2 FIELD_3 etc....
> rather than the data contained within these nodes. Can
> someone shed some
> light for me?
If you wanted to output the string "FIELD_4", how would you write it if not
like this?
Write select="*[name() = concat('FIELD_',$number)]".
Michael Kay
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








