Hi, The XML prefix is only an alias to the namespace [1] so it doesn't need to match the schema used prefix, but I agree that it looks a bit strange. The prefix is just a short way of saying, hey this element belongs to that namepsace ... as long as the used prefix is pointing to the correct namespace everything should work as expected.
Consider the situation where you have to use two namespaces that by coincidence where using the same prefix ? If you couldn't choose an arbitrary prefix for the namespace this would defeat the propose of XML namespaces. As far I can tell we are free to use the prefix we want when using a certain workspace on our XML document. Do you have any issue if you use HALE generated mappings with App-Schema as is ? That said, is weird that HALE is generating a specific prefix and not try to use the ones defined in the XSD schema. But without debugging this particular use case I can't really tell why this is happening. Regards, Nuno Oliveira [1] https://www.w3schools.com/xml/xml_namespaces.asp On 11/15/2017 08:02 AM, Haas, Sonja (LGL) wrote:
Hello All, I am currently setting up WFS 2.0.0 Services for INSPIRE Annex I. The data transformation is realised with HALE and Appschema and the services are published with Geoserver. While publishing the road transport network I encountered a problem regarding the namespaces. Strangely some of the namespaces are incorrect in the resulting Appschema. As you can see below there appears nns instead of net and nns1 instead of tn. ns3:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc" xmlns:ns3="http://www.geotools.org/app-schema"> <http://www.geotools.org/app-schema%22%3E> <namespaces> <Namespace> <prefix>tn-ro</prefix> <uri>http://inspire.ec.europa.eu/schemas/tn-ro/4.0</uri> </Namespace> <Namespace> <prefix>nns</prefix> <uri>http://inspire.ec.europa.eu/schemas/net/4.0</uri> </Namespace> <Namespace> <prefix>nns1</prefix> <uri>http://inspire.ec.europa.eu/schemas/tn/4.0</uri> </Namespace> <Namespace> <prefix>gn</prefix> <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri> </Namespace> <Namespace> <prefix>gml</prefix> <uri>http://www.opengis.net/gml/3.2</uri> </Namespace> <Namespace> <prefix>base</prefix> <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri> </Namespace> The only way to fix the problem, I found so far, is to manually replace the namespace prefixes in the appschema after the direct upload and then delete the incorrect namespaces from the server and restart. Is this a bug or am I missing something? Kind regards Sonja Haas ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
-- Regards, Nuno Oliveira == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Nuno Miguel Carvalho Oliveira @nmcoliveira Software Engineer GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users