Sorry to ask such a simple question, but I've been trying to finddecent documentation on the test syntax all evening to no avail and time's wasting. What I need to do is very simple...
in 'C' syntax...
char *my_tag = "123.1";
if( atol( my_tag ) > 0.0 ) do_this();
else if ( atol( my_tag ) < 0.0 ) do_that();
else do_nothing();
Ok... That's simple enough. Now, in XSL I thought...
In the XML document...
<MyXMLBlock>
<MyTag value="123.1"/>
</MyXMLBlock>
and in the XSL style sheet...
<xsl:choose>
<xsl:when test="/MyXMLBlock/MyTag/@value[. > 0.0]">
<!-- do this -->
</xsl:when>
<xsltherwise>
<xsl:when test="/MyXMLBlock/Mytag/@value[. < 0.0]">
<!-- do that -->
</xsl:when>
<xsltherwise>
<!-- do nothing -->
</xsltherwise>
</xsltherwise>
</xsl:choose>
Where I am getting an error is in the [. < 0.0] and [. > 0.0] -- the IE 5.5 browser is giving me a rather cryptic message stating I can not use "<" or ">" in the context.
Can someone either assist me with a solution to this very simple problem or, better still, point me to a good on-line XSL language reference where I can get useful information on the reserved words, boolean operations and such?
many thanks to any and all who can help an XSL newbie get his feet wet.
Scott.
in 'C' syntax...
char *my_tag = "123.1";
if( atol( my_tag ) > 0.0 ) do_this();
else if ( atol( my_tag ) < 0.0 ) do_that();
else do_nothing();
Ok... That's simple enough. Now, in XSL I thought...
In the XML document...
<MyXMLBlock>
<MyTag value="123.1"/>
</MyXMLBlock>
and in the XSL style sheet...
<xsl:choose>
<xsl:when test="/MyXMLBlock/MyTag/@value[. > 0.0]">
<!-- do this -->
</xsl:when>
<xsltherwise>
<xsl:when test="/MyXMLBlock/Mytag/@value[. < 0.0]">
<!-- do that -->
</xsl:when>
<xsltherwise>
<!-- do nothing -->
</xsltherwise>
</xsltherwise>
</xsl:choose>
Where I am getting an error is in the [. < 0.0] and [. > 0.0] -- the IE 5.5 browser is giving me a rather cryptic message stating I can not use "<" or ">" in the context.
Can someone either assist me with a solution to this very simple problem or, better still, point me to a good on-line XSL language reference where I can get useful information on the reserved words, boolean operations and such?
many thanks to any and all who can help an XSL newbie get his feet wet.
Scott.