<div dir="ltr">Hi Leo,<div><br></div><div>I'm glad!</div><div><br></div><div>Should this happen, I guess you could add a filter using an XPath function to test for the namespace of the name of the selected element.</div><div><br></div><div><a href="https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-30/html/Overview.html#func-node-name">https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-30/html/Overview.html#func-node-name</a></div><div>and</div><div><a href="https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-30/html/Overview.html#func-namespace-uri-from-QName">https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-30/html/Overview.html#func-namespace-uri-from-QName</a><br></div><div><br></div><div>You can test for the absence of namespace easily.</div><div><br></div><div>There may be even shorter tricks, I wouldn't be surprised if Mike got something out of his magic hat :-)</div><div><br></div><div>Kind regards,</div><div>Ghislain</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 11:38 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"><div style="word-wrap:break-word">Hi Ghislain<div><br></div><div>thank you for your input, which solves my problem.</div><div><br></div><div>However, if I have the same element name in two different namespaces, then the use of a wildcard namespace makes problems ;-).</div><div><br></div><div>Always</div><div>Leo</div><div><br><div><blockquote type="cite"><div><div class="h5"><div>On 01 Jun 2016, at 11:06, Ghislain Fourny <<a href="mailto:g@28.io" target="_blank">g@28.io</a>> wrote:</div><br></div></div><div><div><div class="h5"><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><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><div>Leo<br>
_______________________________________________<br>
<a href="mailto:talk@x-query.com" target="_blank">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></div></div>
_______________________________________________<br><a href="mailto:talk@x-query.com" target="_blank">talk@x-query.com</a><br><a href="http://x-query.com/mailman/listinfo/talk" target="_blank">http://x-query.com/mailman/listinfo/talk</a></div></blockquote></div><br></div></div><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><br></blockquote></div><br></div>