[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can an element have 2 namespaces?

Subject: RE: Can an element have 2 namespaces?
From: cknell@xxxxxxxxxx
Date: Mon, 09 Nov 2009 18:03:38 -0500
RE:  Can an element have 2 namespaces?
While I follow this list, it's been a while since I've posted. There are five namespaces declared if I read this correctly. The default namespace is http://purl.org/rss/1.0/. That is to say, unless an element or an attribute has an overriding namespace declared

ex: <rdf:xxx></rdf>

an element or attribute is assigned to the default namespace.

It looks like there's a problem with your parser, but I could be wrong as I am a little rusty.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     cert21 <cert21@xxxxxxx>
Sent:     Mon, 09 Nov 2009 17:47:49 -0500
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:   Can an element have 2 namespaces?

I am having trouble parsing this rss 1.0 feed
The reason is that it appears that there are 2 different namespaces 
declared in the root document

This is how the document starts:

<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns="http://purl.org/rss/1.0/">

The parser (in php, a DOMDocument class) reports the namespace to be

http://www.w3.org/1999/02/22-rdf-syntax-ns#

but why then they declared another namespace with 
xmlns="http://purl.org/rss/1.0/"

Is it even a valid way to declare 2 namespaces together like this?

Anyway, which one is considered to be the correct one?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.