🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #510

Pytanie o XPath

#510
From: Dariusz Wojtas
Date: Thu, 19 Oct 2000 10:38
40 lines
1806 bytes
Czy ktos moglby mi podeslac przyklad wykorzystania funkcji 
	substring( string, number [, number])
w arkuszu .xsl ?

Mam taki plik xml

<pub>
<title>Tytul</title>
<body>
   tekst tekst tekst tekst
   tekst tekst tekst tekst
   tekst tekst tekst tekst
   tekst tekst tekst tekst
</body>
</pub>


i odpowiadajacy arkusz .xsl

                        <xsl:template match="pub">
                            <xsl:apply-templates select="title"/>
                            <xsl:apply-templates select="body"/>
                        </xsl:template>

                        <xsl:template match="pub/title">
		<xsl:apply-templates/>
                        </xsl:template>

                        <xsl:template match="pub/body">
		<xsl:apply-templates/>
                        </xsl:template>
===================

Moim zamiarem jest przycinanie tekstu w body do pewnej ilosci znakow,
i jesli zostal przyciety do dolozenie tam 3 kropek.

Mam spis funkcji XPath, wyglada na to, ze daje sie to zrobic, ale ja
nie umiem tego wykorzystac, brakuje mi przykladu.

	Dariusz Wojtas
Technical Details
Message-ID: <Pc=uOb9JVg3zgrPjEKqNeKfx0J=Y@4ax.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!not-for-mail
From: Dariusz Wojtas <dwojtas@premiera.pl>
Newsgroups: pl.comp.xml
Subject: Pytanie o XPath
Date: Thu, 19 Oct 2000 12:38:59 +0200
Organization: http://news.icm.edu.pl/
Lines: 40
Message-ID: <Pc=uOb9JVg3zgrPjEKqNeKfx0J=Y@4ax.com>
NNTP-Posting-Host: gw.premiera.pl
Mime-Version: 1.0
X-Trace: sunsite.icm.edu.pl 971952003 8008 213.25.156.9 (19 Oct 2000 10:40:03 GMT)
X-Complaints-To: abuse@icm.edu.pl
NNTP-Posting-Date: Thu, 19 Oct 2000 10:40:03 +0000 (UTC)
X-Newsreader: Forte Agent 1.6/32.525
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit