|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Processing CDATA
Probably the easiest way is to use a mode: <xsl:template match="question"> <tr><xsl:apply-templates/></tr> <tr><xsl:apply-templates select="textanswer" mode="answer"/></tr> </xsl:template> <xsl:template mode="answer" match="textanswer"> <td><textarea name="test" ...></textarea></td> </xsl:template> <xsl:template match="textanswer"/><!-- ignore except in answer mode --> <xsl:template match="italic"> <i><xsl:apply-templates/></i> </xsl:template> Lars-Arne Mattsson wrote: > > Hello! > > How do I process character data containing some stylistic elements > separate from other elements? > > I want to do the following: > XML: > <question> > Tell me what you <italic>think</italic> of this program? > <textanswer/> > </question> > > HTML: > <form ...> > <table> > ... > <tr> > <th>Tell me what you <i>think</i> of this program?</th> > </tr> > <tr> > <td><textarea name="test" ...></textarea> > </tr> > ... > </table> > </form> > > The problem is how I should extract the question text together with > the the <italic> element and still be able to handle <textanswer> > separately. <xsl:process-children/> won't work and I haven't succeded > to create a <xsl:process select=""> that works. > > I would really appreciate some help! > > Greetings, > /Larssa > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








