XSComplexType lastType = getLastRestrictedType(baseType); anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); NameClass enc = getNameClass(thisType.getExplicitContent()); if (checkCollision(anc, enc, lastType)) { return false;
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Checks if the particles/attributes defined in the type parameter * collides with the name classes of anc/enc. * * @return true if there's a collision. */ protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { NameClass[] chnc = characteristicNameClasses.get(type); if (chnc == null) { chnc = new NameClass[2]; chnc[0] = getNameClass(type.getContentType()); // build attribute name classes NameClass nc = NameClass.NULL; Iterator itr = type.iterateAttributeUses(); while( itr.hasNext() ) anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); XSWildcard wc = type.getAttributeWildcard(); if(wc!=null) nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); chnc[1] = nc; characteristicNameClasses.put(type, chnc); } return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); }
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Checks if the particles/attributes defined in the type parameter * collides with the name classes of anc/enc. * * @return true if there's a collision. */ protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { NameClass[] chnc = characteristicNameClasses.get(type); if (chnc == null) { chnc = new NameClass[2]; chnc[0] = getNameClass(type.getContentType()); // build attribute name classes NameClass nc = NameClass.NULL; Iterator itr = type.iterateAttributeUses(); while( itr.hasNext() ) anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); XSWildcard wc = type.getAttributeWildcard(); if(wc!=null) nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); chnc[1] = nc; characteristicNameClasses.put(type, chnc); } return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); }
XSComplexType lastType = getLastRestrictedType(baseType); anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); NameClass enc = getNameClass(thisType.getExplicitContent()); if (checkCollision(anc, enc, lastType)) { return false;
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Checks if the particles/attributes defined in the type parameter * collides with the name classes of anc/enc. * * @return true if there's a collision. */ protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { NameClass[] chnc = characteristicNameClasses.get(type); if (chnc == null) { chnc = new NameClass[2]; chnc[0] = getNameClass(type.getContentType()); // build attribute name classes NameClass nc = NameClass.NULL; Iterator itr = type.iterateAttributeUses(); while( itr.hasNext() ) anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); XSWildcard wc = type.getAttributeWildcard(); if(wc!=null) nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); chnc[1] = nc; characteristicNameClasses.put(type, chnc); } return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); }
XSComplexType lastType = getLastRestrictedType(baseType); anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); NameClass enc = getNameClass(thisType.getExplicitContent()); if (checkCollision(anc, enc, lastType)) { return false;
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Checks if the particles/attributes defined in the type parameter * collides with the name classes of anc/enc. * * @return true if there's a collision. */ protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { NameClass[] chnc = characteristicNameClasses.get(type); if (chnc == null) { chnc = new NameClass[2]; chnc[0] = getNameClass(type.getContentType()); // build attribute name classes NameClass nc = NameClass.NULL; Iterator itr = type.iterateAttributeUses(); while( itr.hasNext() ) anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); XSWildcard wc = type.getAttributeWildcard(); if(wc!=null) nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); chnc[1] = nc; characteristicNameClasses.put(type, chnc); } return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); }
XSComplexType lastType = getLastRestrictedType(baseType); anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); NameClass enc = getNameClass(thisType.getExplicitContent()); if (checkCollision(anc, enc, lastType)) { return false;
/** * Looks for the derivation chain t_1 > t_2 > ... > t * and find t_i such that t_i derives by restriction but * for every j>i, t_j derives by extension. * * @return null * If there's no such t_i or if t_i is any type. */ protected XSComplexType getLastRestrictedType(XSComplexType t) { if (t.getBaseType() == schemas.getAnyType()) { return null; // we don't count the restriction from anyType } if (t.getDerivationMethod() == XSType.RESTRICTION) { return t; } XSComplexType baseType = t.getBaseType().asComplexType(); if (baseType != null) { return getLastRestrictedType(baseType); } else { return null; } }
/** * Checks if the particles/attributes defined in the type parameter * collides with the name classes of anc/enc. * * @return true if there's a collision. */ protected boolean checkCollision(NameClass anc, NameClass enc, XSComplexType type) { NameClass[] chnc = characteristicNameClasses.get(type); if (chnc == null) { chnc = new NameClass[2]; chnc[0] = getNameClass(type.getContentType()); // build attribute name classes NameClass nc = NameClass.NULL; Iterator itr = type.iterateAttributeUses(); while( itr.hasNext() ) anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); XSWildcard wc = type.getAttributeWildcard(); if(wc!=null) nc = new ChoiceNameClass(nc, WildcardNameClassBuilder.build(wc)); chnc[1] = nc; characteristicNameClasses.put(type, chnc); } return chnc[0].hasOverlapWith(enc) || chnc[1].hasOverlapWith(anc); }
XSComplexType lastType = getLastRestrictedType(baseType); anc = new ChoiceNameClass(anc, getNameClass(((XSAttributeUse) itr.next()).getDecl())); NameClass enc = getNameClass(thisType.getExplicitContent()); if (checkCollision(anc, enc, lastType)) { return false;