OpenLayers OpenLayers

Ticket #1722 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

XML format enhancements for GML and Atom formats

Reported by: tschaub Assigned to: tschaub
Priority: minor Milestone: 2.7 Release
Component: Format.XML Version: 2.7 RC1
Keywords: Cc:
State: Complete

Description

The new Atom (#1366) and GML formats (#1639) will contain some common changes that are appropriate for the XML format. Instead of cramming the changes into those patches, they're getting their own ticket.

Attachments

xml.patch (26.8 kB) - added by tschaub on 09/05/08 19:46:37.
add readers/writers and shorthand methods for applying them

Change History

09/05/08 19:04:08 changed by tschaub

  • state set to Review.

09/05/08 19:46:37 changed by tschaub

  • attachment xml.patch added.

add readers/writers and shorthand methods for applying them

09/08/08 17:20:44 changed by ahocevar

  • state changed from Review to Commit.

A few comments:

lib/OpenLayers/Format/XML.js:

  • Very minor:
     	440	            for(prefix in this.namespaces) { 
     	441	                if(this.namespaces[prefix] == uri) { 
     	442	                    gotPrefix = true; 
     	443	                    break; 
     	444	                } 
     	445	            } 
     	446	            if(!gotPrefix) { 
     	447	                prefix = null; 
     	448	            } 
    
    would maybe look better like this:
     	440	            for(var p in this.namespaces) { 
     	441	                if(this.namespaces[prefix] == uri) { 
     	442	                    prefix = p; 
     	443	                    break; 
     	444	                } 
     	445	            } 
    
  • unclear ND comment L534, could be changed to something like:
     	529	     * Parameters: 
     	530	     * node - {DOMElement} The node to be read (required). 
     	531	     * obj - {Object} The object to be modified (optional). 
     	532	     * 
     	533	     * Returns: 
     	534	     * {Object} The input object, modified (or a new one if none was passed). 
    

lib/OpenLayers/Format.js:

  • I do not see what Format.options is needed for, but since there is a test for it, I'm sure there is a reason. So if there really is:
  • Format.options is an undocumented property -- should be added as Property and ND-commented.

After those modification and clarification of Format.options, this is good to commit. Thanks for this patch tim, this makes format writers' lives a lot easier.

09/08/08 17:31:39 changed by tschaub

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [7982]) Adding readers and writers properties to xml formats. These will contain public functions used in serializing and deserializing various formats. Shorthand methods for calling these readers & writers are writeNode and readNode. r=ahocever (closes #1722)

09/08/08 18:39:17 changed by euzuro

  • status changed from closed to reopened.
  • state changed from Complete to Pullup.
  • resolution deleted.

just a reminder: if you want your patch to go from trunk to branch, gotta mark it 'pullup'.

09/08/08 18:41:40 changed by euzuro

  • keywords set to pullup.

09/12/08 13:24:20 changed by euzuro

  • keywords deleted.
  • status changed from reopened to closed.
  • state changed from Pullup to Complete.
  • resolution set to fixed.

(In [8012]) Batch merge for rc2 of 2.7. 'svn merge -r7967:HEAD from trunk (Closes #1733) (Closes #1489) (Closes #1639) (Closes #1718) (Closes #1723) (Closes #1732) (Closes #1616) (Closes #1722)