This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Joining two trees
- To: xsl-list-digest at mulberrytech dot com
- Subject: Joining two trees
- From: Matthew Cordes <mcorde61 at maine dot edu>
- Date: Mon, 13 Mar 2000 09:07:13 -0500
- Reply-To: xsl-list at mulberrytech dot com
Hello, I have the following XML...
<Root>
<Category value="Arts, Entertainment, & Media">
<Subject value="African-American Literature">
<Person value="RAIMON">
<Alias>RAIMON</Alias>
<Name>Eve Raimon</Name>
</Person>
</Subject>
</Category>
<Category value="Arts, Entertainment, & Media">
<Subject value="African-American Literature">
<Person value="JKUENZ">
<Alias>JKUENZ</Alias>
<Name>Jane Kuenz</Name>
</Person>
</Subject>
</Category>
</Root>
As you can see, the Category and Subject nodes repeat, Is there a
way I can collapse them into just 1 set of Category and Subject nodes?
I want to iterate over the data and group people who are from similar
categories and subjects.
If there isn't a way top do this, Is there a way to find/test exact node
while creating a tree in perl or java? By this I mean, how in my script
(perl/java) if I was adding JKUENZ (the second Person above) to the tree
could I identify that she should be added to the same category node and
subject node as RAIMON (above) and not create a mostly duplicate limb (as
above). I guess what I want is to be able to use XSL-ish tests to find
specific nodes within my scripts.
I've experimented a little with the Perl XML::XPath modules, Does Java
have any support for XQL or XPath?
-matt
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list