This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Selecting a certain amount of characters with XSL


Thanks for help !!

May i ask another question ?

As you said i modified my stylesheet like this:

 <xsl:template match="Text">
    <p align="left">
      <xsl:variable name="x">     
        <xsl:for-each select="TextItem"> 
          <xsl:apply-templates></xsl:apply-templates>
          <br/>
        </xsl:for-each>
      </xsl:variable>
      <xsl:copy-of select="$x"/> 
    </p>
  </xsl:template>   

I got the content of x variable with <b> <br> tags evaluated.

If a replace 
      <xsl:copy-of select="$x"/>
with
      <xsl:copy-of select="substring($x,1,1000)"/>

because i still want only 1000 characters i loose <b> and <br> tags. 

How can i combine a substring and a copy of ?

Thanks

Regine

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]