Hi,

Working on a pretty trivial log that should result in xml output.
But I only get the attribute values in a single row, I have to be
missing a step here.

What I do is a query for some attributes to a nodeset (I expected that
to be xml) and write that variable.

So instead of

<instance class-name="user" qualified-src-dn="O=data\OU=users\CN=joakim"
src-dn="\testtree\data\users\joakim" src-entry-id=104548">
<attr attr-name="Given Name">
<value timestamp="1340286369#22" type="string">Joakim</value>
</attr>
<attr attr-name="Surname">
<value timestamp="1340286352#15" type="string">Ganse</value>
</attr>
</instance>

I get this:
JoakimGanse


This is the code:

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd"
"/home/jocke/designer402/plugins/com.novell.idm.policybuilder_4.0.0.201210161153/DTD/dirxmlscript4.0.2.dtd"><policy>
<rule>
<description>test</description>
<conditions>
<or>
<if-class-name mode="nocase" op="equal">User</if-class-name>
</or>
</conditions>
<actions>
<do-set-local-variable name="currentDLogFile" scope="policy">
<arg-string>
<token-global-variable name="logFileName"/>
<token-time format="yyyyMMdd" tz="UTC"/>
<token-text xml:space="preserve">.xml</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="outputNode" scope="policy">
<arg-string>
<token-query class-name="User">
<arg-match-attr name="CN">
<arg-value type="string">
<token-src-attr name="CN"/>
</arg-value>
</arg-match-attr>
<arg-string>
<token-text xml:space="preserve">Given Name</token-text>
</arg-string>
<arg-string>
<token-text xml:space="preserve">Surname</token-text>
</arg-string>
</token-query>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="logReport" scope="policy">
<arg-object>
<token-xpath
expression="es:writeLog($currentLogFile,$outputNod e)"/>
</arg-object>
</do-set-local-variable>
</actions>
</rule>
</policy>

Do I have to create and format the xml tags manually as text elements or
what would the best way to do an xml output be?

Cheers


--
joakim_ganse
------------------------------------------------------------------------
joakim_ganse's Profile: https://forums.netiq.com/member.php?userid=159
View this thread: https://forums.netiq.com/showthread.php?t=46113