🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by andrzej kowalik Thu, 05 Oct 2000 17:24
Dlaczego nie dziala - position()
#435
Author: andrzej kowalik
Date: Thu, 05 Oct 2000 17:24
47 lines
1559 bytes
Czesc
Moze ktos mi podpowie dlaczego w ponizszym przykladzie nie dziala
funkcja "position()" . 

=====  XML ======

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>

	<ATOM>
		<NAME>Hydrogen</NAME>
	</ATOM>


===== XSL =======

<?xml version="1.0"?> 
<xsl:stylesheet  xmlns:xsl="http://www.w3.org/TR/WD-xsl"> 
   <xsl:template match="text()">
	<xsl:value-of select="."/>
   </xsl:template> 
  <xsl:template match="/">
    <HTML>
      <BODY>
        <xsl:apply-templates select="ATOM"/>
      </BODY>
    </HTML>
  </xsl:template>

  <xsl:template match="ATOM">
    <P>
      <xsl:value-of select="position()"/>.
      <xsl:value-of select="NAME"/>
    </P>
  </xsl:template>
    
</xsl:stylesheet>

===============

wyswietla blad :

Unknown method. -->position()<--

IE 5.0 za najnowszym parserem.

Andrzej
Re: Dlaczego nie dziala - position()
#436
Author: Andrzej Dmoch
Date: Thu, 05 Oct 2000 16:13
58 lines
2119 bytes
1. Bo uzywasz starego MSXSL, ktory jest do kitu. Sciagnij nowa wersje z msdn
lub generuj plik statycznie jakims procesorem wsadowym (polecam XT lub
SAXON).
2. Bardziej elegancko byloby uzyc xsl:number.

AnD

andrzej kowalik <andrzej@pnet.pl> wrote in message
news:e9dptso4bjcrg07if4nhbhl4jql95f92uf@4ax.com...
> Czesc
> Moze ktos mi podpowie dlaczego w ponizszym przykladzie nie dziala
> funkcja "position()" .
>
> =====  XML ======
>
> <?xml version="1.0"?>
> <?xml-stylesheet type="text/xsl" href="test.xsl"?>
>
> <ATOM>
> <NAME>Hydrogen</NAME>
> </ATOM>
>
>
> ===== XSL =======
>
> <?xml version="1.0"?>
> <xsl:stylesheet  xmlns:xsl="http://www.w3.org/TR/WD-xsl">
>    <xsl:template match="text()">
> <xsl:value-of select="."/>
>    </xsl:template>
>   <xsl:template match="/">
>     <HTML>
>       <BODY>
>         <xsl:apply-templates select="ATOM"/>
>       </BODY>
>     </HTML>
>   </xsl:template>
>
>   <xsl:template match="ATOM">
>     <P>
>       <xsl:value-of select="position()"/>.
>       <xsl:value-of select="NAME"/>
>     </P>
>   </xsl:template>
>
> </xsl:stylesheet>
>
> ===============
>
> wyswietla blad :
>
> Unknown method. -->position()<--
>
> IE 5.0 za najnowszym parserem.
>
> Andrzej
>
Re: Dlaczego nie dziala - position()
#437
Author: Andrzej Dmoch
Date: Thu, 05 Oct 2000 16:16
10 lines
1109 bytes
Cofam poprzedni punkt 1. Mozliwe, ze masz wszystko ok zaintstalowane ale
przestrzen nazw jest zla:

<xsl:stylesheet  xmlns:xsl="http://www.w3.org/TR/WD-xsl">

(czyli namespace do starej wersji).

W specyfikacji XSLT znajdziesz aktualny namespace.

AnD
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads