![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Stumped Transforming DSML Data With XSLT` Stumped Transforming DSML Data With XSLT`To: NULL Date: 2/1/2005 11:03:00 AM 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" ?> <batchResponse xmlns="urn:oasis:names:tc:DSML:2:0:core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <searchResponse requestID="9"> <searchResultEntry dn="cn=Larry Simmons,ou=People,o=Morrison Industries,c=US" requestID="9"> attr name="morrisonserialid"> <value>1015</value> </attr> <attr name="birthDate"> <value>02/17/1948</value> </attr> <attr name="cn"> <value>Larry Simmons</value> </attr> <attr name="employeeNumber"> <value>KZO004</value> </attr> </searchResultEntry> .... <searchResultDone requestID="9"> <resultCode code="0" descr="Success" /> </searchResultDone> </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:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <result> <xsl:for-each select="batchResponse/searchResponse/searchResultEntry"> <xsl:sort select="morrisonserialid"/> <row> <cn><xsl:value-of select="attr[@name='cn']/value"/></cn> <birthdate><xsl:value-of select="attr[@name='birthday']/value"/></birthdate> <morrisonserialid><xsl:value-of select="attr[@name='morrisonserialid']/value"/></morrisonserialid> <fileAs><xsl:value-of select="attr[@name='fileAs']/value"/></fileAs> <startDate><xsl:value-of select="attr[@name='morrisonpositionstartdate']/value"/></startDate> </row> </xsl:for-each> </result> </xsl:template> </xsl:stylesheet> Only when I - xsltproc /var/spool/bie/xslt/dsaEmployeeExport.2.xslt /tmp/ldapData.xml - all I get is - <?xml version="1.0"?> <result/> Huh? | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
