This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Namespace problem
- From: Jeff Beadle <Jbeadle at manh dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Tue, 26 Feb 2002 14:08:19 -0500
- Subject: RE: [xsl] Namespace problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hey Eric,
You probably didn't declare the xml doc's default namespace within your
xslt(?).
this works:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rogain="http://purl.org/rss/1.0/">
<xsl:template match="/">
<xsl:copy-of select="//rogain:item"/>
</xsl:template>
</xsl:stylesheet>
-Jeff
-----Original Message-----
From: Eric Vitiello [mailto:xsl-list@perceive.net]
Sent: Tuesday, February 26, 2002 1:51 PM
To: xsl-list
Subject: [xsl] Namespace problem
I'm trying to apply a simple transformation to the file below, and for some
reason I'm unable to get any nodes returned. I think it may be a namespace
issue. I'm totally stumped, and losing hair.
apply this XPath: //item
should return a nodeset of items
the XML:
<?xml version="1.0"?>
<rdf:RDF
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">
<channel rdf:about="http://www.perceive.net/">
<title>Perceive Designs</title>
<link>http://www.perceive.net</link>
<description>Your perception of design and
technology</description>
<lastBuildDate>Tue, 26 Feb 2002 13:26:00
GMT</lastBuildDate>
<docs>http://www.perceive.net</docs>
<managingEditor>eric@perceive.net (Eric
Vitiello)</managingEditor>
<webMaster>webmaster@perceive.net (Perceive Designs
Webmaster</webMaster>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
</channel>
<item>
<title>FamilyML DTD Released</title>
<link>http://www.vitiello.org/familyml.htm</link>
<description>
<p>The DTD used in created in the <a
href="http://www.vitiello.org">Vitiello Family Tree</a> has finally been
released to the public. You can read about the FamilyML specification and
download the DTD at the <a
href="http://www.vitiello.org/familyml.htm">Vitiello Family Tree
Website</a>. The Current version of the DTD, 0.5 may be linked directly to
at: <a
href="http://www.vitiello.org/dtd/0.5/family-tree.dtd">http://www.vitiello.o
rg/dtd/0.5/family-tree.dtd</a></p>
</description>
<dc:date>2002-02-22</dc:date>
<dc:language>en</dc:language>
<dc:source></dc:source>
<dc:creator></dc:creator>
</item>
</rdf:RDF>
any ideas? I'm quite sure it's got to be something very simple eluding me.
I'm using MSXML 4.0 parser.
---
Eric Vitiello
Perceive Designs
<www.perceive.net>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list