Hi Regina,
On 06.11.2024 19: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.
Is there a way to add a namespace when it is actually needed? I mean
to add it when a shape uses this attribute?
Any element may have its own xmlns attributes, that take effect
immediately, including in its other attributes. So you may add the
attribute not to the top-level element, but right to the element using
that draw:extrusion-metal-type with a loext value, when it's not writing
an extended format maybe?
--
Best regards,
Mike Kaganski