I am hitting a namespace bug when loading XInclude files with -i.  I am using BaseX 12.3.

Consider the following two files:

main.xml:

<?xml version="1.0"?>
<root xmlns:xi="http://www.w3.org/2001/XInclude">
  <xi:include href="included.xml"/>
</root>

included.xml:

<?xml version="1.0"?>
<item xml:id="test123"/>                    

If I load main.xml with -i, the xml namespace is lost on xml:id attributes:

basex -i main.xml '//item/@xml:id'

This returns empty. But if I load it using doc(), it works fine:

basex 'doc("main.xml")//item/@xml:id'

This returns test123.

My workaround is to use doc() with an external variable instead of -i. This may be related to issue #2642.

Jonathan