Package com.sun.msv.datatype.xsd

Examples of com.sun.msv.datatype.xsd.XSDatatype.convertToLexicalValue()


 
  public void onValue( ValueExp exp ) {
    String text;
    if( exp.dt instanceof XSDatatype ) {
      XSDatatype xsd = (XSDatatype)exp.dt;
      text = xsd.convertToLexicalValue(exp.value,getContext());
    } else {
      text = exp.value.toString();
      if(!exp.dt.sameValue( exp.value, exp.dt.createValue(text,getContext()) ) )
        throw new Error("unable to produce a value for the datatype:"+exp.name);
    }
View Full Code Here


                        values[i],DummyContextProvider.theInstance);
                   
                    try {
                        if(o!=null) {
                            // should be able to convert it back.
                            String s = typeObj.convertToLexicalValue(o,DummyContextProvider.theInstance);
                            // try round trip conversion.
                            Object o2 = typeObj.createValue(s,DummyContextProvider.theInstance);
                            if( o2==null || !o.equals(o2) )
                                roundTripError = true;
                        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.