private void action2()throws SAXException { XSComplexType oldCt = $runtime.currentSchema.getComplexType(newCt.getName()); if(oldCt==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_COMPLEXTYPE,newCt.getName()) ); } else { newCt.redefine((ComplexTypeImpl)oldCt); $runtime.currentSchema.addComplexType(newCt,true); } }
public List<XSComplexType> getSubtypes() { ArrayList subtypeList = new ArrayList(); Iterator<XSComplexType> cTypes = getRoot().iterateComplexTypes(); while (cTypes.hasNext()) { XSComplexType cType= cTypes.next(); XSType base = cType.getBaseType(); if ((base != null) && (base.equals(this))) { subtypeList.add(cType); } } return subtypeList; }
private void action2()throws SAXException { result.setExplicitContent(explicitContent); result.setContentType( buildComplexExtensionContentModel(explicitContent)); }
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
private void action5()throws SAXException { result.setContentType(explicitContent); }
public XSAttributeUse getAttributeUse( String nsURI, String localName ) { UName name = new UName(nsURI,localName); if(prohibitedAtts.contains(name)) return null; XSAttributeUse o = attributes.get(name); if(o==null) { Iterator itr = iterateAttGroups(); while(itr.hasNext() && o==null) o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName); } if(o==null) { XSType base = getBaseType(); if(base.asComplexType()!=null) o = base.asComplexType().getAttributeUse(nsURI,localName); } return o; }
public Collection<XSAttributeUse> getAttributeUses() { XSComplexType baseType = getBaseType().asComplexType(); if( baseType==null ) return super.getAttributeUses(); // TODO: this is fairly inefficient Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>(); for( XSAttributeUse a : baseType.getAttributeUses()) uses.put(new UName(a.getDecl()),a); uses.keySet().removeAll(prohibitedAtts); for( XSAttributeUse a : super.getAttributeUses()) uses.put(new UName(a.getDecl()),a); return uses.values(); }
private void action5()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getType(ct.getName()) ); $runtime.currentSchema.addComplexType(ct,false); }
private void makeResult( int derivationMethod ) { if(finalValue==null) finalValue = $runtime.finalDefault; if(blockValue==null) blockValue = $runtime.blockDefault; result = new ComplexTypeImpl( $runtime.document, annotation, locator, fa, name, name==null, $runtime.parseBoolean(abstractValue), derivationMethod, baseType, finalValue, blockValue, $runtime.parseBoolean(mixedValue) ); }
((ComplexTypeImpl)type).setScope(ed); return ed;
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
private void action5()throws SAXException { result.setContentType(explicitContent); }
public XSAttributeUse getAttributeUse( String nsURI, String localName ) { UName name = new UName(nsURI,localName); if(prohibitedAtts.contains(name)) return null; XSAttributeUse o = attributes.get(name); if(o==null) { Iterator itr = iterateAttGroups(); while(itr.hasNext() && o==null) o = ((XSAttGroupDecl)itr.next()).getAttributeUse(nsURI,localName); } if(o==null) { XSType base = getBaseType(); if(base.asComplexType()!=null) o = base.asComplexType().getAttributeUse(nsURI,localName); } return o; }
public Collection<XSAttributeUse> getAttributeUses() { XSComplexType baseType = getBaseType().asComplexType(); if( baseType==null ) return super.getAttributeUses(); // TODO: this is fairly inefficient Map<UName,XSAttributeUse> uses = new HashMap<UName, XSAttributeUse>(); for( XSAttributeUse a : baseType.getAttributeUses()) uses.put(new UName(a.getDecl()),a); uses.keySet().removeAll(prohibitedAtts); for( XSAttributeUse a : super.getAttributeUses()) uses.put(new UName(a.getDecl()),a); return uses.values(); }
private void action5()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getType(ct.getName()) ); $runtime.currentSchema.addComplexType(ct,false); }
private void makeResult( int derivationMethod ) { if(finalValue==null) finalValue = $runtime.finalDefault; if(blockValue==null) blockValue = $runtime.blockDefault; result = new ComplexTypeImpl( $runtime.document, annotation, locator, fa, name, name==null, $runtime.parseBoolean(abstractValue), derivationMethod, baseType, finalValue, blockValue, $runtime.parseBoolean(mixedValue) ); }
((ComplexTypeImpl)type).setScope(ed); return ed;
public XSWildcard getAttributeWildcard() { WildcardImpl complete = localAttWildcard; Iterator itr = iterateAttGroups(); while( itr.hasNext() ) { WildcardImpl w = (WildcardImpl)((XSAttGroupDecl)itr.next()).getAttributeWildcard(); if(w==null) continue; if(complete==null) complete = w; else // TODO: the spec says it's intersection, // but I think it has to be union. complete = complete.union(ownerDocument,w); } if( getDerivationMethod()==RESTRICTION ) return complete; WildcardImpl base=null; XSType baseType = getBaseType(); if(baseType.asComplexType()!=null) base = (WildcardImpl)baseType.asComplexType().getAttributeWildcard(); if(complete==null) return base; if(base==null) return complete; return complete.union(ownerDocument,base); }
private void action2()throws SAXException { result.setExplicitContent(explicitContent); result.setContentType( buildComplexExtensionContentModel(explicitContent)); }
private void action5()throws SAXException { result.setContentType(explicitContent); }