The use of meta data parameter in the default publication works only for existing pages. If the url points to nowhereland an error occurs. The alternative to injecting metadata from xmap to xslt would be to use the generic metadata transformer - for text nodes this is unproblematic; for attribute values a second transformation step is necessary. See bug 44567. Maybe the mechanism for the "this page does not exist" page could be reconsidered (not use the same pipeline?).