<div dir="ltr">Hi Leo,<div><br></div><div>If the input has no namespace, then I think you can declare the default namespace according to your output (if it is important to you that your output uses it as a default namespace).</div><div><br></div><div>Then there is a workaround to navigate the input with /*:foo/*:bar expressions, where the joker prefix should catch the absence of namespace.</div><div><br></div><div>I hope it helps?</div><div><br></div><div>Kind regards,</div><div>Ghislain</div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 10:20 AM, Leo Studer <span dir="ltr"><<a href="mailto:leo.studer@varioweb.ch" target="_blank">leo.studer@varioweb.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michael<br>
<span class=""><br>
><br>
><br>
> The main difference from the XSLT xpath-default-namespace is that this default applies both to names in path expressions and to names in element constructors, which is inconvenient when the input and output documents are in different namespaces.<br>
><br>
> Michael Kay<br>
> Saxonica<br>
<br>
</span>this is exactly my problem. The XML file has no namespace and the output has a namespace.<br>
<br>
Fist I tried<br>
<br>
        declare namespace null=“”;<br>
<br>
and in the query I wrote something like<br>
<br>
        null:elementName<br>
<br>
Then I get the error that namespace null is not declared….<br>
<br>
The only solution I found is to put a namespace in the XML file (which is not really what I want).<br>
<br>
Is there another way?<br>
<br>
Cheers<br>
<div class="HOEnZb"><div class="h5">Leo<br>
_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk" rel="noreferrer" target="_blank">http://x-query.com/mailman/listinfo/talk</a></div></div></blockquote></div><br></div>