/** * Determine whether this type is supported in a basic XSLT processor * * @return true if this type is permitted in a basic XSLT processor */ public boolean isAllowedInBasicXSLT() { return (isPrimitiveType() && getFingerprint() != StandardNames.XS_NOTATION); }
/** * Determine whether this type is supported in a basic XSLT processor * * @return true if this type is permitted in a basic XSLT processor */ public boolean isAllowedInBasicXSLT() { return (isPrimitiveType() && getFingerprint() != StandardNames.XS_NOTATION); }
/** * Get the primitive item type corresponding to this item type. For item(), * this is Type.ITEM. For node(), it is Type.NODE. For specific node kinds, * it is the value representing the node kind, for example Type.ELEMENT. * For anyAtomicValue it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. * For other atomic types it is the primitive type as defined in XML Schema, * except that INTEGER is considered to be a primitive type. */ public ItemType getPrimitiveItemType() { if (isPrimitiveType()) { return this; } else { ItemType s = (ItemType)getBaseType(); if (s.isAtomicType()) { return s.getPrimitiveItemType(); } else { return this; } } }
/** * Get the primitive item type corresponding to this item type. For item(), * this is Type.ITEM. For node(), it is Type.NODE. For specific node kinds, * it is the value representing the node kind, for example Type.ELEMENT. * For anyAtomicValue it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. * For other atomic types it is the primitive type as defined in XML Schema, * except that INTEGER is considered to be a primitive type. */ public ItemType getPrimitiveItemType() { if (isPrimitiveType()) { return this; } else { ItemType s = (ItemType)getBaseType(); if (s.isAtomicType()) { return s.getPrimitiveItemType(); } else { return this; } } }
/** * Get the primitive item type corresponding to this item type. For item(), * this is Type.ITEM. For node(), it is Type.NODE. For specific node kinds, * it is the value representing the node kind, for example Type.ELEMENT. * For anyAtomicValue it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. * For other atomic types it is the primitive type as defined in XML Schema, * except that INTEGER is considered to be a primitive type. */ /*@NotNull*/ public BuiltInAtomicType getPrimitiveItemType() { if (isPrimitiveType()) { return this; } else { ItemType s = (ItemType) getBaseType(); assert s != null; if (s.isPlainType()) { return (BuiltInAtomicType)s.getPrimitiveItemType(); } else { return this; } } }
/** * Get the primitive item type corresponding to this item type. For item(), * this is Type.ITEM. For node(), it is Type.NODE. For specific node kinds, * it is the value representing the node kind, for example Type.ELEMENT. * For anyAtomicValue it is Type.ATOMIC_VALUE. For numeric it is Type.NUMBER. * For other atomic types it is the primitive type as defined in XML Schema, * except that INTEGER is considered to be a primitive type. */ /*@NotNull*/ public BuiltInAtomicType getPrimitiveItemType() { if (isPrimitiveType()) { return this; } else { ItemType s = (ItemType) getBaseType(); assert s != null; if (s.isPlainType()) { return (BuiltInAtomicType)s.getPrimitiveItemType(); } else { return this; } } }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @return the newly constructed built in atomic type */ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType)baseType).getPrimitiveType(); } t.ordered = ordered; BuiltInType.register(fingerprint, t); return t; } }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @param ordered true if the type is ordered * @return the newly constructed built in atomic type */ /*@NotNull*/ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType) baseType).getPrimitiveType(); } t.uType = UType.fromTypeCode(t.primitiveFingerprint); t.ordered = ordered; BuiltInType.register(fingerprint, t); return t; }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @param code Alphabetic code chosen to enable ordering of types according to the type hierarchy * @param ordered true if the type is ordered * @return the newly constructed built in atomic type */ /*@NotNull*/ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType, String code, boolean ordered) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType) baseType).getPrimitiveType(); } t.uType = UType.fromTypeCode(t.primitiveFingerprint); t.ordered = ordered; t.alphaCode = code; BuiltInType.register(fingerprint, t); return t; }
/** * Internal factory method to create a BuiltInAtomicType. There is one instance for each of the * built-in atomic types * * @param fingerprint The name of the type * @param baseType The base type from which this type is derived * @return the newly constructed built in atomic type */ private static BuiltInAtomicType makeAtomicType(int fingerprint, SimpleType baseType) { BuiltInAtomicType t = new BuiltInAtomicType(fingerprint); t.setBaseTypeFingerprint(baseType.getFingerprint()); if (t.isPrimitiveType()) { t.primitiveFingerprint = fingerprint; } else { t.primitiveFingerprint = ((AtomicType)baseType).getPrimitiveType(); } if (baseType instanceof BuiltInAtomicType) { t.ordered = ((BuiltInAtomicType)baseType).ordered; } BuiltInType.register(t.getFingerprint(), t); return t; } }