Selecting a certain amount of characters with XSL

Subject: Selecting a certain amount of characters with XSL
From: Regine Vergon <regine_vergon@xxxxxxxxx>
Date: Wed, 8 Mar 2000 05:46:33 -0800 (PST)
Hi,

I have ax xml like this 

...
<Text>
  <TextItem num="1">
    <TextItemText>bla bla number 1</TextItemText> 
  </TextItem>
  <TextItem num="2">
    <TextItemTitle>the title</TextItemTitle> 
    <TextItemText>?bla bla number 2</TextItemText> 
  </TextItem>
  <TextItem num="3">
    <TextItemTitle>the title number 3</TextItemTitle> 
    <TextItemText>bla bla number 3</TextItemText> 
  </TextItem>
</Text>
  
And i have 2 stylesheets. One to transform from XML to HTML and another to
transform from XML to WML.

The Text tag can be very long and on a WAP telephone there is a limit regarding
the amount of characters to be displayed. 
What i want to do is to select 1000 characters from the text tag

How do i do that ?
Here is my stylesheet
....

  <xsl:template match="Text">
    <p align="left">
      <xsl:apply-templates></xsl:apply-templates>
    </p>
  </xsl:template>
   
  <xsl:template match="TextItem">
    <xsl:apply-templates></xsl:apply-templates>
    <br/>
  </xsl:template>
  
  <xsl:template match="TextItemTitle">
    <b>
      <xsl:value-of select="."></xsl:value-of>
    </b>
    <br/>
  </xsl:template>
  
  <xsl:template match="TextItemText">
    <xsl:value-of select="."></xsl:value-of>
    <br/>
  </xsl:template>   

I don't want to have 
 <xsl:template match="TextItemText">
    <xsl:value-of select="substring(.,1,1000)"></xsl:value-of>
    <br/>
  </xsl:template>   

because this will select 1000 characters for the each tag TextItemText

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


Current Thread