gml:id should be unique per  document
-------------------------------------

                 Key: GEOT-2627
                 URL: http://jira.codehaus.org/browse/GEOT-2627
             Project: GeoTools
          Issue Type: Bug
          Components: core xml
    Affects Versions: 2.6-M2
            Reporter: Rini Angreani
         Attachments: Encoder.patch

GeoServer will happily encode a nested feature that it has already seen, 
including its gml:id attribute. Because the gml:id attribute is of XSD type ID, 
it must only appear once in any document. XSD ID duplication causes a document 
to be schema invalid. GeoServer should be modified to remember the gml:id of 
every feature it sees and, instead of encoding a feature a second time, encode 
a the containing property-type by reference, that is a property-type property 
with xlink:href set as a relative URI.

For example, nstead of encoding:

<gsml:MappedFeature gml:id="mf.3">
    <gsml:specification>
      <gsml:GeologicUnit gml:id="gu.27">
      ...
<gsml:MappedFeature gml:id="mf.5">
    <gsml:specification>
      <gsml:GeologicUnit gml:id="gu.27">
      ...

GeoServer should encode:

<gsml:MappedFeature gml:id="mf.3">
    <gsml:specification>
      <gsml:GeologicUnit gml:id="gu.27">
      ...
<gsml:MappedFeature gml:id="mf.5">
    <gsml:specification xlink:href="#gu.27" />
      ...

(note empty tag). 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to