I have a Relax NG grammar file. I would like to load permitted attribute values from an XML file. Would it be possible to load those values from a normal XML file or do I need to generate a RELAX NG file from this XML file with XSLT first? This would feel wrong to me.
<element name="language">
<externalRef href="language.rng"/>
</element>
Instead of transforming your list of acceptable values into RelaxNG form, an alternative possibility is to supplement your RelaxNG schema with a Schematron schema, which is capable of validating attributes against an external list of values. https://schematron.com/