Barbara, your solution is very similar to what we did when working with unpublished proto-GeoSciML schemas. We pretended they were at a notional http URL and then rewrote this URL in an OASIS Catalog.
Your original approach is slightly different in that you started out using what appears to be a URN, and combining it with some URL path elements to represent a resource. I had never thought of using URNs this way, and it appears that the implementation does not support it. I am not sure if it is legal or moral! What you ended up doing is what we did. Namespaces and the schemaLocation hints used to locate resources are distinct. I have never seen the latter be URNs, only URLs. Thinking about it, I suppose there is no reason why URNs are not valid for all elements of a schemaLocation. Do you know if you original schemUri form is an INSPIRE recommended practice? Your "http://www.inspire.net/ps-f" is a base URL, not a namespace (although it could be one of those, too!). It is what I would have done! If you want to be clear that the address is made up, you might consider http://schemas.inspire.example.org/ or another domain reserved by RFC 2606: http://www.rfc-editor.org/rfc/rfc2606.txt As an aside, there is also a minor religious war between URI+Resolver users versus URL users. This is a general architectural decision, not limited to GeoServer. As more communities strive for interoperability, we will learn more about best practices. Kind regards, Ben. On 16/09/10 14:51, babsip wrote: > > Hi, > > I'm having a problem with this namespace: > "urn:x-inspire:specification:gmlas:ProtectedSitesFull:3.0" > in an app-schema-mapping file. Here is the part where the problem lies: > > <targetTypes> > <FeatureType> > <schemaUri> > > urn:x-inspire:specification:gmlas:ProtectedSitesFull:3.0/ProtectedSitesFull_MU.xsd > </schemaUri> > </FeatureType> > </targetTypes> > > I have an OASIS catalog file with the following definition: > > ... > <rewriteURI > uriStartString="urn:x-inspire:specification:gmlas:ProtectedSitesFull:3.0" > rewritePrefix="INSPIRE/" /> > ... > > GeoServer throws the following exception: > "java.net.MalformedURLException: unknown protocol: urn" > > My work-around solution is to add an additional namespace (invented by me), > e.g. "http://www.inspire.net/ps-f" just for the<schemaUri>-part of the > mapping file and keep the original namespace everywhere else. Additionally, > I have added a line for this invented namespace in the catalog.xml: > > <rewriteURI uriStartString="http://www.inspire.net/ps-f" > rewritePrefix="INSPIRE/" /> > > It's not too bad that way, only problem is that my invented namespace shows > up in the WFS-output: > > <wfs:FeatureCollection numberOfFeatures="5" > timeStamp="2010-09-14T11:01:11.251+02:00" > > xsi:schemaLocation="urn:x-inspire:specification:gmlas:ProtectedSitesFull:3.0 > http://www.inspire.net/ps-f/ProtectedSitesFull_MU.xsd > http://www.opengis.net/wfs > http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd"> > > Does anybody know a better solution? Does<schemaUri> require "http" or is > there a way for it to accept something else? > > Kind regards, > Barbara > -- Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au> Software Engineering Team Leader CSIRO Earth Science and Resource Engineering Australian Resources Research Centre ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users