From: Adam R. <ada...@de...> - 2007-02-26 14:42:57
|
Amagoia, How about the xmldb:change-user() function, does this not allow you to update a users groups? Thanks Adam. On Mon, 2007-02-26 at 06:35 -0800, Amagoia Madina wrote: > Hi, >=20 > I'm developping an application using Orbeon 3.5.M1 and the embbeded > eXist database.=20 >=20 > I'm trying to update the groups in which a user participes, in the > users.xml file. For example, if I have the user: >=20 > <user name=3D"amagoia" uid=3D"1" > password=3D"d2b1e3cf9fc93f0abf99fce600a63638" home=3D"/db/cgc"> > <group>project1-partner</group> > <group>project2-coordinator</group> > </user> >=20 > I use the function xmldb:get-user-groups('<xsl:value-of > select=3D"//username/@name"/>') for getting the groups. But, > afterwards,I have seen that there is no function for modifying them. > Thus, I use XUpdate for doing it: >=20 > <p:processor name=3D"oxf:xslt"> > <p:input name=3D"data" href=3D"#new_instance"/> > <p:input name=3D"config"> > <xdb:update collection=3D"/db/system" xsl:version=3D"2.0"> > <xu:modifications version=3D"1.0"> > <xu:update select=3D"//auth/users/user[@uid =3D > '{/form/document/Person/@PersonId}']"> > <xsl:copy-of select=3D"/form/groups/*"/> > </xu:update> > </xu:modifications> > </xdb:update> > </p:input> > <p:output name=3D"data" id=3D"query2"/> > </p:processor> > =20 > <p:processor name=3D"oxf:xmldb-query"> > <p:input name=3D"datasource" href=3D"#datasource"/> > <p:input name=3D"query" href=3D"#query2"/> > </p:processor> >=20 > The problem is that changes on the users.xml file are not visible > until we restart the database. It there a function for refreshing the > database? otherwise, how could I do the update? >=20 > Thank you very much, >=20 > Amagoia. >=20 >=20 >=20 > ______________________________________________________________________ >=20 > LLama Gratis a cualquier PC del Mundo. > Llamadas a fijos y m=C3=B3viles desde 1 c=C3=A9ntimo por minuto. > http://es.voice.yahoo.com > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ Exist-open mailing list E= xis...@li... https://lists.sourceforge.net/lists/listinf= o/exist-open --=20 Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |