The moose likes XML and Related Technologies and the fly likes XSLT format transformation? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT format transformation?" Watch "XSLT format transformation?" New topic

XSLT format transformation?

bujin wang
Ranch Hand

Joined: Jun 21, 2003
Posts: 48
Hi Developers,
Recently I am working with two version of xml files. They essentially provide the same information. Some tags are moved around; some are renamed. Currently the parser can only parse one version. I have got the option to extend the old parser to parse the new format. However I heard that XSLT could the transformation for me. That way I don't have to worry about parsers. There are some changes I am not sure whether XSLT could handle. for example:

In our old format, c is under b.

This is c
In the new format, c is moved from b, but still b needs to refer to c:
<b refName="aaa">
<c name="aaa">
this is c
As we can see, the c in the new format is included through name attribute.
Can xslt template handle this?
What does the stylesheet look like in this case?
I agree. Here's the link:
subject: XSLT format transformation?
It's not a secret anymore!