🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #789

Re: Kopiowanie elementu z atrybutami

#789
From: Adam Boczek
Date: Tue, 06 Feb 2001 15:38
38 lines
1856 bytes
W swoj xsl wstaw cos takiego:

<xsl:template match="tag">
 <xsl:element name="tag">
  <xsl:attribute name="att1"><xsl:value-of select="@att1"/></xsl:attribute>
  <xsl:attribute name="att2"><xsl:value-of select="@att2"/></xsl:attribute>
  <xsl:attribute name="att3">Pies</xsl:attribute>
  <xsl:apply-templates/>
 </xsl:element>
</xsl:template>

jest to tzw. jawne definiowanie elementow i atrybutow. Mozna to zrobic
zdecydowanie krocej ale mniej elegancko.
--
Pozdrawiam
Adam
adam.boczek@komako.pl



"Marek Augustyn" <maug@kopnet.gliwice.pl> wrote in message
news:954t2r$qtj$1@zeus.polsl.gliwice.pl...
> Witam!
>
> To chyba dość proste ale męczę się i nie znajduję prostego rozwiązania.
> Chcę skopiować element (używająć XSLT) razem z jego atrybutami, dodając
> nowe, tzn. np. mam:
>
> <tag att1="ala" att2="kot">Tekst</tag>
>
> i chcę skopiować go tak jak jest dodając atrybut att3="pies":
>
> <tag att1="ala" att2="kot" att3="pies">Tekst</tag>
>
> Pozdrawiam,
> August.
>
>
Technical Details
Message-ID: <3a801a6a$1@news.vogel.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!warszawa.rmf.pl!news.tpi.pl!news.vogel.pl
References: <954t2r$qtj$1@zeus.polsl.gliwice.pl>

Show Full Headers
Complete Article Headers
From: "Adam Boczek" <adam.boczek@NO_SPAM.komako.pl>
Newsgroups: pl.comp.xml
References: <954t2r$qtj$1@zeus.polsl.gliwice.pl>
Subject: Re: Kopiowanie elementu z atrybutami
Date: Tue, 6 Feb 2001 16:38:30 +0100
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: gw-komako.inet.com.pl
X-Original-NNTP-Posting-Host: gw-komako.inet.com.pl
Message-ID: <3a801a6a$1@news.vogel.pl>
X-Trace: news.vogel.pl 981473898 gw-komako.inet.com.pl (6 Feb 2001 16:38:18 +0100)
X-Complaints-To: Usenet@news.vogel.pl
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!warszawa.rmf.pl!news.tpi.pl!news.vogel.pl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit