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: http://www.novell.com/coolsolutions/tip/15175.html"
And here's the response from Father Ramon ...
<?xml version="1.0" encoding="UTF-8"?>
exclude-result-prefixes="domwriter stringwriter exsl" >
<node1 attr1="test" attr2="moretext">
<xsl:variable name="stringWriter" select="stringwriter:new()"/>
<xsl:variable name="temp" select="domwriter:write($domWriter)"/>
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.