Re: [Xsltforms-support] Odd behaviour with xf:itemset and XPath predicate
Brought to you by:
alain-couthures
From: Grégoire C. <gco...@gm...> - 2010-02-18 14:07:06
|
Hi, For information, removing the "model" attribute from the <xf:itemset> element solved this problem. Grégoire Le 15 février 2010 18:25, Grégoire Colbert <gco...@gm...> a écrit : > Hi, > > I've put a "xml:lang" attribute on my main model, as : > > <xf:model id="modele-recherche-requete"> > <xf:instance> > <search xmlns="" xml:lang="en"> > <type/> > <what/> > <where/> > </search> > </xf:instance> > <xf:submission id="submit" action="recherche.xql" method="get" /> > </xf:model> > > What I want to do is to use the attribute's value in the "<search>" element > to retrieve the corresponding strings in my other model, as : > > <xf:select1 ref="/search/type" appearance="full" incremental="true"> > <xf:label><xf:output > ref="instance('instance-types-d-annonce')/resource[@xml:lang=* > /search/@xml:lang*]/label"/></xf:label> > <xf:hint><xf:output > ref="instance('instance-types-d-annonce')/resource[@xml:lang=* > /search/@xml:lang*]/hint"/></xf:hint> > <xf:itemset model="modele-types-d-annonce" > nodeset="instance('instance-types-d-annonce')/resource[@xml:lang=* > /search/@xml:lang***]/item"> > <xf:label ref="label"/> > <xf:value ref="value"/> > </xf:itemset> > </xf:select1> > > This works for the <xf:label> and <xf:hint>, but not for the <xf:itemset> > element (the list remains at "Loading..."). Please note that hard-coding the > language works, as in : > > <xf:itemset model="modele-types-d-annonce" > nodeset="instance('instance-types-d-annonce')/resource[@xml:lang=*'fr'*** > ]/item"> > > Why is the <xf:itemset> element in any way different from <xf:hint> or > <xf:label> regarding XPath? Any help would be kind as I'm out of ideas on > this one. > > Regards, > Grégoire > > |