Package net.sf.saxon.expr

Examples of net.sf.saxon.expr.CastExpression


                err.setErrorCode("XPST0017");
                err.setIsStaticError(true);
                throw err;
            }

            return new CastExpression(arguments[0], type, true);
        }

        // Now see if it's a constructor function for a user-defined type

        if (arguments.length == 1) {
            int fp = config.getNamePool().getFingerprint(uri, localName);
            if (fp != -1) {
                SchemaType st = config.getSchemaType(fp);
                if (st != null && st.isAtomicType()) {
                    return new CastExpression(arguments[0], (AtomicType)st, true);
                }
            }
        }

        return null;
View Full Code Here


            AtomicType type = (AtomicType)Type.getBuiltInItemType(uri, localName);
            if (type==null) {
                return new ErrorExpression(
                            new DynamicError("Unknown constructor function: " + localName));
            }
            return new CastExpression(arguments[0], type, false);
        }

        // Now see if it's a constructor function for a user-defined type

        if (arguments.length == 1) {
            SchemaType st = config.getSchemaType(nameCode & 0xfffff);
            if (st != null && st instanceof AtomicType) {
                return new CastExpression(arguments[0], (AtomicType)st, false);
            }
        }

        return null;
    }
View Full Code Here

                err.setErrorCode("XPST0017");
                err.setIsStaticError(true);
                throw err;
            }

            return new CastExpression(arguments[0], type, true);
        }

        // Now see if it's a constructor function for a user-defined type

        if (arguments.length == 1) {
            int fp = config.getNamePool().getFingerprint(uri, localName);
            if (fp != -1) {
                SchemaType st = config.getSchemaType(fp);
                if (st != null && st.isAtomicType()) {
                    return new CastExpression(arguments[0], (AtomicType)st, true);
                }
            }
        }

        return null;
View Full Code Here

TOP

Related Classes of net.sf.saxon.expr.CastExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.