[Xml-compile] Schema Template wants a target Namespace

DEIGNAN Ciaran C.DEIGNAN at rsd.com
Wed Jun 11 11:51:57 GMT 2014


Hi Mark,

I found an option that stops the error.

print $schema->template('PERL', 'node', attributes_qualified => 1, elements_qualified =>1); exit;

Sorry for disturbing you,

Ciaran Deignan
RSD Open Systems Support

-----Original Message-----
From: DEIGNAN Ciaran [mailto:C.DEIGNAN at rsd.com] 
Sent: mercredi 11 juin 2014 13:26
To: Mark Overmeer
Cc: 'xml-compile at lists.scsys.co.uk'
Subject: Re: [Xml-compile] Schema Template wants a target Namespace

Hi Mark,
I made a tiny testcase, in attachment.

Should it work ?

Ciaran Deignan
RSD Open Systems Support

-----Original Message-----
From: Mark Overmeer [mailto:mark at overmeer.net] 
Sent: mercredi 11 juin 2014 12:49
To: DEIGNAN Ciaran
Cc: 'xml-compile at lists.scsys.co.uk'
Subject: Re: [Xml-compile] Schema Template wants a target Namespace

* 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