return incubator.derive("", newTypeName); } catch (DatatypeException e) { onSchemaError("Invalid restriction: " + e.getMessage()
/** @deprecated */ public XSDatatypeImpl derive(String newName) throws DatatypeException { return derive("", newName); }
/** @deprecated */ public XSDatatypeImpl derive(String newName) throws DatatypeException { return derive("", newName); }
public Datatype createDatatype() throws DatatypeException { return incubator.derive(null,null); } }
public Datatype createDatatype() throws DatatypeException { return incubator.derive(null,null); } }
public Datatype createDatatype() throws DatatypeException { return incubator.derive(null,null); } }
public Datatype createDatatype() throws DatatypeException { return incubator.derive(null,null); } }
/** @deprecated */ public XSDatatypeImpl derive(String newName) throws DatatypeException { return derive("", newName); }
/** @deprecated */ public XSDatatypeImpl derive(String newName) throws DatatypeException { return derive("", newName); }
public XSDatatypeExp derive(String uri,String localName) throws DatatypeException { return new XSDatatypeExp( core.derive(uri,localName), pool ); } };
public XSDatatypeExp derive(String uri,String localName) throws DatatypeException { return new XSDatatypeExp( core.derive(uri,localName), pool ); } };
public XSDatatypeExp derive(String uri,String localName) throws DatatypeException { return new XSDatatypeExp( core.derive(uri,localName), pool ); } };
public XSDatatype render( XSDatatypeExp.RenderingContext context ) throws DatatypeException { TypeIncubator ti = new TypeIncubator( baseType.getType(context) ); Iterator itr = facets.iterator(); for( int i=0; i<facetSize; i++ ) { Facet f = (Facet)itr.next(); ti.addFacet( f.name, f.value, f.fixed, f.context ); } return ti.derive(nsUri,localName); } });
public XSDatatype render( XSDatatypeExp.RenderingContext context ) throws DatatypeException { TypeIncubator ti = new TypeIncubator( baseType.getType(context) ); Iterator itr = facets.iterator(); for( int i=0; i<facetSize; i++ ) { Facet f = (Facet)itr.next(); ti.addFacet( f.name, f.value, f.fixed, f.context ); } return ti.derive(nsUri,localName); } });
public XSDatatype render( XSDatatypeExp.RenderingContext context ) throws DatatypeException { TypeIncubator ti = new TypeIncubator( baseType.getType(context) ); Iterator<Facet> itr = facets.iterator(); for( int i=0; i<facetSize; i++ ) { Facet f = itr.next(); ti.addFacet( f.name, f.value, f.fixed, f.context ); } return ti.derive(nsUri,localName); } });
public XSDatatype render( XSDatatypeExp.RenderingContext context ) throws DatatypeException { TypeIncubator ti = new TypeIncubator( baseType.getType(context) ); Iterator itr = facets.iterator(); for( int i=0; i<facetSize; i++ ) { Facet f = (Facet)itr.next(); ti.addFacet( f.name, f.value, f.fixed, f.context ); } return ti.derive(nsUri,localName); } });
public void addParameter( String name, String value, ValidationContext context ) throws DatatypeException { if( name.equals(XSDatatype.FACET_ENUMERATION) ) // the enumeration facet is not allowed for RELAX NG. throw new DatatypeException( XSDatatypeImpl.localize(XSDatatypeImpl.ERR_NOT_APPLICABLE_FACET, name) ); incubator.addFacet( name, value, false, context ); if( name.equals(XSDatatype.FACET_PATTERN) ) // if the pattern facet is specified, we have to // derive a new type so that multiple pattern facets can // work as ANDing. incubator = new TypeIncubator(incubator.derive(null,null)); }
public void addParameter( String name, String value, ValidationContext context ) throws DatatypeException { if( name.equals(XSDatatype.FACET_ENUMERATION) ) // the enumeration facet is not allowed for RELAX NG. throw new DatatypeException( XSDatatypeImpl.localize(XSDatatypeImpl.ERR_NOT_APPLICABLE_FACET, name) ); incubator.addFacet( name, value, false, context ); if( name.equals(XSDatatype.FACET_PATTERN) ) // if the pattern facet is specified, we have to // derive a new type so that multiple pattern facets can // work as ANDing. incubator = new TypeIncubator(incubator.derive(null,null)); }
public void addParameter( String name, String value, ValidationContext context ) throws DatatypeException { if( name.equals(XSDatatype.FACET_ENUMERATION) ) // the enumeration facet is not allowed for RELAX NG. throw new DatatypeException( XSDatatypeImpl.localize(XSDatatypeImpl.ERR_NOT_APPLICABLE_FACET, name) ); incubator.addFacet( name, value, false, context ); if( name.equals(XSDatatype.FACET_PATTERN) ) // if the pattern facet is specified, we have to // derive a new type so that multiple pattern facets can // work as ANDing. incubator = new TypeIncubator(incubator.derive(null,null)); }
public void testSingletonness2() throws Exception { // built-in types use their names to keep singleton-ness. // make sure that it won't be deceived by datatypes // whose name is accidentally the same as the built-in type. TypeIncubator ti = new TypeIncubator(StringType.theInstance); ti.addFacet("maxLength","120",false,null); XSDatatype pseudoString = ti.derive("","string"); assertTrue( freezeDry(pseudoString)!=StringType.theInstance ); } }