|
Subject: [xsl] Changing <b> to "[" From: Edierley Messias <edierley@xxxxxxxxxxx> Date: Mon, 22 Jan 2001 20:30:30 -0200 (EDT) |
Hi People,
I need to replace
all <b> and <i> with "[" , and
all </b> and </i> with "]"
in a XML file.
Everything was fine with the xsl below,
but when I have a <b><i>text</i></b> sequence
the result is:
[<i>text</i>]
And I need:
[[text]]
Do you have some ideia to look inside the match and apply the template
again?
Thank you very much.
- - - - - - - - - - - - - - - - - - - - - - - - -
XSL used:
<!--MAIN TEMPLATE-->
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-ELEMENTS B and I-->
<xsl:template match="b|i">
<xsl:text>[</xsl:text>
<xsl:copy-of select="@*|node()"/>
<xsl:text>]</xsl:text>
</xsl:template>
- - - - - - - - - - - - - - - - - - - - - - - - -
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Attribute default values , Andrew Kimball | Thread | Re: [xsl] Changing <b> to "[", Derek Ngok |
| Re: [xsl] Merging XML data from dif, Jeni Tennison | Date | RE: [xsl] Extending DTD + FOP Books, Max Dunn |
| Month |