Re: XML Challenge Cannot
Liam R E Quin <[email protected]> Sat, 18 Dec 2010 01:36:03 -0500
| Newsgroups | gmane.comp.lang.perl.xml,gmane.comp.lang.perl.beginners |
|---|---|
| Organization | W3C - World Wide Web Consortium |
| Message-ID | <[email protected]> |
On Sat, 2010-12-18 at 10:50 +0530, Chaitanya Yanamadala wrote: > Hai > I have a new challenge based on the XML. I have tried with various > combination s but could not able to resolve it. So i request you guys to > help me out on this. I think the first question is, why are you using Perl for this? The next is, how is the output to be derived from the input? It looks as if you're removing the lowest-level "group" element, and where there are two consecutive title elements you use only the second. If that's right, the following XSLT will do it. On Linux, *BSD, Solaris, OS X etc, you can use xsltproc try.xsl try.xml > output.xml You can also access XSLT from within Perl of course. I did not bother with the whitespace and CDATA sections you used. Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org _______________________________________________ Perl-XML mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
try.xsl
(application/xslt+xml, 743 B) - not displayed