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

Re: XSL omit part of a text inside TAG

Subject: Re: XSL omit part of a text inside TAG
From: buddhi <buddhi@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Mar 2008 17:33:09 +0530
Re:  XSL omit part of a text inside TAG
Hi All

I did it..

<xsl:template match="VisualObject[@xsi:type='CBarCode']/FontFace">

- Buddhi -

David Carlisle wrote:
You only want to affect FontFace, so move your template matching down to
that element rather than matching its parent. Also as a general comment
if you have a tempolate that only consists of an xsl:chhose or xsl:if
block it's often better to simplify it to put the test into the match
pattern, so rather than match on all FontFace and then check that teh
parent has the right xsl:type, I just match on the ones you want to


<xsl:stylesheet version="1.0"
<xsl:template match="/">
<xsl:apply-templates select="*"/>

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

<xsl:template match="VisualObject[@xsi:type='CBarCode']/FontFace">
    <xsl:call-template name="while">
      <xsl:with-param name="foo" select="."/>

<xsl:template name="while">
  <xsl:param name="foo"/>
    <xsl:when test="contains($foo,'\')">
      <xsl:call-template name="while">
	<xsl:with-param name="foo" select="substring-after($foo,'\')"/>
      <xsl:value-of select="$foo"/>


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.