[XML-SIG] Re: [4suite] XSLT magic

Olivier CAYROL (Logilab) Olivier.Cayrol@logilab.fr
Thu, 6 Dec 2001 19:45:28 +0100 (CET)


On Thu, 6 Dec 2001, Nicolas Chauvat wrote:

> tentative algorithm in the stylesheet would be
>=20
> match any node
> =09copy current node
> =09if current node is pointed to by the xpath of one of the xupdate
> =09   nodes :
> =09=09add an attribute revisionflag whose value depends on the
> =09=09=09node name of the above xupdate node
>=20
> My current problem is with "current node is pointed to by the xpath"...

  Actually, what you want to do is using a string expression extracted
from your XML input as an XPath inside your XSLT code to select nodes
inside another XML input.

  This is not possible with standard XSLT instructions and XPath
functions. Nevertheless, you can use an extension function to do this :
  - in exslt: dyn:evaluate(string) (see following address for details:
http://www.exslt.org/dyn/functions/evaluate/index.html ). But, the problem
could be that your favorite XSL processor doesn't implement this function.
  - if your favorite processor is 4xslt, you can use 4Suite extension
function called ft:evaluate(string) (see following address for details:
http://www.4suite.org/4Suite.org/documents/4Suite/4XPath-Extensions#evaluat=
e
).

  Hoping this will help,

    O. CAYROL.
_________________________________________________________________________
Olivier CAYROL                                   LOGILAB - Paris (France)
                                                 http://www.logilab.com/
Change your millenium, try NARVAL the Intelligent Personal Assistant.
Changez de mill=E9naire, essayez NARVAL l'Assistant Personnel Intelligent.
_________________________________________________________________________