E
edfialk
here's my xml:
<dimension name="lat" units="degrees_north"
dim_type="index">
<min>-90</min>
<max>90</max>
<count>181</count>
</dimension>
<dimension name="lon" units="degrees_east"
dim_type="index">
<min>-180</min>
<max>179</max>
<count>360</count>
</dimension>
I'm having difficulty finding out which of these tags are name="lat"
and which are name="lon".
right now I have:
<xsl:for-each select="/dataset/LatLonTimeCube/dimensions/
dimension">
<xsl:if test="name=lon">
<westbc><xsl:value-of select="min"/></westbc>
<eastbc><xsl:value-of select="max"/></eastbc>
</xsl:if>
<xsl:if test="name=lat">
<northbc>90</northbc>
<southbc>-90</southbc>
</xsl:if>
</xsl:for-each>
I know the 90 in there is a constant, I was just testing.
For the above xml, I need to print out:
west: -179
north: 90
east: 180
south: -90
BUT, my if test="name=lon" is always failing. Does anyone know how to
test the value of name from inside the dimension tag?
I would extremely appreciate any help.
Thanks!
-Ed
<dimension name="lat" units="degrees_north"
dim_type="index">
<min>-90</min>
<max>90</max>
<count>181</count>
</dimension>
<dimension name="lon" units="degrees_east"
dim_type="index">
<min>-180</min>
<max>179</max>
<count>360</count>
</dimension>
I'm having difficulty finding out which of these tags are name="lat"
and which are name="lon".
right now I have:
<xsl:for-each select="/dataset/LatLonTimeCube/dimensions/
dimension">
<xsl:if test="name=lon">
<westbc><xsl:value-of select="min"/></westbc>
<eastbc><xsl:value-of select="max"/></eastbc>
</xsl:if>
<xsl:if test="name=lat">
<northbc>90</northbc>
<southbc>-90</southbc>
</xsl:if>
</xsl:for-each>
I know the 90 in there is a constant, I was just testing.
For the above xml, I need to print out:
west: -179
north: 90
east: 180
south: -90
BUT, my if test="name=lon" is always failing. Does anyone know how to
test the value of name from inside the dimension tag?
I would extremely appreciate any help.
Thanks!
-Ed