FuncNumber.java revision 286
290N/A/*
290N/A * reserved comment block
290N/A * DO NOT REMOVE OR ALTER!
290N/A */
290N/A/*
290N/A * Copyright 1999-2004 The Apache Software Foundation.
290N/A *
290N/A * Licensed under the Apache License, Version 2.0 (the "License");
290N/A * you may not use this file except in compliance with the License.
290N/A * You may obtain a copy of the License at
290N/A *
290N/A * http://www.apache.org/licenses/LICENSE-2.0
290N/A *
290N/A * Unless required by applicable law or agreed to in writing, software
290N/A * distributed under the License is distributed on an "AS IS" BASIS,
290N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
290N/A * See the License for the specific language governing permissions and
290N/A * limitations under the License.
290N/A */
290N/A/*
290N/A * $Id: FuncNumber.java,v 1.2.4.1 2005/09/14 20:18:44 jeffsuttor Exp $
290N/A */
290N/Apackage com.sun.org.apache.xpath.internal.functions;
290N/A
290N/Aimport com.sun.org.apache.xpath.internal.XPathContext;
290N/Aimport com.sun.org.apache.xpath.internal.objects.XNumber;
290N/Aimport com.sun.org.apache.xpath.internal.objects.XObject;
290N/A
290N/A/**
290N/A * Execute the Number() function.
290N/A * @xsl.usage advanced
290N/A */
290N/Apublic class FuncNumber extends FunctionDef1Arg
290N/A{
290N/A static final long serialVersionUID = 7266745342264153076L;
290N/A
290N/A /**
290N/A * Execute the function. The function must return
290N/A * a valid object.
290N/A * @param xctxt The current execution context.
290N/A * @return A valid XObject.
290N/A *
290N/A * @throws javax.xml.transform.TransformerException
290N/A */
290N/A public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
290N/A {
290N/A return new XNumber(getArg0AsNumber(xctxt));
290N/A }
290N/A}
290N/A