[Chameleon-dev] [Bug 1272] New: LayerAttributes.php does not work with Ionic or Geoserver

bugzilla-daemon at bugzilla.maptools.org bugzilla-daemon at bugzilla.maptools.org
Thu Feb 2 08:56:20 EST 2006


           Summary: LayerAttributes.php does not work with Ionic or
           Product: Chameleon
           Version: 2.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: chameleon-dev at lists.maptools.org
        ReportedBy: bartvde at xs4all.nl

LayerAttributes.php assumes SEQUENCE and ELEMENT as the XML tags in the
DescribeFeatureType response. This is true for Mapserver, but Ionic and
Geoserver use namespaces so then this does not work.

I am using strpos now to overcome this, but maybe there is a better way to get
the XML parser to ignore the namespace????

I have made the following changes:

1) when checking for SEQUENCE, check for the substring so namespace is ignored.
    // loop through the structures and process the SEQUENCE
    foreach ($tags as $key=>$val)
        // process ROWSET
        // bartvde, this could be xsd:sequence in the case of Ionic!
        if (strpos(strtoupper( $key ),"SEQUENCE")  !== false)

2) in parseElements, use element substring since namespace can be present

        // bartvde, this could be xsd:element in the case of Ionic!
        if ( strpos(strtoupper( $axValues[$i]["tag"]), "ELEMENT" ) !== false)

3) use http client for the communication to the WFS since it can be remote
in getAttributeTypes function:

    // use the http client
    $oHTTPClient = new HTTPClient("", 30);
    $data = $oHTTPClient->doGET($szXmlUrl);

    // read the xml datasource
    //$aszFile = file( $szXmlUrl );

    // combine results
    //if ( is_array( $aszFile ) )
    //    foreach( $aszFile as $line )
    //        $data .= $line;

    // check to see if an error was generated
    //if ( !is_array( $aszFile ) ||
    if (
         strpos( strtoupper( $data ), '<SERVICEEXCEPTIONREPORT' ) !== false )
        return array();

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Please do NOT reply to this email, use the link above instead to 
login to bugzilla and submit your comment. Any email reply to this
address will be lost.

More information about the Chameleon-dev mailing list