Example #1
0
        protected internal virtual bool isGDataType(AnyAtomicType aat)
        {
            string type = aat.string_type();

            if (type.Equals("xs:gMonthDay") || type.Equals("xs:gMonth") || type.Equals("xs:gYear") || type.Equals("xs:gYearMonth"))
            {
                return(true);
            }
            return(false);
        }
Example #2
0
        protected internal virtual bool isCastable(AnyAtomicType aat)
        {
            string value = aat.StringValue;             // get this once so we don't recreate everytime.
            string type  = aat.string_type();

            if (type.Equals("xs:string") || type.Equals("xs:untypedAtomic"))
            {
                if (isDurationValue(value))
                {
                    return(true);                    // We might be able to cast this.
                }
            }

            // We can cast from ourself or derivations of ourselves.
            if (aat is XSDuration)
            {
                return(true);
            }

            return(false);
        }