Validation error

Shaun McCance <shaunm at gnome.org>
Tue Feb 21 12:32:54 EST 2017

On Sat, 2017-02-18 at 14:07 +0100, Sascha Manns wrote:
> Hello list,
> 
> i have prepared a Mallard file like that one: http://pastebin.com/dy9
> jig2j .
> 
> The problem is, if i'm using yelp-check validate ThatPage.page i'm
> getting:
> 
> 
> sascha at sascha-desktop:~/RiderProjects/PublicanCreators/help/C$ yelp-
> check validate app-config.page 
> app-config.page:2: element page: Relax-NG validity error : Expecting
> a namespace for element page
> app-config.page fails to validate

Short answer: Change xmlns:mal= to just xmlns= on line 2.

Explanation: XML namespaces are funny things. When you declare a
namespace prefix with xmlns:mal, you are binding the prefix "mal" to a
namespace, so that any element you write like mal:link uses that
namespace. But elements without prefixes are still in the default
namespace.

To set the default namespace, you use just xmlns, not xmlns: with a
prefix. This allows you to write elements without prefixes that are
still in a namespace.

You could, if you wanted, just use xmlns:mal, and then write out all
your elements names as mal:page, mal:info, mal:p, etc. But that would
get pretty tiresome.

--
Shaun