On 06/11/2024 15:57, Regina Henschel wrote:
Hi all,
with ODF 1.4 we get an attribute draw:extrusion-metal-type. Its value is
a QName. The default value is 'draw:MetalODF' and the value we use for
MS compatibility is 'loext:MetalMSCompatible'. Using
'draw:MetalMSCompatible' is not allowed.
Currently validation fails, because loext is not registered as namespace
prefix in ODF strict and thus 'loext:MetalMSCompatible' is no valid QName.
It will be detected as valid QName, when I move
mpNamespaceMap->Add(
GetXMLToken(XML_NP_LO_EXT), GetXMLToken(XML_N_LO_EXT),
XML_NAMESPACE_LO_EXT);
up from the "extended" section to the "strict" section in
SvXMLExport::InitCtor_() in xmloff/source/core/xmlexp.cxx.
But I'm not sure, whether that is the correct place to solve the problem.
... there's a bit of a risk that this will make it easier to
"accidentally" write extended attributes in strict ODF export ...
Is there a way to add a namespace when it is actually needed? I mean to
add it when a shape uses this attribute?
suspect that calling SvXMLExport::EnsureNamespace() with the URL could
just work? although the prefix (which is returned) will be "gen0" or
something, not "loext". but that shouldn't be a problem?