A Forum reader recently asked:

“I’m looking to modify an existing stylesheet that writes a custom string attribute into eDirectory. It changes the content of this attrib from a free-form string to an XML string. I want the equivalent of a DirXML script “token-xml-serialize” in XSLT / XPATH.

Basically, I’m looking to reverse this Cool Solution:

And here’s the response from Father Ramon …


Try this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
   exclude-result-prefixes="domwriter stringwriter exsl" >
<xsl:template match="/">

   <xsl:variable name="mynode-set">
     <node1 attr1="test" attr2="moretext">
       <node1 attr3="text"/>

   <xsl:variable name="stringWriter" select="stringwriter:new()"/>
   <xsl:variable name="domWriter" 
select="domwriter:new(exsl:node-set($mynode-set), $stringWriter)"/>
   <xsl:variable name="temp" select="domwriter:write($domWriter)"/>
   <xsl:variable name="serialized" 
   <xsl:value-of select="$serialized"/>


0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Categories: Uncategorized

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
Dec 26, 2007
6:38 pm
Active Directory Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management Knowledge Depot LDAP Migrating from Windows XP or 2003 to SUSE Linux Monitoring Open Enterprise Server Passwords Reporting Secure Access Sentinel Supported Troubleshooting Workflow