So that I could have multiple pieces of JSON in the same template pulled from different places, I tried naming them so that the JSON is nested a bit
{"prcpstaid":{"@context":{"bb":"http://iridl.ldeo.columbia.edu/ontologies/gisuri/geobb/","cfatt":"http://iridl.ldeo.columbia.edu/ontologies/cfatt.owl#","cfatt:standard_name":{"@type":"xsd:string"},"cfatt:units":{"@type":"xsd:string"},"iridl":"http://iridl.ldeo.columbia.edu/ontologies/iridl.owl#","iridl:geoId":{"@type":"@id"},"iridl:hasDependentVariables":{"@type":"iridl:Variable"},"iridl:hasIndependentVariables":{"@container":"@list","@type":"iridl:IndependentVariable"},"iridl:hasSemantics":{"@type":"@id"},"iridl:long_name":{"@type":"xsd:string"},"iridl:name":{"@type":"xsd:string"},"iridl:value":{},"iridl:values":{},"pt":"http://iridl.ldeo.columbia.edu/ontologies/gisuri/geopt/","xsd":"http://www.w3.org/2001/XMLSchema#"},"cfatt:units":"m","iridl:hasIndependentVariables":[{"cfatt:unit
s":"ids","iridl:long_name":"station","iridl:name":"IWMO","iridl:value":"65167000"}],"iridl:name":"elev","iridl:value":"174"}}
figuring I could be explicit in the template as follows.
<div class="template" style="color : red">
Station ID <b><span class="prcpstaid.iridl:hasIndependentVariables iridl:value"></span></b>
</div>
My problem is that it does not work (comes up blank instead of displaying 65167000). Just for reference,
<div class="template" style="color : red">
Station ID <b><span class="iridl:hasIndependentVariables prcpstaid.iridl:value"></span></b>
</div>
does in fact pull out the 174 value, as it is supposed to, though it is not what I want (here the iridl:hasIndependentVariables class does not match the JSON, so makes no difference)
Also, if I don't do the nesting
{"@context":{"bb":"http://iridl.ldeo.columbia.edu/ontologies/gisuri/geobb/","cfatt":"http://iridl.ldeo.columbia.edu/ontologies/cfatt.owl#","cfatt:standard_name":{"@type":"xsd:string"},"cfatt:units":{"@type":"xsd:string"},"iridl":"http://iridl.ldeo.columbia.edu/ontologies/iridl.owl#","iridl:geoId":{"@type":"@id"},"iridl:hasDependentVariables":{"@type":"iridl:Variable"},"iridl:hasIndependentVariables":{"@container":"@list","@type":"iridl:IndependentVariable"},"iridl:hasSemantics":{"@type":"@id"},"iridl:long_name":{"@type":"xsd:string"},"iridl:name":{"@type":"xsd:string"},"iridl:value":{},"iridl:values":{},"pt":"http://iridl.ldeo.columbia.edu/ontologies/gisuri/geopt/","xsd":"http://www.w3.org/2001/XMLSchema#"},"cfatt:units":"m","iridl:hasIndependentVariables":[{"cfatt:unit
s":"ids","iridl:long_name":"station","iridl:name":"IWMO","iridl:value":"65167000"}],"iridl:name":"elev","iridl:value":"174"}
The following works (prints 65167000)
<div class="template" style="color : red">
Station ID <b><span class="iridl:hasIndependentVariables iridl:value"></span></b>
</div>
So is prcpstaid.iridl:value only supposed to work for values and not for iteration? Could we have "prcpstaid.iridl:hasIndependentVariables iridl:value" work as well?
Or did I miss something?