Subject: RE: Copying and transforming/Recursion? From: Kay Michael <Michael.Kay@xxxxxxx> Date: Wed, 11 Oct 2000 09:28:36 +0100 |
Try <xsl:template match="display/p/input"> <xsl:copy> <xsl:copy-of select="@*[not self::value]"/> <xsl:attribute name="value"> <xsl:value-of select="/xml/submittedValues/submittedValue[@fieldname=current()/@fieldname] "/> </xsl:attribute> </xsl:copy> </xsl:template> No recursion needed. Mike Kay > -----Original Message----- > From: Jeff Saylor [mailto:JSaylor@xxxxxxxxxxxxxxxxx] > Sent: 10 October 2000 19:45 > To: XSL List (E-mail) > Subject: Copying and transforming/Recursion? > > > Starting with: > > <xml> > <submittedValues> > <submittedValue fieldname='title'>mr.</submittedValue> > </submittedValues> > > <display> > <p> > title:<input type='text' fieldname='title' value=''/> > </p> > </display> > </xml> > > Effectively, I want to use the <submittedValue>'s text with > the matching (by > @fieldname) <display>'s <input> to get: > > <display> > <p> > title:<input type='text' fieldname='title' value='mr.' /> > </p> > </display> > > this involves outputting the <display> tag, and its contents, while > selectively transforming an element within them - I can not > figure out a way > to do this. I am thinking copy-of and recursive templates > would do the > trick, but I can't get a grasp on how to do it... > > Much appreciation in advance for any and all input - cheers, > > > Jeffrey J. Saylor > Senior Internet Developer > Wizard Finance Systems > 707 Mendham Blvd., Suite 104 > Orlando, FL 32825 > Phone: (407) 262-9000 Ext 266 > Fax: (407) 262-9010 > Email: jsaylor@xxxxxxxxxxxxxxxxx > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Copying and transforming/Recurs, John E. Simpson | Thread | RE: Copying and transforming/Recurs, Kay Michael |
RE: Reports using XML,XSL and HTML, Kay Michael | Date | RE: Copying and transforming/Recurs, Kay Michael |
Month |