/** * Gets a reference to the existing schema or creates a new one * if none exists yet. */ public SchemaImpl createSchema(String targetNamespace, Locator location) { SchemaImpl obj = (SchemaImpl)schemas.get(targetNamespace); if (obj == null) { obj = new SchemaImpl(this, location, targetNamespace); schemas.put(targetNamespace, obj); schemas2.add(obj); } return obj; }
private void action5()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getType(ct.getName()) ); $runtime.currentSchema.addComplexType(ct,false); }
private void action10()throws SAXException { $runtime.currentSchema.addForeignAttributes(fa); }
private void action2()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getModelGroupDecl(group.getName()) ); $runtime.currentSchema.addModelGroupDecl(group,false); }
private void action0()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getAttGroupDecl(ag.getName()) ); $runtime.currentSchema.addAttGroupDecl(ag,false); }
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); } }
private void action3()throws SAXException { XSSimpleType oldSt = $runtime.currentSchema.getSimpleType(newSt.getName()); if(oldSt==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_SIMPLETYPE,newSt.getName()) ); } else { newSt.redefine((SimpleTypeImpl)oldSt); $runtime.currentSchema.addSimpleType(newSt,true); } }
private void action3()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getAttributeDecl(ad.getName()) ); $runtime.currentSchema.addAttributeDecl(ad); }
private void action6()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getType(st.getName()) ); $runtime.currentSchema.addSimpleType(st,false); }
private void action7()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getElementDecl(e.getName()) ); $runtime.currentSchema.addElementDecl(e); }
public ParserContext( XSOMParser owner, XMLParser parser ) { this.owner = owner; this.parser = parser; try (InputStream is = ParserContext.class.getResourceAsStream("datatypes.xsd")) { InputSource source = new InputSource(is); source.setSystemId("datatypes.xsd"); parse(source); SchemaImpl xs = (SchemaImpl) schemaSet.getSchema("http://www.w3.org/2001/XMLSchema"); xs.addSimpleType(schemaSet.anySimpleType,true); xs.addComplexType(schemaSet.anyType,true); } catch( SAXException | IOException e ) { // this must be a bug of XSOM throw new InternalError(e.getMessage()); } }
public void setParent(ElementDecl parent) { this.parent = parent; parent.getOwnerSchema().addIdentityConstraint(this); }
private void action1()throws SAXException { $runtime.currentSchema.addNotation(notation); }
private void action2()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getModelGroupDecl(group.getName()) ); $runtime.currentSchema.addModelGroupDecl(group,false); }
private void action0()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getAttGroupDecl(ag.getName()) ); $runtime.currentSchema.addAttGroupDecl(ag,false); }
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); } }
private void action3()throws SAXException { XSSimpleType oldSt = $runtime.currentSchema.getSimpleType(newSt.getName()); if(oldSt==null) { $runtime.reportError( Messages.format(Messages.ERR_UNDEFINED_SIMPLETYPE,newSt.getName()) ); } else { newSt.redefine((SimpleTypeImpl)oldSt); $runtime.currentSchema.addSimpleType(newSt,true); } }
private void action3()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getAttributeDecl(ad.getName()) ); $runtime.currentSchema.addAttributeDecl(ad); }
private void action6()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getType(st.getName()) ); $runtime.currentSchema.addSimpleType(st,false); }
private void action7()throws SAXException { $runtime.checkDoubleDefError( $runtime.currentSchema.getElementDecl(e.getName()) ); $runtime.currentSchema.addElementDecl(e); }