Absent Member.
Absent Member.

Escape DN using a DN format other than Source or Dest

I've had this problem several times now.

Problem: Calling token-escape-for-dest-dn will use the driver's defined "Supported DN format" in it's escaping rules. There is no way to override this and specify that you want to use another DN format for escaping.

For example: In a null where the Supported DN format (aka Dest-dn-format) is "slash", have tried to tweak this value without success.

What I actually wanted was to within a Null Driver, escape a dn fragment using LDAP DN format instead.

The following code seems to work (but is a bit ugly)

<token-replace-first regex="cn=" replace-with="">
<token-parse-dn dest-dn-format="ldap">
<token-text xml:space="preserve">cn=</token-text>
<token-local-variable name="dnFragment"/>

I suspect that it could also be done via calling the getName method of the XdsDN class as it allows you to specify the DN format delimiters. Has anyone tried that?

Anyone got other another idea/approach?
Labels (1)
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.