This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: reolacing tags
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] reolacing tags
- From: Manu KY <manu_kry at yahoo dot com>
- Date: Fri, 19 Oct 2001 16:53:30 +0530
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
try this:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="OTNSC-B">
<b>
<xsl:value-of select="."/>
</b>
</xsl:template>
<xsl:template match="body">
<body><xsl:apply-templates/></body>
</xsl:template>
<xsl:template match="title">
<title><xsl:apply-templates/></title>
</xsl:template>
<xsl:template match="text">
<text><xsl:apply-templates/></text>
</xsl:template>
<xsl:template match="news">
<news><xsl:apply-templates/></news>
</xsl:template>
</xsl:stylesheet>
Manu
>hi, the problem is:
>
>wherever this is found <OTNSC-B></OTNSC-B>(in xml file)
> letters letters letters <OTNSC-B>text text</OTNSC-B> letters letters
>replace it (in the html output) in the same position with <b></b>
> letters letters letters <b>text text</b> letters letters
>
>Samples:
>
>XML file:
><body>
> <news>
> <title>Titulo de la new comnes <OTNSC-B>tenebant</OTNSC-B> inde toro
>pater.</title>
> <text>Texto de la new <OTNSC-B>Fracti bello</OTNSC-B> fatisque repulsi
>ducto</text>
> </news>
> <news>
> <title>asd asdasd asdad <OTNSC-B>fghfg</OTNSC-B> fhfg eyeye df d
>dfh</title>
> <text>ewferf erfer erg<OTNSC-B>yuky aedths</OTNSC-B> dfgdf dfgdfg
>dfgd</text>
> </news>
></body>
>
>XSL file resume:
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list