Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Stumped Transforming DSML Data With XSLT`

From: awilliam@---------.---
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?



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent