From Klaus.Hildebrandt at maurer-electronics.de Thu Mar 16 08:57:12 2017 From: Klaus.Hildebrandt at maurer-electronics.de (Hildebrandt, Klaus) Date: Thu Mar 16 12:25:28 2017 Subject: [xsd-users] error on convering xsd-schema with targetNamespace-attribute Message-ID: <062a92be71a04d2ea7ea5f1dc279e47e@bkmxp08.bdr.de> Hallo xsd-support, I'm trying to create C++ binding for schema from attachment with: xsd.exe cxx-tree --namespace-map http://trbio.bsi.bund.de/base/4=gid --root-element test simple.xsd I get: error: unable to map XML Schema namespace 'http://trbio.bsi.bund.de/gid/4' to C++ namespace info: use the --namespace-map or --namespace-regex option to provide custom mapping as you can see, I use already the --namespace-map option. I found that the error depends on presence of targetNamespace-attribute of schema-fefinition. the targetNamespace-attribute can't be removed, because the schema is crated by 3rd party. Can you help me? It's a bug of xsd? Or wrong usage? (I'm new on xsd-Software, we evaluating it for usage in our work) Regards, Klaus -------------- next part -------------- A non-text attachment was scrubbed... Name: simple.xsd Type: text/xml Size: 381 bytes Desc: simple.xsd Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20170316/a7c48dfc/simple.bin From boris at codesynthesis.com Thu Mar 16 12:42:35 2017 From: boris at codesynthesis.com (Boris Kolpackov) Date: Thu Mar 16 12:42:44 2017 Subject: [xsd-users] error on convering xsd-schema with targetNamespace-attribute In-Reply-To: <062a92be71a04d2ea7ea5f1dc279e47e@bkmxp08.bdr.de> References: <062a92be71a04d2ea7ea5f1dc279e47e@bkmxp08.bdr.de> Message-ID: Hi Klaus, Hildebrandt, Klaus writes: > --namespace-map http://trbio.bsi.bund.de/base/4=gid > > error: unable to map XML Schema namespace 'http://trbio.bsi.bund.de/gid/4' [...] > > Can you help me? Yes, sure. Try changing /base/ to /gid/ in the namespace URL so that it actually matched what you see in the error message. Boris From Klaus.Hildebrandt at maurer-electronics.de Thu Mar 16 12:51:48 2017 From: Klaus.Hildebrandt at maurer-electronics.de (Hildebrandt, Klaus) Date: Thu Mar 16 13:13:45 2017 Subject: AW: [xsd-users] error on convering xsd-schema with targetNamespace-attribute In-Reply-To: References: <062a92be71a04d2ea7ea5f1dc279e47e@bkmxp08.bdr.de> Message-ID: <54f9df5e31054b7da0dec6cbdbe3a356@bkmxp08.bdr.de> Hallo Boris, I solved the problem, just 30 min later as I send message to you. I have to use namespace-mapping for 2(!) namespace But thanx for answering :) Regards, Klaus -----Urspr?ngliche Nachricht----- Von: Boris Kolpackov [mailto:boris@codesynthesis.com] Gesendet: Donnerstag, 16. M?rz 2017 17:43 An: Hildebrandt, Klaus Cc: 'xsd-users@codesynthesis.com' Betreff: Re: [xsd-users] error on convering xsd-schema with targetNamespace-attribute Hi Klaus, Hildebrandt, Klaus writes: > --namespace-map http://trbio.bsi.bund.de/base/4=gid > > error: unable to map XML Schema namespace > 'http://trbio.bsi.bund.de/gid/4' [...] > > Can you help me? Yes, sure. Try changing /base/ to /gid/ in the namespace URL so that it actually matched what you see in the error message. Boris