[Xml-compile] Schema Template wants a target Namespace

Mark Overmeer mark at overmeer.net
Wed Jun 11 10:48:58 GMT 2014


* DEIGNAN Ciaran (C.DEIGNAN at rsd.com) [140611 10:19]:
> I upgraded to XML ::Compile 1.44.
> I thought I had a testcase working where I could parse a schema and
> then use "template()" to see a framework hash structure.

Yes, that's a smart test.

> Now I can't get it to work. It always says
> error: application requires that element `node' has a targetNamespace

Version 1.44 fixes an issue which never came up before, but which was
quite major.  Top-level elements and attributes shall always be used
name-space qualified, independent from the elementFormDefault value.
This never showed, because nearly everyone uses elementFormDefault=
"qualified" anyway... but it came up when someone tried to use cross
namespace global attibutes.

In the past, I did find the need to "repair" some situations, enforcing
the namespace on a top-element via "elements_qualified => 'TOP'", for
instance, to get a fully qualified top-level element in a soap body.  But
this 'TOP' has now changed meaning: it does not enforce a name-space on
the "top" (global) element, but it checks that there is a targetNamespace
for the global elements.

You get a warning about the use of 'TOP' where you have no 'targetNamespace'
Any idea where that is set?
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list