I'm using the BIE workflow engine and after querying an LDAP DSA I need
to transform the XML response, which looks like -
<?xml version="1.0" encoding="UTF-8" ?>
<batchRespons e xmlns="urn:oasi s:names:tc:DSML :2:0:core"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<searchRespon se requestID="9">
<searchResultEn try dn="cn=Larry Simmons,ou=Peop le,o=Morrison
Industries,c=US " requestID="9">
attr name="morrisons erialid">
<value>1015</value>
</attr>
<attr name="birthDate ">
<value>02/17/1948</value>
</attr>
<attr name="cn">
<value>Larry Simmons</value>
</attr>
<attr name="employeeN umber">
<value>KZO004 </value>
</attr>
</searchResultEnt ry>
.....
<searchResultDo ne requestID="9">
<resultCode code="0" descr="Success" />
</searchResultDon e>
</searchResponse>
</batchResponse>
Into something like -
<result>
<row>
<cn>...</cn>
<birthdate>.. .</birthdate>
....
</row>
....
</result>
So I have an xslt like
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<result>
<xsl:for-each
select="batchRe sponse/searchResponse/searchResultEnt ry">
<xsl:sort select="morriso nserialid"/>
<row>
<cn><xsl:valu e-of select="attr[@name='cn']/value"/></cn>
<birthdate><xsl :value-of
select="attr[@name='birthday ']/value"/></birthdate>
<morrisonserial id><xsl:value-of
select="attr[@name='morrison serialid']/value"/></morrisonseriali d>
<fileAs><xsl:va lue-of
select="attr[@name='fileAs']/value"/></fileAs>
<startDate><xsl :value-of
select="attr[@name='morrison positionstartda te']/value"/></startDate>
</row>
</xsl:for-each>
</result>
</xsl:template>
</xsl:stylesheet>
Only when I -
xsltproc /var/spool/bie/xslt/dsaEmployeeExpo rt.2.xslt /tmp/ldapData.xml
- all I get is -
<?xml version="1.0"?>
<result/>
Huh?