Opened 15 years ago

Closed 15 years ago

#90 closed defect (fixed)

Node name changed in configs

Reported by: adube Owned by: adube
Priority: minor Milestone:
Component: packaging/scripts/config Version:
Keywords: config, nodes, parent, children Cc:

Description

Problem

The core elements of GeoPrisma used to receive SimpleXMLElements in their constructors. With the implementation of the new PGSQLMapContextConfig driver, this was changed to simple PHP arrays.

Old configs had to transform their SimpleXMLElements to PHP arrays, which became difficult in some cases.

When a xml node contain multiple nodes having the same name, its name should ends with an 's' and its children should have the same name minus the 's', such as :

  • <resources> has <resource> children

At some places, this wasn't the case :

  • MapFishLayer widget :
    • <model> had <node> children
    • <children> had <node> children
  • Map widget, inside <context> option :
    • <functions> had <function>, <fidegualfunction> and <attributegual> children
  • Shortcut widget :
    • <resourcesToActivate> had <resource> children.

Solution

Keep all old tag names (for backward compatibility) but deprecate them and choose new names that would respect the 'parent' with 'children' having the parent's name minus the 's' rule.

Documentation should be adjusted as well.

only exception : the shortcut widget. Since the option was never used in a production environment, we should simply change it and forget about the old name.

Change History (1)

comment:1 by adube, 15 years ago

Resolution: fixed
Status: newclosed

All changes were made in #89, minus a small adjustment to the doc in r811.

Fixed.

Note: See TracTickets for help on using tickets.