Open woutdenolf opened 4 months ago
I'm ok with removing unused namespaces. Are we certain there are no consequences for child content (such as other base classes)? I do not believe that to be a problem. Each NXDL file is self-contained in its declaration of namespaces.
The ns:
prefix is not uses anywhere. The xs:
prefix is only used in the NXDL schema definition itself, not in the nxdl files, which would conceptually be strange anyway, which why I propose the remove it to avoid confusion.
Also, prefixes only exist locally inside one XML file so they cannot affect other XML files.
The definition
xmlns:xs
andxmlns:ns
attributes in NXdetector and NXdetector_channel are not used and therefore redundant. As I'm not that familiar with XML schema's, here is why I think so:Schema's
NXDL schema attributes (https://www.w3schools.com/xml/schema_schema.asp)
xmlns:xs
: elements and data types with prefix xs that are used in this schema come from this namespacetargetNamespace
: elements defined by this schema come from this namespace.xmlns:nx
: elements and data types with prefix nx that are used in this schema come from this namespacexmlns:nxdl
: elements and data types with prefix nxdl that are used in this schema come from this namespaceTo harmonize we should probably choose one prefix for the NXDL namespace:
xmlns:nx
orxmlns:nxdl
.Definitions
Most definitions have these attributes
xmlns
: elements and data types without prefix that are used in this schema come from this namespace (i.e. the default namespace)xmlns:xsi
: elements and data types with prefix xs that are used in this schema come from this namespacexsi:schemaLocation
: namespace and the location of the XML schema to use for that namespaceHowever
NXdetector
andNXdetector_channel
have these attributesxmlns:xs
: elements and data types with prefix *xs that are used in this schema come from this namespacexmlns:ns
: elements and data types with prefix ns that are used in this schema come from this namespaceThere is no harm in doing so but the prefix xs and ns are not used so these are redundant.