|
Subject: Re: [xsl] Re: XSL issue From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx> Date: Fri, 7 Jul 2006 10:53:56 +0530 |
Hi Prashanth, You need to do following..
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*" />
</xsl:copy>
</xsl:template><xsl:template match="body">
<body>
<chunk>
<xsl:apply-templates />
</chunk>
</body>
</xsl:template><xsl:template match="a">
<xsl:choose>
<xsl:when test="contains(@href, '.com') or contains(@href, '.net')">
<ulink url="{@href}" />
</xsl:when>
<xsl:otherwise>
<link linkend="{@href}" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>Regards, Mukul
> > Hi, > > I have an input xhtml file. There are a couple of things I need to > do to this file > > 1) Between the <body>......................</body> tags, I > need to add my own custom tag like > <body><chunk>................</chunk></body>. > > 2) If I have a <a href="xyz"> </link>then I need to replace a with link, > href with linkend.Basically this should become > <link linkend="xyz"></link>. > > Also, if the link is referring to an external link, like > http://www.google.com, then instead of link I must put ulink i.e., > <ulink url=http://www.google.com> </ulink> > > Please let me know if there is a solution for the above. This is very urgent > and any help would be highly appreciated. > > Thanks > Prashanth
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] Re: XSL issue, Prashanth T S | Thread | [xsl] XSLT to remove characters and, Georg Hohmann |
| [xsl] Re: XSL issue, Prashanth T S | Date | RE: [xsl] Simple XSL styling questi, Mehta, Chirag |
| Month |