Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2006, 07:24 AM
Registered User
 
Join Date: Feb 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default combining a form input name with xsl position() ?

Hi guys

i've got a xsl style sheet which formats a series of xml nodes and places their content into inputs.

I want to individually name these inputsin the stylesheet by combining a word and then the xsl position() of the node

so something like <INPUT name="input3"> - but I don't know how to do this?
<INPUT name="input<xsl:value-of select="position()"/>"> noticeably generates an error.......

Any ideas?

Many thanks


 
Old February 23rd, 2006, 09:54 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You want

<input name="input{position()}">

It's called an Attribute Value Template.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL 1.0 : How to find 8th position from string elayaraja.s XSLT 1 July 29th, 2008 04:26 AM
XML, XSL:FO- saving position() mikevn123 XSLT 0 August 8th, 2006 02:51 PM
Sorting a xsl:if test="position()" charmaigne XSLT 2 April 12th, 2006 04:42 AM
using xsl:value-of as a value of an input-text aldwinenriquez XSLT 3 June 23rd, 2005 03:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.