The specification for the COLLADA element states “The XML Base attribute xml:base applies to this element to identify the base URI for an instance document.”
I need to use the xml:base attribute because I am streaming root COLLADA files that refer to geometries in other COLLADA files via relative addressing. To assemble the absolute addresses, I need to send separately the URL of the root COLLADA file along with the root COLLADA file itself. Instead of sending it separately, I would prefer to embed the URL in the COLLADA file using xml:base as an attribute of the root element COLLADA but I have run into a snag.
Unlike attribute “id”, attribute “xml:base” is not explicitly defined in the schema definition. When I run my schema-to-class compiler, it creates getId() and setId() methods for some of the classes it generates but it does not create getBase() and setBase() methods for the generated COLLADA class because “xml:base” is defined in the specification but not in the schema.
I request that the attribute “xml:base” be explicitly added to the schema definition for the COLLADA element in the same manner that attribute “id” is defined in the schema for a number of the other elements.
Thanks for the bug report. This will be fixed in the 1.4.0 schema at the latest. We don’t have plans to release a 1.3.2 schema patch at this time but your request indicates one is needed for xml:base and xmlns on the <COLLADA> element based on my further reading of the XML Namespace and XML specification.
My understanding from this is that these attributes are not implicit since all attributes require an attribute declaration.
Does everyone agree with that interpretation?
It looks like it got overlooked for the 1.4.0 release. How about 1.4.1?
Sorry this was overlooked. My last post in this thread did not garner any feedback. I assume that we just need to add:
<xs:attribute name=“version” type=“VersionType” use=“required”>
I will submit a bug for it in Khronos bugzilla for 1.4.1.
sadly its a lot more difficult than that.
You need to use schema includes to bring in a schema that defines the base attribute in the xml namespace. Then you can explicitely declare it on the COLLADA element. I worked on this for 1.4 but it never made it in because we weren’t ready to support it fully.
Also, as a side note. XMLSpy home edition disables the schema viewer if your schema has includes in it. That schema viewer is so useful too.