hxt icon indicating copy to clipboard operation
hxt copied to clipboard

hxt-relaxng does not support 'type="float"'

Open svenpanne opened this issue 10 years ago • 2 comments

Translating the compact RELAX NG schema registry.rnc from the OpenGL registry (https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/) via trang to the non-compact form results in

<grammar xmlns="http://relaxng.org/ns/structure/1.0"
 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
...
<attribute name="number">
   <data type="float"/>
</attribute>
...

which is a translation of the

attribute number { xsd:float }

fragment from the compact schema. hxt-relaxng doesn't recognize type="float", and browsing through the sources, this type seems to be supported for XML schema only. This doesn't look right, http://www.w3.org/2001/XMLSchema-datatypes mentions float, so I think it should be available via RELAX NG, too.

I can work around this problem by manually changing float to decimal, which is OK for the use case at hand, but fixing this in hxt-relaxng would be nice.

svenpanne avatar Jan 02 '15 18:01 svenpanne

please use the workaround at the moment. I will see, whether I can unify the datatype library stuff from relaxng and xmlschema into a common package, to eliminate this currently duplicated code.

Lazy evaluation is sometimes a good thing, but lazy development is a work-creation program, :-( .

UweSchmidt avatar Jan 08 '15 09:01 UweSchmidt

I've also encountered this problem when loading the Relax NG schemas for ODF. The types that are missing are date, dateTime, double, and time. The current schemas can be found here: http://docs.oasis-open.org/office/v1.1/errata01/os/ http://docs.oasis-open.org/office/v1.2/os/

vandenoever avatar Feb 05 '16 23:02 vandenoever