aspose file tools
The moose likes XML and Related Technologies and the fly likes How to write the xsl for this... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to write the xsl for this..." Watch "How to write the xsl for this..." New topic
Author

How to write the xsl for this...

Avi Nash
Ranch Hand

Joined: Jul 17, 2003
Posts: 69
Hi all
How to write the xsl for this data in xml:
<Node>
<A>a1</A>
<B>b1</B>
<A>a2</A>
<B>b2</B>
<A>a3</A>
<B>b3</B>
.......
.......
</Node>
I want the output xml (after applying the xsl) to be:
<A>a1</A>
<B>b1</B>
<A>a2</A>
<B>b2</B>
<A>a3</A>
<B>b3</B>
........
........
Help required Imme. Thanks in advance.
-Avinash
Nimchi Yung
Ranch Hand

Joined: Jan 27, 2004
Posts: 71
Try this:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl utput method="xml" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/Node/*">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

--Nimchi
 
jQuery in Action, 2nd edition
 
subject: How to write the xsl for this...