Subject: Re: problems again! From: David Allouche <david@xxxxxxxxxxxxxxxx> Date: Tue, 22 Aug 2000 10:51:05 -0200 (GMT+2) |
> My tags are arraigned in the following way: > > <this> > This for the freeflowing text. Incase if you any problems, please > contact <link url="x.html">me</link> and some other text goes > here. > </this> > > As you see above I want to place a hyperlink in the middle of the text or > a paragraph. Is there anyway wherein I will be able to achieve this using > XSL? In case you are ouputting HTML: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> .... <!-- root node template, and other stuff --> .... <xsl:template match="this"> <p><xsl:apply-templates/></p> </xsl:template> <xsl:template match="link"> <a href="{@url}"><xsl:apply-templates/></a> </xsl:template> .... </xsl:stylesheet> This is basic push processing, the great strenght of rule based stylesheet programming. The a/@href attribute is set using an attribute value template. You can put any XPath expression inside those curly braces, it is converted to a string (as with the string() function) and it is inserted in the attribute value. -- David -- On Tue, 22 Aug 2000, Rohit Peyyeti wrote: > Hello Again: > > I have been facing problems in writing XSL for the new project which I am > working on and you guys on the list, I thank you very much! > > And here is the new problem :-) > > > Thank you very much in advance. > > ...Rohit > > > > > > 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: problems again!, Sanjay Netrabile | Thread | RE: problems again!, Pawson, David |
RE: how to use // starting from the, David Allouche | Date | RE: OutOfMemoryError when transform, Thorbjørn Ravn Ander |
Month |