Reference
XML namespace directory
Namespace URIs are identifiers, not addresses — they are matched literally, so a single wrong character silently changes what a document means. Here is what each one is for.
Which namespaces does this format need?
The declarations a conforming document of each format normally carries. Missing one is not a parse error — the document stays well-formed and quietly means something else.
| Format | Root | Namespaces to declare |
|---|---|---|
| XML sitemap | <urlset> |
|
| Sitemap index | <sitemapindex> |
|
| RSS 2.0 | <rss> | None — RSS 2.0 elements are unqualified |
| Atom 1.0 | <feed> |
|
| SOAP envelope | <Envelope> |
|
| XML Schema (XSD) | <schema> |
|
| WSDL | <definitions> |
|
| XSLT stylesheet | <stylesheet> |
|
| SVG | <svg> |
|
| OPML | <opml> | None — RSS 2.0 elements are unqualified |
| RDF/XML | <RDF> |
|
| GPX | <gpx> |
|
| KML | <kml> |
|
| XLIFF | <xliff> |
|
| UBL Invoice | <Invoice> |
|
Every namespace
Sitemap protocol 0.9
defaulthttp://www.sitemaps.org/schemas/sitemap/0.9The namespace every sitemap.xml and sitemap index must declare, almost always as the default. Declare the https:// form and crawlers reject the file.
Atom Syndication Format 1.0
atom:http://www.w3.org/2005/AtomThe namespace for Atom feeds, and for the <atom:link rel="self"> element that well-formed RSS feeds borrow to point at their own URL.
XML Schema Definition (XSD)
xs:http://www.w3.org/2001/XMLSchemaThe vocabulary a schema document is written in — the xs: elements plus the built-in datatypes an XSD refers to. Bound to xs: or xsd: by convention.
XML Schema instance
xsi:http://www.w3.org/2001/XMLSchema-instanceFour attributes an instance document uses to point at its schema or declare a nil value: xsi:schemaLocation, xsi:type and xsi:nil among them.
SOAP 1.1 envelope
soap:http://schemas.xmlsoap.org/soap/envelope/The SOAP 1.1 envelope namespace, and distinct from SOAP 1.2: the version is encoded in the URI, so compare URIs and never the soap: prefix.
SOAP 1.2 envelope
env:http://www.w3.org/2003/05/soap-envelopeThe SOAP 1.2 envelope namespace, and the reason a 1.1 endpoint answers a 1.2 message with a VersionMismatch fault rather than a parse error.
WSDL 1.1
wsdl:http://schemas.xmlsoap.org/wsdl/The service-description namespace for SOAP web services, and still the version almost every deployed WSDL uses — 2.0 never displaced it.
XSLT
xsl:http://www.w3.org/1999/XSL/TransformThe transformation-language namespace, unchanged across XSLT 1.0, 2.0 and 3.0 — the version lives in an attribute, not the URI, so 1999 is correct.
SVG
defaulthttp://www.w3.org/2000/svgScalable Vector Graphics. A standalone .svg file must declare this on its root element or browsers render nothing; inline SVG in HTML need not.
XHTML
xhtml:http://www.w3.org/1999/xhtmlXHTML markup — and, in sitemaps, the namespace that carries <xhtml:link> hreflang alternates, which is why stripping it destroys hreflang coverage.
Dublin Core (elements 1.1)
dc:http://purl.org/dc/elements/1.1/Fifteen general-purpose metadata terms — creator, date, title, subject, rights and friends — reused inside RSS, RDF and publishing formats alike.
RSS content module
content:http://purl.org/rss/1.0/modules/content/Supplies <content:encoded>, the element feeds use to carry a full HTML article body when RSS's own <description> holds only a summary.
iTunes podcast extension
itunes:http://www.itunes.com/dtds/podcast-1.0.dtdThe de facto podcast vocabulary: episode and season numbers, artwork, categories, explicit flags and durations. Every major directory reads it.
Google image sitemap extension
image:http://www.google.com/schemas/sitemap-image/1.1Declares the images belonging to each <url> entry in a sitemap, so a crawler can associate them with the page that hosts them without parsing it.
Google news sitemap extension
news:http://www.google.com/schemas/sitemap-news/0.9Publication name, language and publication date for news articles in a sitemap — the one sitemap type where a stale file is worse than no file.
Google video sitemap extension
video:http://www.google.com/schemas/sitemap-video/1.1Thumbnail, duration, player and content locations for video in a sitemap. Several child elements are required together, or the entry is dropped.
RDF/XML syntax
rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#The RDF graph syntax in XML, and the namespace that identifies an RSS 1.0 document — whose root element is <rdf:RDF> rather than <rss>.
OpenSearch 1.1
opensearch:http://a9.com/-/spec/opensearch/1.1/Describes a search endpoint so a client can build query URLs, and adds totalResults, startIndex and itemsPerPage to search-result feeds.
The reserved xml: namespace
xml:http://www.w3.org/XML/1998/namespaceBound to the xml: prefix implicitly and permanently, and the source of xml:lang, xml:space, xml:base and xml:id. Never declare it, never rebind it.
XLIFF 1.2
xliff:urn:oasis:names:tc:xliff:document:1.2The localisation interchange format that moves translatable content between a content system and a translation vendor. Still more used than 2.x.
UBL 2 Invoice
defaulturn:oasis:names:specification:ubl:schema:xsd:Invoice-2The root namespace for a UBL invoice, the basis of most European e-invoicing mandates. A UBL document declares this one plus cbc: and cac:.
UBL Common Basic Components
cbc:urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2Every leaf value in a UBL document — identifiers, dates, amounts, quantities, codes. If it holds a value rather than a structure, it is cbc:.
UBL Common Aggregate Components
cac:urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2Every structure in a UBL document — parties, addresses, lines, tax totals. If it groups other elements rather than holding a value, it is cac:.
Media RSS
media:http://search.yahoo.com/mrss/The de facto way to attach images, video and audio to a feed item with dimensions, type and thumbnails — far richer than RSS's own <enclosure>.
XML Signature
ds:http://www.w3.org/2000/09/xmldsig#Digital signatures embedded in the XML they sign. The namespace behind SAML assertions, signed SOAP messages and e-invoicing mandates.
WS-Security extensions
wsse:http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsdAuthentication and signing headers for SOAP — the UsernameToken and BinarySecurityToken that enterprise services expect in the envelope header.
XLink
xlink:http://www.w3.org/1999/xlinkThe generic way to express a hyperlink in any XML vocabulary. Most visible today as xlink:href in SVG, WSDL and DocBook.
Want the document formats these belong to? Browse the format reference.
Get started
See which namespaces your own documents actually declare.
XMLDir extracts every xmlns declaration it finds, so you can tell what a partner really sends rather than what their spec claims.