Article View: pl.comp.xml
Article #10003Re: [XSLT] Dynamiczne szablony
From: Mariusz S.
Date: Mon, 15 Sep 2008 17:34
Date: Mon, 15 Sep 2008 17:34
37 lines
2279 bytes
2279 bytes
Andrew Cohen pisze:
> Mariusz S. pisze:
>> Jeżeli wywołam parametr GET ?akcja=lista to automatycznie pobierany jest
> A w jaki sposób przechodzisz od zapytania GET do szablonu, w którym
> jest choose?
każdy moduł ma swój plik główny np. kontakt.xsl i obecnie w nim
importuje <xsl:import ... /> wszystkie potrzebne szablony.
A w szablonie <xsl:apply-templates select="." mode="Body"/> znajduje się
jeszcze <xsl:template match="zakladka" mode="Akcja"> z choose.
Chciałbym uzyskać takie efekt, aby pozbyć się choose z szablonu "Akcja"
i robić to automatycznie.
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:import href="head.xsl"/>
<xsl:import href="body.xsl"/>
<xsl:import href="kontakt_dodaj.xsl"/>
<xsl:import href="kontakt_lista.xsl"/>
<xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0
Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="system">
<html lang="pl">
<head>
<xsl:apply-templates select="." mode="Head"/>
</head>
<body>
<xsl:apply-templates select="." mode="Body"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Technical Details
Message-ID:
<gam6aj$4rj$1@news.onet.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mailReferences:
<galask$skr$1@news.onet.pl> <galq2q$tpl$1@news.onet.pl> <galtep$9n0$1@news.onet.pl> <gam266$nar$1@news.onet.pl> <gam47c$tmc$1@news.onet.pl> <gam4rs$ugc$2@news.onet.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.onet.pl!not-for-mail From: "Mariusz S." <seraf1@poczta.onet.pl> Newsgroups: pl.comp.xml Subject: Re: [XSLT] Dynamiczne szablony Date: Mon, 15 Sep 2008 19:34:08 +0200 Organization: Onet.pl Lines: 37 Message-ID: <gam6aj$4rj$1@news.onet.pl> References: <galask$skr$1@news.onet.pl> <galq2q$tpl$1@news.onet.pl> <galtep$9n0$1@news.onet.pl> <gam266$nar$1@news.onet.pl> <gam47c$tmc$1@news.onet.pl> <gam4rs$ugc$2@news.onet.pl> NNTP-Posting-Host: abbi49.neoplus.adsl.tpnet.pl Mime-Version: 1.0 X-Trace: news.onet.pl 1221500052 4979 83.6.198.49 (15 Sep 2008 17:34:12 GMT) X-Complaints-To: usenet@news.onet.pl NNTP-Posting-Date: Mon, 15 Sep 2008 17:34:12 +0000 (UTC) X-Sender: T8UdM87ulIrZj/lbLgtvSpX/7n/BD/Ys In-Reply-To: <gam4rs$ugc$2@news.onet.pl> User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit