Want to do schema mapping in XPATH?

Load the schema map object's XML into a nodeset local var called
SCHEMA-MAP and for the most part, this XPATH will convert for you, where
$current-node is the attr name you need converted. (Imagine you were
looping through .//@attr-name )

eDir name to App name:
$SCHEMA-MAP/attr-name-map/attr-name[app-name/text()=string($current-node)]/nds-name/text()

App Name to eDir name:
$SCHEMA-MAP/attr-name-map/attr-name[nds-name/text()=string($current-node)]/app-name/text()

There are a number of issues with this simplistic approach (like if the
same attr has different definitions in the map based on object class,
but those are an easy thing to add, just modify the predicate to require
the class-name= whatever as well.

Cute eh?


--
geoffc
------------------------------------------------------------------------
geoffc's Profile: http://forums.novell.com/member.php?userid=1904
View this thread: http://forums.novell.com/showthread.php?t=415302