I have XML that looks like below from which I want to make the VALUE
tags that are empty (ie <Value/>) default to <Value>0.00</Valueand
then I want to pull out certain values, for which I already have the
XSLT for, which is also seen below. Can someone please help me with
how to do this? Thanks
***Data to be processed ***
<GetNamedProfil eReturn>
<NamedProfile >
<ProfileId>1155 12</ProfileId>
<ProfileRef>
<ProfileName>De wpoint</ProfileName>
<ProfileType>BT U|Weather Data</ProfileType>
</ProfileRef>
<LastModified>2 007-08-01T10:00:05</LastModified>
<Version>5693 </Version>
<DataTypeCode>N </DataTypeCode>
<PeriodTypeCode >H</PeriodTypeCode>
<SummarizeTypeC ode>A</SummarizeTypeCo de>
<ReferenceUOM/>
<ReferenceSumma rizedUOM/>
<DecimalPrecisi on>0</DecimalPrecisio n>
<Description>Ho urly Weather Data</Description>
<Profile>
<Entry>
<Start>2007-07-30T00:00:00</Start>
<Stop>2007-07-30T01:00:00</Stop>
<Value/>
</Entry>
<Entry>
<Start>2007-07-30T01:00:00</Start>
<Stop>2007-07-30T02:00:00</Stop>
<Value/>
</Entry>
<Entry>
<Start>2007-07-30T02:00:00</Start>
<Stop>2007-07-30T03:00:00</Stop>
<Value/>
</Entry>
<Entry>
<Start>2007-07-30T03:00:00</Start>
<Stop>2007-07-30T04:00:00</Stop>
<Value/>
</Entry>
<Entry>
<Start>2007-07-30T04:00:00</Start>
<Stop>2007-07-30T05:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T05:00:00</Start>
<Stop>2007-07-30T06:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T06:00:00</Start>
<Stop>2007-07-30T07:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T07:00:00</Start>
<Stop>2007-07-30T08:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T08:00:00</Start>
<Stop>2007-07-30T09:00:00</Stop>
<Value>75</Value>
</Entry>
<Entry>
<Start>2007-07-30T09:00:00</Start>
<Stop>2007-07-30T10:00:00</Stop>
<Value>75</Value>
</Entry>
<Entry>
<Start>2007-07-30T10:00:00</Start>
<Stop>2007-07-30T11:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T11:00:00</Start>
<Stop>2007-07-30T12:00:00</Stop>
<Value>72</Value>
</Entry>
<Entry>
<Start>2007-07-30T12:00:00</Start>
<Stop>2007-07-30T13:00:00</Stop>
<Value>70</Value>
</Entry>
<Entry>
<Start>2007-07-30T13:00:00</Start>
<Stop>2007-07-30T14:00:00</Stop>
<Value>71</Value>
</Entry>
<Entry>
<Start>2007-07-30T14:00:00</Start>
<Stop>2007-07-30T15:00:00</Stop>
<Value>71</Value>
</Entry>
<Entry>
<Start>2007-07-30T15:00:00</Start>
<Stop>2007-07-30T16:00:00</Stop>
<Value>71</Value>
</Entry>
<Entry>
<Start>2007-07-30T16:00:00</Start>
<Stop>2007-07-30T17:00:00</Stop>
<Value>70</Value>
</Entry>
<Entry>
<Start>2007-07-30T17:00:00</Start>
<Stop>2007-07-30T18:00:00</Stop>
<Value>70</Value>
</Entry>
<Entry>
<Start>2007-07-30T18:00:00</Start>
<Stop>2007-07-30T19:00:00</Stop>
<Value>71</Value>
</Entry>
<Entry>
<Start>2007-07-30T19:00:00</Start>
<Stop>2007-07-30T20:00:00</Stop>
<Value>73</Value>
</Entry>
<Entry>
<Start>2007-07-30T20:00:00</Start>
<Stop>2007-07-30T21:00:00</Stop>
<Value>73</Value>
</Entry>
<Entry>
<Start>2007-07-30T21:00:00</Start>
<Stop>2007-07-30T22:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T22:00:00</Start>
<Stop>2007-07-30T23:00:00</Stop>
<Value>74</Value>
</Entry>
<Entry>
<Start>2007-07-30T23:00:00</Start>
<Stop>2007-07-31T00:00:00</Stop>
<Value>73</Value>
</Entry>
</Profile>
</NamedProfile>
</GetNamedProfile Return>
***xslt that I have that pulls the data that I want****
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:styleshe et xmlns:x="http://www.softsmiths. com/etms/elink"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="x"
version="1.0">
<xsl:output indent="yes" method="xml" encoding="ISO-8859-1" omit-xml-
declaration="no "/>
<xsl:template match="x:GetNam edProfileRespon se">
<NamedProfileLi st>
<xsl:apply-templates select=".//x:Entry"/>
</NamedProfileLis t>
</xsl:template>
<xsl:template match="x:Entry" >
<NamedProfile >
<ProfileID><xsl :value-of select="../../x:ProfileId"/></
ProfileID>
<Name><xsl:valu e-of select="../../x:ProfileRef/x:ProfileName"/></
Name>
<Type><xsl:valu e-of select="../../x:ProfileRef/x:ProfileType"/></
Type>
<StartTime><xsl :value-of select="x:Start "/></StartTime>
<StopTime><xsl: value-of select="x:Stop"/></StopTime>
<Value><xsl:val ue-of select="x:Value "/></Value>
</NamedProfile>
</xsl:template>
</xsl:stylesheet>
*** What I want the output to look like ****
<NamedProfileLi st>
<NamedProfile >
<ProfileID>1155 12</ProfileID>
<Name>Dewpoin t</Name>
<Type>BTU|Weath er Data</Type>
<StartTime>20 07-07-30T00:00:00</StartTime>
<StopTime>200 7-07-30T01:00:00</StopTime>
<Value>0.00</Value>
</NamedProfile>
</NamedProfileLis t>
....instead of
<NamedProfileLi st>
<NamedProfile >
<ProfileID>1155 12</ProfileID>
<Name>Dewpoin t</Name>
<Type>BTU|Weath er Data</Type>
<StartTime>20 07-07-30T00:00:00</StartTime>
<StopTime>200 7-07-30T01:00:00</StopTime>
<Value/>
</NamedProfile>
</NamedProfileLis t>