Based on the W3C specification the schema is valid.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:my="http://my.name.space">
<xsd:element name="test" my:attr="something"/>
</xsd:schema>
I was wondering what would be a use case for using these “attributes with non-schema namespace” in a definition of an element.
I use them for code generation from schema.
They are a means of adding extra information to an element.