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

Re: reolacing tags

Subject: Re: reolacing tags
From: Manu KY <manu_kry@xxxxxxxxx>
Date: Fri, 19 Oct 2001 16:53:30 +0530
otnsc
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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.