[jdom-interest] (no subject)

Raffaele Sena raff at aromatic.org
Thu Oct 24 10:58:12 PDT 2002

> Can you pl suggest me a solution, for this transformation.  Is JDOM
> for the transormation ?
    I thought this message was posted on one of the XSL mailing lists I
    and I was wondering why you would ask about JDOM. Then I realized: wrong
list! :)

    Yes, you can probably use JDOM and scan the tree a few times to create a
new structure the way you describe.

    If you are interested in the XSL transformation here is the code (that
you can
    run in your favorite XSLT processor) .

-- Raffaele

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"

<xsl:template match="/Employees">
    <xsl:apply-templates select="employee[@managerId='null']"/>

<xsl:template match="employee">
  <employee id="{@id}" name="{@name}">
    <xsl:variable name="id" select="@id"/>
    <xsl:apply-templates select="../employee[@managerId=$id]"/>


More information about the jdom-interest mailing list