Ignore:
Timestamp:
Apr 10, 2015, 11:12:37 PM (10 years ago)
Author:
djay
Message:

Fix in JS ZOO-API for accessing reference(s).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-api/js/ZOO-api.js

    r502 r625  
    36713671    var outputs = node.*::ProcessOutputs.*::Output;
    36723672    if (outputs.length() > 0) {
    3673       var data = outputs[0].*::Data.*::*[0];
    3674       var builder = this.parseData[data.localName().toLowerCase()];
    3675       if (builder)
    3676         return builder.apply(this,[data]);
    3677       else
    3678         return null;
     3673      var res=[];
     3674      for(var i=0;i<outputs.length();i++){
     3675        var data = outputs[i].*::Data.*::*[0];
     3676        if(!data){
     3677          data = outputs[i].*::Reference;
     3678        }
     3679        var builder = this.parseData[data.localName().toLowerCase()];
     3680        if (builder)
     3681          res.push(builder.apply(this,[data]));
     3682        else
     3683          res.push(null);
     3684      }
     3685      return res.length>1?res:res[0];
    36793686    } else
    36803687      return null;
     
    37343741     */
    37353742    'reference': function(node) {
    3736       var result = {type:'reference',value:node.*::href};
     3743      var result = {type:'reference',value:node.@href};
    37373744      return result;
    37383745    }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png