Metadata with Custom Namespace Example

The se:metadata macro supports custom namespaces. This example demonstrates how to add a custom namespace and add metadata elements using the new custom namespace.

The default result format of the se:metadata will output an HTML link tag for each custom namespace that is added. When Dublin Core metadata is included, the custom namespace http://purl.org/dc/clients/1.1/ with prefix DC is used.

Smartsite SXML CopyCode image Copy Code
<se:metadata id="meta" includedublincore="false"/>

{page.meta.addnamespace(OVERHEID, "http://overheid.nl/owms/terms/")}
{page.meta.add(authority, "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties", "OVERHEID.ministerie", "OVERHEID")}
{page.meta.add(isRatifiedBy, "Regering", "OVERHEID.ministerie", "OVERHEID")}
{page.meta.add(abbreviation, "", "", "OVERHEID")}
Example Result CopyCode image Copy Code
<meta name="generator" content="Smartsite" />
<meta name="author" content="Koen Zwikstra" />
<meta name="description" content="Demonstrates the use of custom namespaces" />
<meta name="robots" content="follow" />
<meta name="language" content="en" />
<link rel="schema.OVERHEID" href="http://overheid.nl/owms/terms/" />
<meta name="OVERHEID.authority" scheme="OVERHEID.ministerie" content="Ministerie van Binnenlandse Zaken en Koninkrijksrelaties" />
<meta name="OVERHEID.isRatifiedBy" scheme="OVERHEID.ministerie" content="Regering" />
<meta name="OVERHEID.abbreviation" content="" />