i have a page with a menu. This menu could change the page. This is an extract from the page-flow: <page id="defautPage" path-info="/competences/" model="selectionInstancePage.xpl" view="view.xsl" default-submission="dist/sessions/sessionDefaut.xml"/> In the session-instance, there is the name of the new page. In selectionInstancePage.xpl, I agregate the xml for the page. And in view.xsl, i see the page with XSLT. The first page (defaultPage) is OK. This is the problem: when I change the page with the menu, the session-instance change, but not the part of the page with XSLT. An idee? Fabien Sorry for my poor english. view.xsl: <html xsl:version="2.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:fr="http://orbeon.org/oxf/xml/form-runner" xmlns:widget="http://orbeon.org/oxf/xml/widget" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xf="http://www.w3.org/2002/xforms"> <head> <title>Menu du site avec XForms</title> <link rel="stylesheet" href="/apps/competences/dist/css/formulaires.css" type="text/css" media="projection, screen" /> <link rel="stylesheet" href="/apps/competences/dist/css/menu.css" type="text/css" media="projection, screen" /> <!-- Mise en place des modèles et instances spécifiques à la page --> <xf:model id="menuModel" xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms"> <xf:instance id="menuInstance" src="/apps/competences/dist/interface/menu.xml" /> <xf:instance id="sessionInstance" src="input:instance" /> <xf:submission id="changePage" action="/competences" method="post" ref="instance('sessionInstance')" replace="instance" instance="sessionInstance" /> </xf:model> </head> <body> <!-- Ligne de menu commun à toutes les pages --> <xxforms:variable name="nom-page" select="concat('/apps/competences/dist/',instance('sessionInstance')/page/ssTitre/@nom,'.xml')" model="menuModel"/> <xi:include href="/apps/competences/dist/interface/menuBody.xml" parse="xml" /> <!-- Colonne de gauche commune évolutive contenant la mémoire des sélections précédentes --> <div id="divColonneGauche"/> <!-- Page principale obtenue par séléction à partir du menu --> <div id="divPage"> <h1> <xf:output value="$nom-page" /></h1> <xsl:copy-of select="/resultat/page/*"/> </div> <widget:xforms-instance-inspector id="orbeon-xforms-inspector" /> </body> </html> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Fabien,
You can see XSLT as a preprocessing step, executed once only each time the page is sent to the browser. XForms on the other hand operates as the user interacts with the page. Changing values in instances, running actions, etc. with XForms does not cause the XSLT which produced the page to re-evaluate. In your case, you could reload the page, e.g. doing an XForms submission to the page (<xforms:submission replace="all" ...>), passing URL parameters or posting an XML document that identifies the new page. This will cause the page to reload in the browser. -Erik On Thu, Feb 18, 2010 at 2:22 PM, Fabien GUENEGO <[hidden email]> wrote: > > i have a page with a menu. This menu could change the page. > > This is an extract from the page-flow: > <page id="defautPage" path-info="/competences/" > model="selectionInstancePage.xpl" view="view.xsl" > default-submission="dist/sessions/sessionDefaut.xml"/> > > In the session-instance, there is the name of the new page. > In selectionInstancePage.xpl, I agregate the xml for the page. > And in view.xsl, i see the page with XSLT. > The first page (defaultPage) is OK. > This is the problem: > when I change the page with the menu, the session-instance change, but not > the part of the page with XSLT. > > An idee? > > Fabien > Sorry for my poor english. > > > view.xsl: > <html xsl:version="2.0" xmlns="http://www.w3.org/1999/xhtml" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xi="http://www.w3.org/2001/XInclude" > xmlns:fr="http://orbeon.org/oxf/xml/form-runner" > xmlns:widget="http://orbeon.org/oxf/xml/widget" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > xmlns:xf="http://www.w3.org/2002/xforms"> > <head> > <title>Menu du site avec XForms</title> > <link rel="stylesheet" href="/apps/competences/dist/css/formulaires.css" > type="text/css" media="projection, screen" /> > <link rel="stylesheet" href="/apps/competences/dist/css/menu.css" > type="text/css" media="projection, screen" /> > > > <!-- Mise en place des modèles et instances spécifiques à la page --> > <xf:model id="menuModel" xmlns="http://www.w3.org/1999/xhtml" > xmlns:ev="http://www.w3.org/2001/xml-events" > xmlns:xf="http://www.w3.org/2002/xforms"> > > <xf:instance id="menuInstance" > src="/apps/competences/dist/interface/menu.xml" /> > > <xf:instance id="sessionInstance" src="input:instance" /> > <xf:submission id="changePage" action="/competences" > method="post" ref="instance('sessionInstance')" replace="instance" > instance="sessionInstance" /> > > </xf:model> > > > </head> > <body> > > <!-- Ligne de menu commun à toutes les pages --> > <xxforms:variable name="nom-page" > select="concat('/apps/competences/dist/',instance('sessionInstance')/page/ssTitre/@nom,'.xml')" > model="menuModel"/> > > <xi:include href="/apps/competences/dist/interface/menuBody.xml" parse="xml" > /> > > <!-- Colonne de gauche commune évolutive contenant la mémoire des sélections > précédentes --> > <div id="divColonneGauche"/> > > <!-- Page principale obtenue par séléction à partir du menu --> > <div id="divPage"> > <h1> <xf:output value="$nom-page" /></h1> > <xsl:copy-of select="/resultat/page/*"/> > </div> > > <widget:xforms-instance-inspector id="orbeon-xforms-inspector" /> > > </body> > </html> > > > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Erik,
thanks. I choose the "replace='all' " solution :-) Erik Bruchez a écrit : > Fabien, > > You can see XSLT as a preprocessing step, executed once only each time > the page is sent to the browser. > > XForms on the other hand operates as the user interacts with the page. > Changing values in instances, running actions, etc. with XForms does > not cause the XSLT which produced the page to re-evaluate. > > In your case, you could reload the page, e.g. doing an XForms > submission to the page (<xforms:submission replace="all" ...>), > passing URL parameters or posting an XML document that identifies the > new page. This will cause the page to reload in the browser. > > -Erik > > On Thu, Feb 18, 2010 at 2:22 PM, Fabien GUENEGO <[hidden email]> wrote: > >> i have a page with a menu. This menu could change the page. >> >> This is an extract from the page-flow: >> <page id="defautPage" path-info="/competences/" >> model="selectionInstancePage.xpl" view="view.xsl" >> default-submission="dist/sessions/sessionDefaut.xml"/> >> >> In the session-instance, there is the name of the new page. >> In selectionInstancePage.xpl, I agregate the xml for the page. >> And in view.xsl, i see the page with XSLT. >> The first page (defaultPage) is OK. >> This is the problem: >> when I change the page with the menu, the session-instance change, but not >> the part of the page with XSLT. >> >> An idee? >> >> Fabien >> Sorry for my poor english. >> >> >> view.xsl: >> <html xsl:version="2.0" xmlns="http://www.w3.org/1999/xhtml" >> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xi="http://www.w3.org/2001/XInclude" >> xmlns:fr="http://orbeon.org/oxf/xml/form-runner" >> xmlns:widget="http://orbeon.org/oxf/xml/widget" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" >> xmlns:xf="http://www.w3.org/2002/xforms"> >> <head> >> <title>Menu du site avec XForms</title> >> <link rel="stylesheet" href="/apps/competences/dist/css/formulaires.css" >> type="text/css" media="projection, screen" /> >> <link rel="stylesheet" href="/apps/competences/dist/css/menu.css" >> type="text/css" media="projection, screen" /> >> >> >> <!-- Mise en place des modèles et instances spécifiques à la page --> >> <xf:model id="menuModel" xmlns="http://www.w3.org/1999/xhtml" >> xmlns:ev="http://www.w3.org/2001/xml-events" >> xmlns:xf="http://www.w3.org/2002/xforms"> >> >> <xf:instance id="menuInstance" >> src="/apps/competences/dist/interface/menu.xml" /> >> >> <xf:instance id="sessionInstance" src="input:instance" /> >> <xf:submission id="changePage" action="/competences" >> method="post" ref="instance('sessionInstance')" replace="instance" >> instance="sessionInstance" /> >> >> </xf:model> >> >> >> </head> >> <body> >> >> <!-- Ligne de menu commun à toutes les pages --> >> <xxforms:variable name="nom-page" >> select="concat('/apps/competences/dist/',instance('sessionInstance')/page/ssTitre/@nom,'.xml')" >> model="menuModel"/> >> >> <xi:include href="/apps/competences/dist/interface/menuBody.xml" parse="xml" >> /> >> >> <!-- Colonne de gauche commune évolutive contenant la mémoire des sélections >> précédentes --> >> <div id="divColonneGauche"/> >> >> <!-- Page principale obtenue par séléction à partir du menu --> >> <div id="divPage"> >> <h1> <xf:output value="$nom-page" /></h1> >> <xsl:copy-of select="/resultat/page/*"/> >> </div> >> >> <widget:xforms-instance-inspector id="orbeon-xforms-inspector" /> >> >> </body> >> </html> >> >> >> >> -- >> You receive this message as a subscriber of the [hidden email] mailing >> list. >> To unsubscribe: mailto:[hidden email] >> For general help: mailto:[hidden email]?subject=help >> OW2 mailing lists service home page: http://www.ow2.org/wws >> >> >> -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |