protected double getArg0AsNumber ( XPathContext xctxt ) throws javax . xml . transform . TransformerException { if ( null == m_arg0 ) { int currentNode = xctxt . getCurrentNode ( ) ; if ( DTM . NULL == currentNode ) return 0 ; else { DTM dtm = xctxt . getDTM ( currentNode ) ; XMLString str = dtm . getStringValue ( currentNode ) ; return str . toDouble ( ) ; } } else return m_arg0 . execute ( xctxt ) . num ( ) ; }
Execute the first argument expression that is expected to return a number . If the argument is null then get the number value from the current context node .