Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8041279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:09:35+00:00 2026-06-05T04:09:35+00:00

I have to format Apple RSS feeds to show the top iphone apps in

  • 0

I have to format Apple RSS feeds to show the top iphone apps in a website. I downloaded XML files and thought it’d be simple to apply an stylesheet but its turning a heck of a job…
Here is the XSL iam trying to apply: pretty simple

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:im="http://itunes.apple.com/rss">

<xsl:template match="/">


<tr>
  <th>ID</th>
  <th>Title</th>
</tr>
<xsl:for-each select="entry">
<tr>
  <td><xsl:value-of select="id"/></td>
  <td><xsl:value-of select="title"/></td>
  <td><xsl:value-of select="category"/></td>

</tr>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

XML feeds I am trying to format can be downloaded from http://itunes.apple.com/rss/generator/ (Choose iOS Apps and click generate).

Please help on this.. the XML file does not change whatever changes I make to the XSL file, it always displays the whole contents of the XML file..

I could find only one topic on this on the Internet and it also does not has a working solution. It should be quite familiar issue if people are showing websites with i-tunes apps these days.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:09:36+00:00Added an answer on June 5, 2026 at 4:09 am

    I think the problem you are having is with namespaces. You are not properly accounting for them in your XSLT. Looking at a sample feed, the root element is as follows:

    <feed xmlns:im="http://itunes.apple.com/rss" xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    

    This means that, unless otherwise specified, all elements are part of the namespace with URI “http://www.w3.org/2005/Atom”. Although you have declared this in your XSLT, you are not really using it, and your XSLT code is trying to match elements that are not part of any namespace.

    There is also a problem is that your XSLT is not accounting for the feed element too. What you need to do is replace the initial template match of <xsl:template match="/"> with the following

    <xsl:template match="/atom:feed">
    

    You xsl:for-each would then become like so

    <xsl:for-each select="atom:entry"> 
    

    Here is the full XSLT:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:im="http://itunes.apple.com/rss">
       <xsl:output method="html" indent="yes"/>
    
       <xsl:template match="/atom:feed">
          <tr>
             <th>ID</th>
             <th>Title</th>
          </tr>
    
          <xsl:for-each select="atom:entry">
             <tr>
                <td>
                   <xsl:value-of select="atom:id"/>
                </td>
                <td>
                   <xsl:value-of select="atom:title"/>
                </td>
                <td>
                   <xsl:value-of select="atom:category/@label"/>
                </td>
             </tr>
          </xsl:for-each>
       </xsl:template>
    </xsl:stylesheet>
    

    This should hopefully output some results.

    Note that it is often better to use template matching, rather than xsl:for-each to encourage re-use of templates, and tidier code with less indentation. This would also work

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:im="http://itunes.apple.com/rss">
       <xsl:output method="html" indent="yes"/>
       <xsl:template match="/atom:feed">
          <tr>
             <th>ID</th>
             <th>Title</th>
          </tr>
          <xsl:apply-templates select="atom:entry"/>
       </xsl:template>
    
       <xsl:template match="atom:entry">
          <tr>
             <td>
                <xsl:value-of select="atom:id"/>
             </td>
             <td>
                <xsl:value-of select="atom:title"/>
             </td>
             <td>
                <xsl:value-of select="atom:category/@label"/>
             </td>
          </tr>
       </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Localizable strings file which are used for Apple/iPhone apps localization have the following format:
I'm writing a simple batch downloader for files, which have the format Y-m-d.pdf. I
I have a string with this value format: $str = Apple, Orange, Computer-Hardware, preg_replace,
I have a node in my XML file containing the following: <Apple>2011-12-01T16:33:33Z</Apple> I wish
I have found a list of the different values (Audio Data Format) at http://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/CoreAudioDataTypesRef/Reference/reference.html#//apple_ref/doc/uid/TP40004488
I have the following XML file containing letter and word definitions in this format
I have the following xml format that i want to bind it through a
Am integrating APNS in my iPhone app. I have walked through on Apple Push
I want my report pages to have A4 format. to do this i used
I want to create date with specific format for e.g 03-20-2010 have a format

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.