[xsd-users] Problem to transform mathml2 for COLLADA to C++

Boris Kolpackov boris at codesynthesis.com
Mon Jan 3 06:27:08 EST 2022


Miao Wang <miaowang.tw at gmail.com> writes:

> I follow the thread
> https://www.codesynthesis.com/pipermail/xsd-users/2009-July/002388.html
> to transform COLLADA 1.5 and success. Because COLLADA need mathml2 to work,
> I transform the xsd files in mathml2. When transform common/math.xsd using
> the same parameters, the following error shows:
> 
> common/math.xsd:36:47: error: group '
> http://www.w3.org/1998/Math/MathML:Presentation-token.class' not found
> common/math.xsd:37:48: error: group '
> http://www.w3.org/1998/Math/MathML:Presentation-layout.class' not found
> common/math.xsd:38:48: error: group '
> http://www.w3.org/1998/Math/MathML:Presentation-script.class' not found
> common/math.xsd:39:47: error: group '
> http://www.w3.org/1998/Math/MathML:Presentation-table.class' not found
> common/math.xsd:40:31: error: type '
> http://www.w3.org/1998/Math/MathML:mspace' not found
> common/math.xsd:40:31: error: referenced element 'mspace' not found
> .......more
> 
> Has anyone successfully to transform mathml2 ?

Based on my (internal) notes, COLLADA 1.5.0 can only be handled in the
file-per-type mode[1] (probably because of the above errors). Here is
the command line I used:

xsd cxx-tree --output-dir out --file-per-type --options-file collada.options collada_schema_1_5.xsd

Where collada.options contains:


--generate-polymorphic
--root-element COLLADA
--namespace-map http://www.w3.org/1998/Math/MathML=mathML
--location-map http://www.w3.org/Math/XMLSchema/mathml2/mathml2.xsd=mathml2/mathml2.xsd
--location-map http://www.w3.org/2001/xml.xsd=xml/xml.xsd
--generate-forward
--anonymous-regex %.* .* (.+)/(.+)%$1_$2%
# Flatten the include hierarchy.
#
#--include-regex %.*/(.+)%$1%
--type-file-regex %http://.*/MathML (.+)%mathml-$1%


[1] http://www.codesynthesis.com/~boris/blog/2008/02/13/codesynthesis-xsd-3-1-0-released/



More information about the xsd-users mailing list