[Geoserver-users] Help me!!!!! App-schema Oracle DataAccess producing "null" prefix for namespaces in gsml:borehole

Hi,

Please help me for my question that has confused me for two
weeks!!!!!!!!!!!!:frowning:

I am using the latest app-schema with oracle for data access. I download
and test the example configuration files that contains gsml_GeologicUnit &
gsml_MappedFeature. It works very well. Through WFS, the data in Oracle can
be mapped to GeoSciML files correctly.

Thus I continue to try to implement the gsml:borehole by myself. I add a new
folder under the \workspaces\gsml. In the mapping file, I define all the
namespaces like below:

    <namespaces>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>gsml</prefix>
            <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sa</prefix>
            <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>om</prefix>
            <uri>http://www.opengis.net/om/1.0.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>cv</prefix>
            <uri>http://www.opengis.net/cv/0.2.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>swe</prefix>
            <uri>http://www.opengis.net/swe/1.0.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sml</prefix>
            <uri>http://www.opengis.net/sensorML/1.0.1&lt;/uri&gt;
        </Namespace>
    </namespaces>

I don't define a FeatureType, instead I just defile as below:

<!-- <catalog>../../commonSchemas/catalog.xml</catalog>-->
        <catalog>../../../schemas/catalog.xml</catalog>
        
    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

In the mapping part, only three elements are mapped as below:

                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole
                    </targetAttribute>
                    <idExpression>
                        <OCQL>strConcat('objectid.',SHAPENR)</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gml:name
                      </targetAttribute>
                    <sourceExpression>
                        <OCQL>BHOLE_NO</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole/sa:length
                    </targetAttribute>
                    <sourceExpression>
                        <OCQL>LENGTH</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>uom</name>
                        <value>'urn:ogc:def:uom:UCUM:m'</value>
                    </ClientProperty>
                </AttributeMapping>

OK, it is quite simple. I don't get any error message when starting the
tomcat 6.0. But when I access

http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:Borehole

I find only the prefix with 'gml' & 'gsml' are correct, however the 'sa'
prefix is replaced by 'null'. I attach a picture below.

http://old.nabble.com/file/p27743964/borehole.jpg

Thus, I think my questions are:

1. Is there any example configuration for gsml:borehole? If anyone has map
the gsml:borehole successfully, could you help me?

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping file
are not correct? Is this a bug? Or because of my configuration?

Thank you very much if you can help me!!!!!

Ying

--
View this message in context: http://old.nabble.com/Help-me!!!!!-App-schema-Oracle-DataAccess-producing-"null"-prefix-for-namespaces-in-gsml%3Aborehole-tp27743964p27743964.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

1. Is there any example configuration for gsml:borehole? If anyone has map

the gsml:borehole successfully, could you help me?

The AuScope Team (developers of app-schema, Ben C-D, Rini A, et al) are working on this right now. A suitable test and sample configuration are being put together at the same time. The GML3 bindings needed some work along with polymorphism support. Fingers crossed it will be resolved in the next couple of weeks.

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping file

are not correct? Is this a bug? Or because of my configuration?

I think you've hit GEOT-2932 - http://jira.codehaus.org/browse/GEOT-2932

No doubt Ben or Rini or one of the more technical people of my team will respond shortly with more details for you.

Regards,

Rob

Dr Robert Woodcock
CSIRO
ARRC (Australian Resources Research Centre)
26 Dick Perry Avenue, Kensington WA 6151, Australia
PO Box 1130, Bentley WA 6102, Australia
Ph: 08 6436.8780 | E: Robert.Woodcock@anonymised.com | W: www.csiro.au

-----Original Message-----
From: yw [mailto:huanxuefeitian@anonymised.com]
Sent: Monday, 1 March 2010 10:08 PM
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] Help me!!!!! App-schema Oracle DataAccess producing "null" prefix for namespaces in gsml:borehole

Hi,

Please help me for my question that has confused me for two
weeks!!!!!!!!!!!!:frowning:

I am using the latest app-schema with oracle for data access. I download
and test the example configuration files that contains gsml_GeologicUnit &
gsml_MappedFeature. It works very well. Through WFS, the data in Oracle can
be mapped to GeoSciML files correctly.

Thus I continue to try to implement the gsml:borehole by myself. I add a new
folder under the \workspaces\gsml. In the mapping file, I define all the
namespaces like below:

    <namespaces>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>gsml</prefix>
            <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sa</prefix>
            <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>om</prefix>
            <uri>http://www.opengis.net/om/1.0.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>cv</prefix>
            <uri>http://www.opengis.net/cv/0.2.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>swe</prefix>
            <uri>http://www.opengis.net/swe/1.0.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sml</prefix>
            <uri>http://www.opengis.net/sensorML/1.0.1&lt;/uri&gt;
        </Namespace>
    </namespaces>

I don't define a FeatureType, instead I just defile as below:

<!-- <catalog>../../commonSchemas/catalog.xml</catalog>-->
        <catalog>../../../schemas/catalog.xml</catalog>
        
    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

In the mapping part, only three elements are mapped as below:

                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole
                    </targetAttribute>
                    <idExpression>
                        <OCQL>strConcat('objectid.',SHAPENR)</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gml:name
                      </targetAttribute>
                    <sourceExpression>
                        <OCQL>BHOLE_NO</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole/sa:length
                    </targetAttribute>
                    <sourceExpression>
                        <OCQL>LENGTH</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>uom</name>
                        <value>'urn:ogc:def:uom:UCUM:m'</value>
                    </ClientProperty>
                </AttributeMapping>

OK, it is quite simple. I don't get any error message when starting the
tomcat 6.0. But when I access

http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:Borehole

I find only the prefix with 'gml' & 'gsml' are correct, however the 'sa'
prefix is replaced by 'null'. I attach a picture below.

http://old.nabble.com/file/p27743964/borehole.jpg

Thus, I think my questions are:

1. Is there any example configuration for gsml:borehole? If anyone has map
the gsml:borehole successfully, could you help me?

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping file
are not correct? Is this a bug? Or because of my configuration?

Thank you very much if you can help me!!!!!

Ying

--
View this message in context: http://old.nabble.com/Help-me!!!!!-App-schema-Oracle-DataAccess-producing-"null"-prefix-for-namespaces-in-gsml%3Aborehole-tp27743964p27743964.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,

Thanks very much for your help. Your message is very helpful, because at
least now, I think the wrong thing might not be on my side. I guess the
reason is that xml Encoder does not declare namespaces and prefixes
indirectly imported as described in
http://jira.codehaus.org/browse/GEOT-1276. So,

1. What should I do to avoid such a problem? The 'sa' prefix is necessary
because gsml:borehole requires this.

2. The interesting thing is that I also tried geoserver 1.6 with community
schema which has been tested by BGS. I used .properties file to output
gsml:borehole and it works very well. However, if I create the tables in
Oracle according to the .properties file and change the connection part of
the mapping file, I get error message to say the server can not connect to
Oracle.

Anyway, I will wait for the new version. Thanks very much.

Best,

Ying

Hi,

1. Is there any example configuration for gsml:borehole? If anyone has map

the gsml:borehole successfully, could you help me?

The AuScope Team (developers of app-schema, Ben C-D, Rini A, et al) are
working on this right now. A suitable test and sample configuration are
being put together at the same time. The GML3 bindings needed some work
along with polymorphism support. Fingers crossed it will be resolved in the
next couple of weeks.

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping

file
are not correct? Is this a bug? Or because of my configuration?

I think you've hit GEOT-2932 - http://jira.codehaus.org/browse/GEOT-2932

No doubt Ben or Rini or one of the more technical people of my team will
respond shortly with more details for you.

Regards,

Rob

Dr Robert Woodcock
CSIRO
ARRC (Australian Resources Research Centre)
26 Dick Perry Avenue, Kensington WA 6151, Australia
PO Box 1130, Bentley WA 6102, Australia
Ph: 08 6436.8780 | E: Robert.Woodcock@anonymised.com | W: www.csiro.au

--
View this message in context: http://old.nabble.com/Help-me!!!!!-App-schema-Oracle-DataAccess-producing-"null"-prefix-for-namespaces-in-gsml%3Aborehole-tp27743964p27780739.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ying,

there are several related problems, and gsml:Borehole is known to be
affected. Please see the workaround here (creating an sa workspace with a feature type to force the catalog to be aware of the sa namespace):
http://jira.codehaus.org/browse/GEOT-2932

This problem is currently the subject of an investigation by Jacqui Githaiga.

Kind regards,
Ben.

On 04/03/10 21:31, yw wrote:

Hi,

Thanks very much for your help. Your message is very helpful, because at
least now, I think the wrong thing might not be on my side. I guess the
reason is that xml Encoder does not declare namespaces and prefixes
indirectly imported as described in
http://jira.codehaus.org/browse/GEOT-1276. So,

1. What should I do to avoid such a problem? The 'sa' prefix is necessary
because gsml:borehole requires this.

2. The interesting thing is that I also tried geoserver 1.6 with community
schema which has been tested by BGS. I used .properties file to output
gsml:borehole and it works very well. However, if I create the tables in
Oracle according to the .properties file and change the connection part of
the mapping file, I get error message to say the server can not connect to
Oracle.

Anyway, I will wait for the new version. Thanks very much.

Best,

Ying

Hi,

1. Is there any example configuration for gsml:borehole? If anyone has map

the gsml:borehole successfully, could you help me?

The AuScope Team (developers of app-schema, Ben C-D, Rini A, et al) are
working on this right now. A suitable test and sample configuration are
being put together at the same time. The GML3 bindings needed some work
along with polymorphism support. Fingers crossed it will be resolved in the
next couple of weeks.

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping

file
are not correct? Is this a bug? Or because of my configuration?

I think you've hit GEOT-2932 - http://jira.codehaus.org/browse/GEOT-2932

No doubt Ben or Rini or one of the more technical people of my team will
respond shortly with more details for you.

Regards,

Rob

Dr Robert Woodcock
CSIRO
ARRC (Australian Resources Research Centre)
26 Dick Perry Avenue, Kensington WA 6151, Australia
PO Box 1130, Bentley WA 6102, Australia
Ph: 08 6436.8780 | E: Robert.Woodcock@anonymised.com | W: www.csiro.au

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer, CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
26 Dick Perry Ave, Kensington WA 6151, Australia

Hi,

Due to the question below, I really have got much useful help. At least,
now, I understand where the problem is from and we can do something
workaround to solve this problem temporally.

However, considering I am just a beginner, so could I have some instruction
in more detail? Thanks very much.

1. I know we can create an sa workspace with a feature type to force the
catalog to be aware of the sa namespace.

1.1 But how?

What I do is:
1) create a 'sa' folder under 'workspaces' folder
2) add a 'namespace.xml' in 'sa' folder

<namespace>
  <id>sa_namespace</id>
  <prefix>sa</prefix>
  <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
</namespace>

3) add a 'workspace.xml' in 'sa' folder

<workspace>
  <id>sa_workspace</id>
  <name>sa</name>
</workspace>

4) create a 'featuretype.xml' in 'sa' folder

<featureType>
    <id>sa_featuretype</id>
</featureType>

1.2 Is this enough?
1.3 Where to create the featuretype?

2. I really read http://jira.codehaus.org/browse/GEOT-2932. I have the
questions:

"The workaround is to mention the namespace in your top-level schema

(make a wrapper schema and put it in your local OASIS catalog, or hack a
local copy of your schema)."

2.1 Does this mean I create a 'profiles' folder and add a wrapper schema
file in the folder?
2.2 Is the local OASIS catalog the catalog.xml in 'schemas' folder?
2.3 How to put the wrapper schema in the local OASIS catalog?

"For example, here is a profile wrapper XSD that works around this bug

(from an old GeoServer community-schemas configuration):
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/BGS_test_1/profiles/Borehole.xsd&quot;

2.4 Is it OK I just copy the 'Borehole.xsd' for my borehole case?

"This schema is then the one named in the mapping file."

2.5 Does this mean in the mapping file, I change

    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

to

    <targetTypes>
        <FeatureType>
            <schemaUri>../../../profiles/Borehole.xsd</schemaUri>
        </FeatureType>
    </targetTypes>

???

Thank you very much again,

Ying

yw wrote:

Hi,

Please help me for my question that has confused me for two
weeks!!!!!!!!!!!!:frowning:

I am using the latest app-schema with oracle for data access. I download
and test the example configuration files that contains gsml_GeologicUnit &
gsml_MappedFeature. It works very well. Through WFS, the data in Oracle
can be mapped to GeoSciML files correctly.

Thus I continue to try to implement the gsml:borehole by myself. I add a
new folder under the \workspaces\gsml. In the mapping file, I define all
the namespaces like below:

    <namespaces>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>gsml</prefix>
            <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sa</prefix>
            <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>om</prefix>
            <uri>http://www.opengis.net/om/1.0.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>cv</prefix>
            <uri>http://www.opengis.net/cv/0.2.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>swe</prefix>
            <uri>http://www.opengis.net/swe/1.0.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sml</prefix>
            <uri>http://www.opengis.net/sensorML/1.0.1&lt;/uri&gt;
        </Namespace>
    </namespaces>

I don't define a FeatureType, instead I just defile as below:

<!-- <catalog>../../commonSchemas/catalog.xml</catalog>-->
        <catalog>../../../schemas/catalog.xml</catalog>
        
    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

In the mapping part, only three elements are mapped as below:

                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole
                    </targetAttribute>
                    <idExpression>
                        <OCQL>strConcat('objectid.',SHAPENR)</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gml:name
                      </targetAttribute>
                    <sourceExpression>
                        <OCQL>BHOLE_NO</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole/sa:length
                    </targetAttribute>
                    <sourceExpression>
                        <OCQL>LENGTH</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>uom</name>
                        <value>'urn:ogc:def:uom:UCUM:m'</value>
                    </ClientProperty>
                </AttributeMapping>

OK, it is quite simple. I don't get any error message when starting the
tomcat 6.0. But when I access

http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:Borehole

I find only the prefix with 'gml' & 'gsml' are correct, however the 'sa'
prefix is replaced by 'null'. I attach a picture below.

http://old.nabble.com/file/p27743964/borehole.jpg

Thus, I think my questions are:

1. Is there any example configuration for gsml:borehole? If anyone has map
the gsml:borehole successfully, could you help me?

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping
file are not correct? Is this a bug? Or because of my configuration?

Thank you very much if you can help me!!!!!

Ying

--
View this message in context: http://old.nabble.com/Help-me!!!!!-App-schema-Oracle-DataAccess-producing-"null"-prefix-for-namespaces-in-gsml%3Aborehole-tp27743964p27837408.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi Ying,

My workaround for "null" prefix for sa namespaces :

I have this in Borehole.xml
<AttributeMapping>
  <targetAttribute>sa:shape</targetAttribute>
  <sourceExpression>
    <OCQL>BOREHOLESHAPE</OCQL>
  </sourceExpression>
  <targetAttributeNode>gml:LineStringPropertyType</targetAttributeNode>
</AttributeMapping>>

What I did is setup a working sa:SamplingCollection FeatureType :
-- workspaces
        |--sa
            |--namespace.xml
            |--workspace.xml
            |--SamplingFeatureCollection
                     |--datastore.xml
                     |--SamplingFeatureCollection
                              |--AppSchemaDataAccess.xsd
                              |--featuretype.xml
                              |--SamplingFeatureCollection.xml

Note : a working sa:SamplingCollection feature type means when I call from http://localhost:8080/geoserver/wfs?request=getFeature&typeName=sa:SamplingCollection, it is working fine.

Hope this help.

Regards,
Florence

-----Original Message-----
From: yw [mailto:huanxuefeitian@anonymised.com]
Sent: Tuesday, 9 March 2010 11:38 PM
To: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Help me!!!!! App-schema Oracle DataAccess producing "null" prefix for namespaces in gsml:borehole

Hi,

Due to the question below, I really have got much useful help. At least,
now, I understand where the problem is from and we can do something
workaround to solve this problem temporally.

However, considering I am just a beginner, so could I have some instruction
in more detail? Thanks very much.

1. I know we can create an sa workspace with a feature type to force the
catalog to be aware of the sa namespace.

1.1 But how?

What I do is:
1) create a 'sa' folder under 'workspaces' folder
2) add a 'namespace.xml' in 'sa' folder

<namespace>
  <id>sa_namespace</id>
  <prefix>sa</prefix>
  <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
</namespace>

3) add a 'workspace.xml' in 'sa' folder

<workspace>
  <id>sa_workspace</id>
  <name>sa</name>
</workspace>

4) create a 'featuretype.xml' in 'sa' folder

<featureType>
    <id>sa_featuretype</id>
</featureType>

1.2 Is this enough?
1.3 Where to create the featuretype?

2. I really read http://jira.codehaus.org/browse/GEOT-2932. I have the
questions:

"The workaround is to mention the namespace in your top-level schema

(make a wrapper schema and put it in your local OASIS catalog, or hack a
local copy of your schema)."

2.1 Does this mean I create a 'profiles' folder and add a wrapper schema
file in the folder?
2.2 Is the local OASIS catalog the catalog.xml in 'schemas' folder?
2.3 How to put the wrapper schema in the local OASIS catalog?

"For example, here is a profile wrapper XSD that works around this bug

(from an old GeoServer community-schemas configuration):
https://www.seegrid.csiro.au/subversion/GeoSciML/trunk/tools/GeoServer/configurations/BGS_test_1/profiles/Borehole.xsd&quot;

2.4 Is it OK I just copy the 'Borehole.xsd' for my borehole case?

"This schema is then the one named in the mapping file."

2.5 Does this mean in the mapping file, I change

    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

to

    <targetTypes>
        <FeatureType>
            <schemaUri>../../../profiles/Borehole.xsd</schemaUri>
        </FeatureType>
    </targetTypes>

???

Thank you very much again,

Ying

yw wrote:

Hi,

Please help me for my question that has confused me for two
weeks!!!!!!!!!!!!:frowning:

I am using the latest app-schema with oracle for data access. I download
and test the example configuration files that contains gsml_GeologicUnit &
gsml_MappedFeature. It works very well. Through WFS, the data in Oracle
can be mapped to GeoSciML files correctly.

Thus I continue to try to implement the gsml:borehole by myself. I add a
new folder under the \workspaces\gsml. In the mapping file, I define all
the namespaces like below:

    <namespaces>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>gsml</prefix>
            <uri>urn:cgi:xmlns:CGI:GeoSciML:2.0</uri>
        </Namespace>
        <Namespace>
            <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sa</prefix>
            <uri>http://www.opengis.net/sampling/1.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>om</prefix>
            <uri>http://www.opengis.net/om/1.0.0&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>cv</prefix>
            <uri>http://www.opengis.net/cv/0.2.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>swe</prefix>
            <uri>http://www.opengis.net/swe/1.0.1&lt;/uri&gt;
        </Namespace>
        <Namespace>
            <prefix>sml</prefix>
            <uri>http://www.opengis.net/sensorML/1.0.1&lt;/uri&gt;
        </Namespace>
    </namespaces>

I don't define a FeatureType, instead I just defile as below:

<!-- <catalog>../../commonSchemas/catalog.xml</catalog>-->
        <catalog>../../../schemas/catalog.xml</catalog>
        
    <targetTypes>
        <FeatureType>
           
<schemaUri>http://www.geosciml.org/geosciml/2.0/xsd/geosciml.xsd&lt;/schemaUri&gt;
        </FeatureType>
    </targetTypes>

In the mapping part, only three elements are mapped as below:

                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole
                    </targetAttribute>
                    <idExpression>
                        <OCQL>strConcat('objectid.',SHAPENR)</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gml:name
                      </targetAttribute>
                    <sourceExpression>
                        <OCQL>BHOLE_NO</OCQL>
                    </sourceExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        gsml:Borehole/sa:length
                    </targetAttribute>
                    <sourceExpression>
                        <OCQL>LENGTH</OCQL>
                    </sourceExpression>
                    <ClientProperty>
                        <name>uom</name>
                        <value>'urn:ogc:def:uom:UCUM:m'</value>
                    </ClientProperty>
                </AttributeMapping>

OK, it is quite simple. I don't get any error message when starting the
tomcat 6.0. But when I access

http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=gsml:Borehole

I find only the prefix with 'gml' & 'gsml' are correct, however the 'sa'
prefix is replaced by 'null'. I attach a picture below.

http://old.nabble.com/file/p27743964/borehole.jpg

Thus, I think my questions are:

1. Is there any example configuration for gsml:borehole? If anyone has map
the gsml:borehole successfully, could you help me?

2. Why all namespaces expect for 'gml' or 'gsml' defined in the mapping
file are not correct? Is this a bug? Or because of my configuration?

Thank you very much if you can help me!!!!!

Ying

--
View this message in context: http://old.nabble.com/Help-me!!!!!-App-schema-Oracle-DataAccess-producing-"null"-prefix-for-namespaces-in-gsml%3Aborehole-tp27743964p27837408.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,

Continuously focusing on the geosciml in Geoserver 2.0, there is small but interesting question. In gsml:borehole, there is an element, gsml:elevation. I download the example from AuScope (https://twiki.auscope.org/twiki/bin/view/CoreLibrary/NvclGeoserverDeployment), where in the mapping file, the gsml:elevation element is defined as below,

gsml:collarLocation/gsml:BoreholeCollar/gsml:elevation toDirectPosition('SRS_NAME','urn:x-ogc:def:crs:EPSG:5711',ELEVATION)

I think this should be right. However, the output is like

<gsml:elevation axisLabels=“Gravity-related height” srsDimension=“1” srsName=“http://www.opengis.net/gml/srs/epsg.xml#5701” uomLabels=“m”>DirectPosition1D[1.0]</gsml:elevation>

This seems little strange. Then if I define the gsml:elevation element in a more direct way,

gsml:collarLocation/gsml:BoreholeCollar/gsml:elevation ELEVATION srsName 'urn:x-ogc:def:crs:EPSG:6.15:5701' srsDimension 1

The output seems be more correct,

<gsml:elevation srsDimension=“1” srsName=“urn:x-ogc:def:crs:EPSG:6.15:5701”>1</gsml:elevation>

So my question is that whether the output from the first way is right? Any comment?

Thanks,

Ying


¸ü¶àÈÈÀ±×ÊѶ¾¡ÔÚаæMSNÊ×Ò³£¡ Á¢¿Ì·ÃÎÊ£¡