Xslt XML日期程序的反转顺序

Xslt XML日期程序的反转顺序,xslt,Xslt,我正在阅读使用XSLT来颠倒这个播客xml文件的顺序,并以相反的日期顺序创建一个新文件。我了解这个概念,但不了解如何执行此操作,以及在何处放置用于反转此文档的xlst代码 <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005

我正在阅读使用XSLT来颠倒这个播客xml文件的顺序,并以相反的日期顺序创建一个新文件。我了解这个概念,但不了解如何执行此操作,以及在何处放置用于反转此文档的xlst代码

    <?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"  xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>FOOD &amp; WINE with CHEF JAMIE GWEN</title>
  <link>http://www.chefjamie.com/</link>
  <language>en-us</language>
  <copyright>Copyright &#xA9;Tastebud Entertainment, Inc. 2018</copyright>
  <itunes:subtitle>Delicious conversation every Sunday about food and wine</itunes:subtitle>
  <itunes:author>Chef Jamie Gwen</itunes:author>
  <atom:link href="http://chefjamie.com/media/podcasts/Food-Wine-Podcasts/ChefJamie_podcast2.xml" rel="self" type="application/rss+xml" />
  <webMaster>johnm@splithopsbrewing.com (John Merlino)</webMaster>
  <itunes:summary>Syndicated on 70 Plus Stations across the United States and heard live every Sunday!</itunes:summary>
  <description>Explore the culinary world with Jamie and meet top chefs, master sommeliers, cookbook authors and artisan food makers. Two hours of delicious conversation weekly &#33;</description>
  <itunes:explicit>No</itunes:explicit>
  <itunes:image href="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/chefJamie_PodCast_image.jpg" />
  <itunes:name>Chef Jamie Gwen</itunes:name>
  <itunes:email>jamie@chefjamie.com</itunes:email>
  <itunes:owner>Chef Jamie Gwen</itunes:owner>
  <itunes:category text="Arts &amp; Food"/> 
  <itunes:category text="Arts"/>

<item>
<title>Jan 8th, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-8-12.mp3" length="145178121" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-8-12.mp3</guid>
<pubDate>Sun, 08 Jan 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>Wine, Dine, &amp; Balls</itunes:subtitle>
<itunes:summary>Happy New Year 2012.We are LIVE ON THE RADIO Daniel Holtzman of The Meatball Shop NYC shares melt-in-your mouth recipes for Meatballs of every kind. Sophie Gayot of www dot gayot dot com with highlights on Where to Dine in 2012.Jeff Scott, Author of Notes from a Kitchen with insight into the Culinary World.J. Lohr Winemaker Steve Peck fills our glasses with Cabernet and Pinot Noir</itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>1:15</itunes:duration>
<itunes:keywords>food, cooking, wine, talk, cooking podcast, recipe podcast, diy cooking, learn to cook, learn new recipes, recipes, holiday, Christmas,</itunes:keywords>
</item>

<item>
<title>Jan  15th, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-15-12.mp3" length="47757770" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-15-12.mp3</guid>
<pubDate>Sun, 15 Jan 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>Family, Techniques, and Fitness</itunes:subtitle>
<itunes:summary>New Orleans Chef John Besh shares his Family Table. Editor Jack Bishop of Cooks Illustrated Talks about the Techniques of Home Cooking. Karen Page and Andrew Donenburg discuss their newest book on Food and Wine. Fitness Expert Lisa Lynn creates your Workout Strategy for 2012 </itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>49:45</itunes:duration>
<itunes:keywords>food, cooking, wine, talk, cooking podcast, recipe podcast, diy cooking, learn to cook, learn new recipes, recipes, holiday, christmas,</itunes:keywords>
</item>

<item>
<title>Jan  22nd, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-22-12.mp3" length="18924125" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-22-12.mp3</guid>
<pubDate>Sun, 22 Jan 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>Produce, Asian Meals, and Ground Meat</itunes:subtitle>
<itunes:summary>Jamie and Lana Review the Top 10 Best Finds at The Fancy Food Show. Southern Chef Hugh Acheson on Seasonal Produce. Paul Martins American Grill Partner Brian Bennett shares his commitment to Local, Sustainable and Organic. Author Nina Simonds celebrates Chinese New Year with her "Simple Asian Meals". GM and Master Sommelier Michael Jordan LIVE from The Ranch! Jim Villas highlights the best recipes using Ground Meat for Superbowl! From his new cookbook "From The Ground Up" </itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>01:18:51</itunes:duration>
<itunes:keywords>food, cooking, wine, talk, cooking podcast, recipe podcast, diy cooking, learn to cook, learn new recipes, recipes, holiday, Christmas,</itunes:keywords>
</item>

<item>
<title>Jan  29th, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-29-12.mp3" length="161118248" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-29-12.mp3</guid>
<pubDate>Sun, 29 Jan 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>Superbowl of Food, Salmon, Spices, and BBQ</itunes:subtitle>
<itunes:summary>Gridiron Grub: Lana and Jamie dish on the Superbowl of Food. Jeff Hall of Chapter One in Santa Ana highlights the Newest Artisan Spirits On The Market. Fish Farmer Stewart Hawthorne of Skuna Bay Salmon on Craft Raised Salmon. Chef Mark Garcia pumps of the Flavor of our dishes with the Flavor Forecast 2012 from McCormick Spices. Rick Browne,the King of BBQ, Smokes Us Out!  </itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>01:23:55</itunes:duration>
<itunes:keywords>food, cooking, Superbowl, talk, cooking podcast, recipe podcast, diy cooking, learn to cook, learn new recipes, recipes, bbq, spices</itunes:keywords>
</item>

<item>
<title>Feb 5th, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-5-12.mp3" length="80225176" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-5-12.mp3</guid>
<pubDate>Sun, 05 Feb 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>Superbowl Sunday Show</itunes:subtitle>
<itunes:summary>Ideas and Recipes for a Winning Superbowl Party Beer Truffles. Were having a party with PJ Clarkes Chef Johnny Church He is dishing on burger blends, oysters and the best fries. Arizona Biltmores Exec Chef Todd Sicolo on Wrights Restaurant and Big Game Food. Southern Chef Hugh Acheson shares his Modern Southern Style. Rick Rodgers with Sparkling Cocktail Inspiration  </itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>01:23:34</itunes:duration>
<itunes:keywords>food,cooking,superbowl,talk,cooking podcast,recipe podcast,diycooking,beer,truffles,superbowl</itunes:keywords>
</item>

<item>
<title>Feb 12th, 2012</title>
<enclosure url="http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-12-12.mp3" length="81886563" type="audio/mp3" />
<guid>http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-12-12.mp3</guid>
<pubDate>Sun, 12 Feb 2012 13:00:00 GMT</pubDate>
<category>Podcasts</category>
<itunes:author>Chef Jamie Gwen</itunes:author>
<itunes:subtitle>The Love Show</itunes:subtitle>
<itunes:summary>Spago Pastry Chef Sherry Yard gets us in the mood for love with Valentines Day Desserts. Chef Bernard Guillas of the Marine Room shares Recipes for Romance. Tanya Zuckerbrot Registered Dietitian and the creator of The F-Factor Diet divulges the Foods that you can Add To Your Diet to Lose Weight. Bake, Decorate, Celebrate! Wilton Baking Schools Nancy Siler gives us sweet Valentine Inspiration </itunes:summary>
<itunes:explicit>No</itunes:explicit>
<itunes:duration>01:25:18</itunes:duration>
<itunes:keywords>food, cooking, superbowl, talk, cooking podcast, recipe podcast, diy cooking, learn to cook, learn new recipes, recipes, sherry yard, romance, love</itunes:keywords>
</item>
</channel>
</rss>

食物及卫生局;与厨师杰米·格温的葡萄酒
http://www.chefjamie.com/
美国英语
版权所有©;Tastebud娱乐有限公司,2018年
每个星期天都有关于食物和葡萄酒的美味对话
厨师杰米·格温
johnm@splithopsbrewing.com(约翰·梅利诺)
在全美70多个电视台进行联合报道,每个周日都有现场直播!
与杰米一起探索烹饪世界,结识顶级厨师、高级侍酒师、食谱作者和食品工匠。每周两小时的愉快谈话!;
不
厨师杰米·格温
jamie@chefjamie.com
厨师杰米·格温
2012年1月8日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-8-12.mp3
2012年1月8日星期日格林威治标准时间13:00:00
播客
厨师杰米·格温
酒、餐及;球
2012年新年快乐。我们在电台直播纽约肉丸店的丹尼尔·霍尔茨曼分享各种肉丸的入口融化配方。www.Gayot.com的Sophie Gayot重点介绍了2012年在哪里吃饭。Jeff Scott,《厨房笔记》一书的作者,深入了解了烹饪世界。Lohr酿酒师Steve Peck用赤霞珠和黑比诺填满我们的酒杯
不
1:15
食物,烹饪,葡萄酒,谈话,烹饪播客,食谱播客,diy烹饪,学习烹饪,学习新食谱,食谱,节日,圣诞节,
2012年1月15日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-15-12.mp3
2012年1月15日星期日格林尼治标准时间13:00:00
播客
厨师杰米·格温
家庭、技术和健身
新奥尔良厨师约翰·贝什与家人同桌。《厨师》的编辑杰克·毕肖普(Jack Bishop)讲述了家庭烹饪的技巧。凯伦·佩奇和安德鲁·多内伯格讨论他们关于食品和葡萄酒的最新著作。健身专家Lisa Lynn制定了2012年的健身策略
不
49:45
食物,烹饪,葡萄酒,谈话,烹饪播客,食谱播客,diy烹饪,学习烹饪,学习新食谱,食谱,节日,圣诞节,
2012年1月22日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-22-12.mp3
2012年1月22日星期日格林尼治标准时间13:00:00
播客
厨师杰米·格温
农产品、亚洲餐和绞肉
杰米和拉娜回顾了花式食品展上的十大最佳发现。南方厨师休·艾奇逊(Hugh Acheson)介绍季节性农产品。Paul Martins美国烧烤店合伙人Brian Bennett分享了他对本地、可持续和有机的承诺。作家尼娜·西蒙兹用她的“简单的亚洲餐”庆祝中国新年。总经理和主侍酒师迈克尔·乔丹在农场现场直播!Jim Villas为Superbowl推荐了使用绞肉的最佳食谱!从他的新烹饪书“从头开始”
不
01:18:51
食物,烹饪,葡萄酒,谈话,烹饪播客,食谱播客,diy烹饪,学习烹饪,学习新食谱,食谱,节日,圣诞节,
2012年1月29日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/1-29-12.mp3
2012年1月29日星期日格林尼治标准时间13:00:00
播客
厨师杰米·格温
食物、鲑鱼、香料和烧烤的超级碗
烤肉粥:超级碗食物中的拉娜和杰米菜。圣安娜第一章的杰夫·霍尔重点介绍了市场上最新的工匠精神。斯库纳湾鲑鱼养殖户斯图尔特·霍桑在手工饲养的鲑鱼上。厨师长马克·加西亚用麦考密克香料公司2012年的风味预测来展示我们菜肴的风味。里克·布朗,烧烤之王,把我们熏了!
不
01:23:55
食物,烹饪,超级碗,谈话,烹饪播客,食谱播客,diy烹饪,学习烹饪,学习新食谱,食谱,烧烤,香料
2012年2月5日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-5-12.mp3
2012年2月5日星期日格林尼治标准时间13:00:00
播客
厨师杰米·格温
超级碗周日秀
获得超级碗派对胜利的啤酒松露的创意和食谱。我们和PJ克拉克的厨师约翰尼·丘奇开了一个派对,他正在用汉堡、牡蛎和最好的炸薯条做菜肴。亚利桑那州比尔特莫尔斯行政总厨托德·西科洛(Todd Sicolo)在莱特餐厅和大型游戏食品上。南方厨师休·艾奇逊分享了他的现代南方风格。Rick Rodgers以鸡尾酒为灵感
不
01:23:34
食物,烹饪,超级碗,谈话,烹饪播客,食谱播客,DIY烹饪,啤酒,松露,超级碗
2012年2月12日
http://www.chefjamie.com/media/podcasts/Food-Wine-Podcasts/2-12-12.mp3
2012年2月12日星期日格林尼治标准时间13:00:00
播客
厨师杰米·格温
爱情秀
Spago糕点厨师Sherry Yard让我们爱上情人节甜点。海事室的厨师伯纳德·吉拉斯分享了浪漫的秘诀。Tanya Zuckerbrot是一名注册营养师,也是F-Factor饮食的创造者,她透露了你可以添加到饮食中来减肥的食物。烘烤、装饰、庆祝!威尔顿烘焙学校南希·西勒给我们甜蜜的情人节灵感
不
01:25:18
食物,烹饪,超级碗,谈话,烹饪播客,食谱播客,diy烹饪,学会烹饪,学习新食谱,食谱,雪利酒园,浪漫,爱情

希望将这些程序列在另一个新的xml文档中,该文档可以首先显示最近的节目。

如果项目已按时间顺序从最早到最新排列,并且您只想颠倒现有顺序,则可以执行以下操作:

XSLT1.0

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:strip-space elements="*"/>

<!-- identity transform -->
<xsl:template match="@*|node()">
    <xsl:copy>
        <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
</xsl:template>

<xsl:template match="channel">
    <xsl:copy>
        <xsl:apply-templates select="*[not(self::item)]"/>
        <xsl:apply-templates select="item">
            <xsl:sort select="position()" data-type="number" order="descending"/>
        </xsl:apply-templates>
    </xsl:copy>
</xsl:template>

</xsl:stylesheet>


请编辑您的问题,以包括您迄今为止为解决此问题所做的尝试。因此,您要求我发布我已经尝试过的任何相关修复,到目前为止,没有,我已经查看了一些,但除了实际移动标记外,它们没有任何意义。您在这里显示的代码,如何运行?它被插入xml文件本身,还是从另一个页面调用它?1。恐怕你把我和别人搞混了。2.我以为你的问题是关于XSLT代码的。如果您不知道如何运行XSLT