|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Limit in XSL how many chars from some value-of node will be displayed
Hi,
I have sample: <description> node in XML has 150 chars of some text I wish to limit via XSL displaying all 150 chars from node <description> to first 50 chars Is that accomplishable via XSL and I would need some code help. thx |
|
#2
|
|||
|
|||
|
use this:
<xsl:value-of select="substring(description, 1, 50)" /> this will work assuming you're in the right context (ie: in the parent node of description).. otherwise, all you'd have to change is the reference to description. |
|
#3
|
|||
|
|||
|
thx for quick reply
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Limit in XSL how many chars from some value-of node will be displayed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|