Re: Xform ( 2 reférences pour le même input)

Eric van der Vlist <[email protected]>
Newsgroups gmane.text.xml.french.tech
Organization Dyomedea (http://dyomedea.com)
Message-ID <[email protected]>
Bonjour,
Le lundi 24 avril 2006 à 08:37 +0200, naji elfadly a écrit :
> Bonjour, 
>   je suis un nouveau utilisateur de Xform, ( j'ai choisi Xform comme
> technologie pour achever la première partie de mon stage.
>   je veux pouvoir réferencer ma case du formulaire à deux niveaux
> differents de mon arborescence XML, par exemple :
>    <patient>
>        <name>
>         <given qualifier="AC">      
>          <value/>
>         </given> 
>         <test qualifier="AC">      
>          <value/>
>         </test> 
>         <family qualifier="BR">      
>          <value/>
>         </family> 
>        </name>
>   </patient>
>    
>   je souhaite que les elements "test" et "given/value" récuperent le
> même input; est ce qu'il existe dans la syntaxe Xpath  une _expression
> du genre :
>    
>   <xforms:input 
>       ref[1]="/patient/name/test[@qualifier='AC']/value" 
>       ref[2]="/patientRole/patient/name/given[@qualifier='AC']/value">
>    <xforms:label style="width:150px;">prenom</xforms:label><n/>
>    </xforms:input> 

Non, par contre vous pouvez définir un de ces éléments de manière
classique, par exemple :

<xforms:input 
      ref="/patient/name/test[@qualifier='AC']/value" >

et, dans le modèle XForms, utiliser un "xforms:bind" pour affecter la
valeur de cet élément au second:

<xforms:bind
nodeset="/patientRole/patient/name/given[@qualifier='AC']/value"
calculate="/patient/name/test[@qualifier='AC']/value"/>

Cordialement,

Eric van der Vlist

-- 
GPG-PGP: 2A528005
If you have a XML document, you have its schema.
                                                  http://examplotron.org
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


-- Attached file included as plaintext by Ecartis --

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBETKDRDvn+ZCpSgAURAiTNAJ4gXOHRoaonwUVJo/ki2yBYrP6egwCfW7md
L4cMBVGp4ccknGHFuXc6Uwk=
=MHn0
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.