Article
Problem
A Forum reader described the following situation:
"I want to sync one source to two destinations in the same tree, going one way, with one DirXML driver.
It's my understanding that the placement stylesheet contains only one dest-dn attribute that can be used to set one destination. How can I set 2 destinations in a placement stylesheet, or should that stylesheet have a new event to create another one?"
For example, \tree\O\srcDept\user1 would sync to
\tree\O\destDept\subDept1\user1 and
\tree\O\destDept\subDept2\user1 ..."
And here's some advice from Father Ramon ...
Solution
The way that is least likely to cause you problems is to use two drivers (or two sets of drivers in the case of an eDir-eDir connection).
You could also do something like this:
do-set-dest-dn(\tree\O\destDept\subDept2\user1)
do-clone-xpath(".", "..")
do-set-dest-dn(\tree\O\destDept\subDept1\user1)It could also be done in a stylesheet, but exactly how would depend on the structure of your existing stylesheet. The basic idea is that you have to create another add that is a copy of the original and give it a different dest-dn. I would expect the template to look something like this:
<xsl:template match="add[@class-name="User]">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="dest-dn">
<!-- some code to generate and output the first dn ->
</xsl:attribute>
<xsl:apply-templates select="node()"/>
</xsl:copy>
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:attribute name="dest-dn">
<!-- some code to generate and output the second dn ->
</xsl:attribute>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template> 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.
Related Articles
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- %count lecturas


0