Article View: fr.comp.text.xml
Article #9631pb cache - XSP/XSL & Cocoon
From: Mikael
Date: Sun, 18 Feb 2001 06:09
Date: Sun, 18 Feb 2001 06:09
109 lines
3923 bytes
3923 bytes
Bonjour,
J'ai un pb de cache avec Cocoon.
J'ai 2 scripts XSL et une base de CV en XML.
Le premier script op�re une s�lection sur la base selon certains param�tres
donn�s par l'url.
Le deuxi�me script travaille sur le r�sultat du premier et g�n�re un script
XSP qui, une fois �x�cut�, produit de l'HTML.
Mon probl�me est que la page rendue par ce processus reste toujours la m�me,
alors que je fais varier les param�tres.
J'ai essay� en enlevant le code XSP du deuxi�me script et l�, plus de
probl�me !
Quelqu'un aurait-il une solution � ce probl�me ??
Merci d'avance
Mikael
PS :
Voici quelques fragments de code :
base de cv :
__________________________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="copie.xsl" type="text/xsl"?>
<!DOCTYPE base SYSTEM "dtd.xml">
<base>
<cv>
<identite>
................etc
--------------------------------------------
copie.xsl : effectue un trie et copie les cv retenus
______________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="ecrit" select="0"/>
<xsl:param name="lu" select="0"/>
<xsl:param name="parle" select="0"/>
<xsl:template match="base">
<xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>
<xsl:processing-instruction name="xml-stylesheet">href="affichage.xsl"
type="text/xsl"</xsl:processing-instruction>
<base>
<xsl:for-each select="cv">
<xsl:if
test="count(ambitions/disponibilite/oui)>0 and
count(langues/langue[nom = 'Anglais'
and niveau/ecrit >= $ecrit
and niveau/lu >= $lu
and niveau/parle >= $parle])>0">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:if>
</xsl:for-each>
</base>
</xsl:template>
................etc
---------------------------------
affichage.xsl : convertit certaines valeurs num�riques en cha�nes et
transforme en html
_________________________________________________________________
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<xsl:template match="base">
<xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<xsp:logic>
private static String niveau(String s) {
String res = new String("");
if (s == "1") res = "mauvais";
if (s == "2") res = "moyen";
if (s == "3") res = "bon";
return res;
}
</xsp:logic>
<html>
<head>
<title><xsl:text>Base de CV</xsl:text></title>
</head>
<body bgcolor="#ffffff">
<xsl:for-each select="cv">
<xsl:apply-templates/>
..................
Technical Details
Message-ID:
<96noss$off$1@news5.isdnet.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!isdnethub!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: FRENCH,ASCII X-Google-Thread: 114f60,6087463a1822efa1,start X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-02-17 22:10:00 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!isdnet!isdnethub!not-for-mail From: "Mikael" <kgt@noos.fr> Newsgroups: fr.comp.text.xml Subject: pb cache - XSP/XSL & Cocoon Date: Sun, 18 Feb 2001 07:09:13 +0100 Lines: 111 Message-ID: <96noss$off$1@news5.isdnet.net> NNTP-Posting-Host: d048.dhcp212-74.cybercable.fr X-Trace: news5.isdnet.net 982476508 25071 212.198.74.48 (18 Feb 2001 06:08:28 GMT) X-Complaints-To: abuse@isdnet.net NNTP-Posting-Date: 18 Feb 2001 06:08:28 GMT 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