[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: XSL issue

Subject: Re: Re: XSL issue
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Fri, 7 Jul 2006 10:53:56 +0530
Re:  Re: XSL issue
Hi Prashanth,
  You need to do following..

First write a identity template (to copy everything):

<xsl:template match="node() | @*">
     <xsl:apply-templates select="node() | @*" />

Now write different templates for various cases:

<xsl:template match="body">
        <xsl:apply-templates />

<xsl:template match="a">
     <xsl:when test="contains(@href, '.com') or contains(@href, '.net')">
        <ulink url="{@href}" />
        <link linkend="{@href}" />


On 7/7/06, Prashanth T S <tsprashanth@xxxxxxxxx> wrote:
> 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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.