[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.4

Parsing RDF (Rss 1.0) with XSLT to get channel/title

Asked by raizon in Extensible Markup Language (XML), RSS

Tags: rdf, rss, xslt

Everything works great in my XSLT to parse through the RDF document except for getting the channel/title.

The xpath I've used is "//channel/title", "//channel/title/text()", "rdf:RDF/channel/title",
"rdf:RDF/channel/title/text()", "rss:channel/rss:title" etc...

I cant seem to get the document title to display.  When I test my xpath in xmlspy they test correct.

Can someone please help.


RDF Document: Snip
************************************
<?xml version="1.0" encoding="iso-8859-1" ?>
 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/">
 <channel rdf:about="http://www.coattails.net/wow/wow_alerts.php">
  <title>World of Warcraft Community Alerts</title>
  <link>http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status</link>
  <description>World of Warcraft Alerts newsfeed by Belatucadros for Coattails.net - Original alerts (c) Blizzard.com.</description>
  <dc:language>en</dc:language>
  <dc:publisher>Feed (c) Coattails (www.coattails.net)</dc:publisher>
  <dc:creator>Feed created and maintained by Belatucadros (did all the work)(belatucadros@coattails.net) and Taggart (not so much)(omg@wtfpwn.net).</dc:creator>
 <items>
 <rdf:Seq>
  <rdf:li rdf:resource="http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status#1" />
  <rdf:li rdf:resource="http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status#2" />
  <rdf:li rdf:resource="http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status#3" />
  <rdf:li rdf:resource="http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status#4" />
  <rdf:li rdf:resource="http://forums.worldofwarcraft.com/board.aspx?fn=wow-realm-status#5" />
  </rdf:Seq>
  </items>
  </channel>


XSLT
******************************
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="rdf rss l dc admin content xsl"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                xmlns:rss="http://purl.org/rss/1.0/"
                xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:admin="http://webns.net/mvcb/"
                xmlns:l="http://purl.org/rss/1.0/modules/link/"
                xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <xsl:output omit-xml-declaration="yes"/>
    <xsl:template match="/rdf:RDF">
            <br/>
            <div style="width:50%;">
                  <xsl:attribute name="style">font-size: 10pt;</xsl:attribute>
                  <xsl:attribute name="id">title</xsl:attribute>
                  <a>
                        <xsl:attribute name="href">#</xsl:attribute>
                        <xsl:attribute name="style">underline: none;font-weight: bold;</xsl:attribute>
                        <xsl:attribute name="onClick">display('content:<xsl:value-of select="rdf:RDF/channel/title" />');</xsl:attribute>
                        <xsl:value-of select="rdf:RDF/channel/title" />
                  </a>
            </div>
        <div style="width:50%;">
        <xsl:attribute name="id">content:<xsl:value-of select="rdf:RDF/channel/title" /></xsl:attribute>
        <xsl:for-each select="rss:item">    
            <div style="clear:left;">        
                <a class="headlines">        
                    <xsl:attribute name="href">            
                        <xsl:value-of select="@rdf:about"/>        
                    </xsl:attribute>        
                    <xsl:value-of select="rss:title"/>        
                </a>
                <br/>  
                <xsl:value-of disable-output-escaping="yes" select="rss:description"/>
                <br/>
                <span class="date">
                    <xsl:value-of select="dc:creator"/>
                </span>
            </div>  
            <hr/>
        </xsl:for-each>
        </div>
    </xsl:template>
</xsl:stylesheet>
[+][-]05/04/05 06:40 PM, ID: 13932322Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Extensible Markup Language (XML), RSS
Tags: rdf, rss, xslt
Sign Up Now!
Solution Provided By: b1xml2
Participating Experts: 1
Solution Grade: A
 
 
Loading Advertisement...
20091111-EE-VQP-92