Creating Namespaces/ custom tags to extend Atom Feed

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Creating Namespaces/ custom tags to extend Atom Feed

Post by kendall »

Hey,

I have been scouring the web in search of articles that explain extending atom feeds. I have come across alot of articles but none of them give a clear "how-to" for people who are not familiar with xml and namespaces.

Can anyone shed some more light on this?

How do you create your own namespaces for extending atom feeds or rss?

do you create a file on your server with the markup? a DTD file?
whats the syntax? something like
element : atom { }
or something?
how do you call it
xlmns="whatever.com/namespaces/mynamspace.dtd
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by arjan.top »

xmlns is xml namespace
xmlns:namespaceName="URI"

URI does not have to be valid URL, but it usually is (like documentation)

and then eceri element that is in your namespace:
<namespaceName:elementname></namespaceName:elementname>
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by kendall »

arjan.top wrote:xmlns is xml namespace
xmlns:namespaceName="URI"

URI does not have to be valid URL, but it usually is (like documentation)

and then eceri element that is in your namespace:
<namespaceName:elementname></namespaceName:elementname>
so your saying to create a custom tag and namespace all i need to do is

pass some fake url in the xmlns attribute and then just add the tags in? uhm.... 8O :| :?:

so if i wanted to use the tags in an atom feed....will it be parsed? how will it be handled?
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by arjan.top »

parsers should ignore them
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by kendall »

arjan.top wrote:parsers should ignore them
and what if i don't want them too?
User avatar
arjan.top
Forum Contributor
Posts: 305
Joined: Sun Oct 14, 2007 4:36 am
Location: Hoče, Slovenia

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by arjan.top »

depends what parsers you have in mind ...

XML parser will of course parse the whole document, if you are talking about RSS/Atom readers it will be ignored
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: Creating Namespaces/ custom tags to extend Atom Feed

Post by kendall »

arjan.top wrote:depends what parsers you have in mind ...

XML parser will of course parse the whole document, if you are talking about RSS/Atom readers it will be ignored
rss atom...darn it...what was the use of extending it if its going to be ignored...?
Post Reply