Re: Transforming portions of content or values
It looks to me like it can all be done. 1.a You can use a substring search for the sections you want to replace with the html tags (The best example of that I have found is in the XSLT cookbook, and I think J. Tennisons books has simialr though I haven't got a copy [skint student :-)]) 1.b The attributes where you need to do this is the same as above, you just need to do something like <xsl:variable name="string" select=experiance/@company /> to get the text and then substring on the variable. 2. Yes. I have just never done it so I cant tell you how. Sorry. Cheers Simon ----- Original Message ----- From: "C Baines" <cbaines@xxxxxxxxxxxxxxxxxxxxx> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, May 07, 2003 10:08 AM Subject: Transforming portions of content or values > Hi > > 1. How do I transform a portion of text in an XML document so that I can > nest it within hyperlink tags in an XSL stylesheet for HTML display, as > follows? > > a. Content: > > <experience>Worked for XYZ Inc.</experience> > > transformed to HTML (where [XYZ] = hyperlink to www. xyz.com): > > Worked for [XYZ] Inc. > > b. Values: > > <experience dates="1990 - 2000" company="Worked for XYZ Inc."/> > > transformed to HTML (where [XYZ] = hyperlink to www. xyz.com): > > 1990 - 2000 Worked for [XYZ] Inc. > > 2. Which throws up another question: is it possible to insert a > non-breaking space between text during the transformation e.g. between the > 2000 and the 'Worked' as above? > > > Thanks > > Charles > > > 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