- For individual users
- Instant access to solutions
- Ask your tech questions
- Start your 30-day Free Trial
Main Topics
Browse All TopicsEverything 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/tex
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.o
<channel rdf:about="http://www.coat
<title>World of Warcraft Community Alerts</title>
<link>http://forums.worldo
<description>World of Warcraft Alerts newsfeed by Belatucadros for Coattails.net - Original alerts (c) Blizzard.com.</description
<dc:language>en</dc:langua
<dc:publisher>Feed (c) Coattails (www.coattails.net)</dc:pu
<dc:creator>Feed created and maintained by Belatucadros (did all the work)(belatucadros@coattai
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
</rdf:Seq>
</items>
</channel>
XSLT
**************************
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="r
xmlns:xsl="http://www.w3.o
xmlns:rdf="http://www.w3.o
xmlns:rss="http://purl.org
xmlns:dc="http://purl.org/
xmlns:admin="http://webns.
xmlns:l="http://purl.org/r
xmlns:content="http://purl
<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:attri
<a>
<xsl:attribute name="href">#</xsl:attribu
<xsl:attribute name="style">underline: none;font-weight: bold;</xsl:attribute>
<xsl:attribute name="onClick">display('co
<xsl:value-of select="rdf:RDF/channel/ti
</a>
</div>
<div style="width:50%;">
<xsl:attribute name="id">content:<xsl:val
<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="y
<br/>
<span class="date">
<xsl:value-of select="dc:creator"/>
</span>
</div>
<hr/>
</xsl:for-each>
</div>
</xsl:template>
</xsl:stylesheet>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: b1xml2Posted on 2005-05-04 at 18:40:24ID: 13932322
<rdf:RDF xmlns:rdf="http://www.w3.o rg/1999/02 /22-rdf-sy ntax-ns#" xmlns="http://purl.org/rss /1.0/" xmlns:dc="http://purl.org/ dc/element s/1.1/">
/1.0/"
rg/1999/02 /22-rdf-sy ntax-ns#" xmlns:rss="http://purl.org /rss/1.0/" xmlns:dc="http://purl.org/ dc/element s/1.1/"> tails.net/ wow/wow_al erts.php"> fwarcraft. com/board. aspx?fn=wo w-realm- st atus</link > > ge> blisher> ls.net) and Taggart (not so much)(omg@wtfpwn.net).</dc :creator> s.worldofw arcraft.co m/board.as px?fn=wow- realm- stat us#1" /> s.worldofw arcraft.co m/board.as px?fn=wow- realm- stat us#2" /> s.worldofw arcraft.co m/board.as px?fn=wow- realm- stat us#3" /> s.worldofw arcraft.co m/board.as px?fn=wow- realm- stat us#4" /> s.worldofw arcraft.co m/board.as px?fn=wow- realm- stat us#5" />
df rss l dc admin content xsl" rg/1999/XS L/Transfor m" rg/1999/02 /22-rdf-sy ntax-ns#" /rss/1.0/" dc/element s/1.1/" net/mvcb/" ss/1.0/mod ules/link/ " .org/rss/1 .0/modules /content/" > /> bute> te> ntent:<xsl :value-of select="channel/title" />');</xsl:attribute>
World of Warcraft Community Alerts');">World of Warcraft Community Alerts</a>
</rdf:RDF>
please note. on one hand, you are using the rdf (rdf:RDF) namespace, but you are also saying that the default namespace is xmlns="http://purl.org/rss
Xml
==
<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF xmlns:rdf="http://www.w3.o
<channel rdf:about="http://www.coat
<title>World of Warcraft Community Alerts</title>
<link>http://forums.worldo
<description>World of Warcraft Alerts newsfeed by Belatucadros for Coattails.net - Original alerts (c) Blizzard.com.</description
<dc:language>en</dc:langua
<dc:publisher>Feed (c) Coattails (www.coattails.net)</dc:pu
<dc:creator>Feed created and maintained by Belatucadros (did all the work)(belatucadros@coattai
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
<rdf:li rdf:resource="http://forum
</rdf:Seq>
</items>
</channel>
</rdf:RDF>
Xslt
===
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="r
xmlns:xsl="http://www.w3.o
xmlns:rdf="http://www.w3.o
xmlns:rss="http://purl.org
xmlns:dc="http://purl.org/
xmlns:admin="http://webns.
xmlns:l="http://purl.org/r
xmlns:content="http://purl
<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:attri
<a>
<xsl:attribute name="href">#</xsl:attribu
<xsl:attribute name="style">underline: none;font-weight: bold;</xsl:attribute>
<xsl:attribute name="onClick">display('co
<xsl:value-of select="channel/title" />
</a>
</div>
</xsl:template>
</xsl:stylesheet>
Html Output
========
<br />
<div style="font-size: 10pt;" id="title">
<a href="#" style="underline: none;font-weight: bold;" onClick="display('content:
</div>