Package com.sun.msv.reader.datatype

Examples of com.sun.msv.reader.datatype.DataTypeVocabulary


        if(tag.localName.equals("include"))        return getStateFactory().includePattern(parent,tag);

        final String role = tag.getAttribute(TREXNamespace,"role");
        if("datatype".equals(role)) {
            String namespaceURI = mapNamespace(tag.namespaceURI);
            DataTypeVocabulary v = grammar.dataTypes.get(namespaceURI);
       
            if(v==null) {
                reportError( ERR_UNKNOWN_DATATYPE_VOCABULARY, tag.namespaceURI );
                // put a dummy vocabulary into the map
                // so that user will never receive the same error again.
                grammar.dataTypes.put( tag.namespaceURI, new UndefinedDataTypeVocabulary() );
                return new IgnoreState();    // recover by ignoring this element.
            }           
           
            return v.createTopLevelReaderState(tag);
        }
           
       
        return super.createExpressionChildState(parent,tag);
    }
View Full Code Here


            return StringType.theInstance;
        }
       
        s[0] = mapNamespace(s[0]);    // s[0] == namespace URI
       
        DataTypeVocabulary v = grammar.dataTypes.get(s[0]);
        if(v==null) {
            reportError( ERR_UNKNOWN_DATATYPE_VOCABULARY, s[0] );
            // put a dummy vocabulary into the map
            // so that user will never receive the same error again.
            grammar.dataTypes.put( s[0], new UndefinedDataTypeVocabulary() );
        } else {
            try {
                return v.getType( s[1] );    // s[1] == local name
            } catch( DatatypeException e ) {
                reportError( ERR_UNDEFINED_DATATYPE, qName );
            }
        }
        // recover by using a dummy DataType
View Full Code Here

        if(tag.localName.equals("include"))        return getStateFactory().includePattern(parent,tag);

        final String role = tag.getAttribute(TREXNamespace,"role");
        if("datatype".equals(role)) {
            String namespaceURI = mapNamespace(tag.namespaceURI);
            DataTypeVocabulary v = grammar.dataTypes.get(namespaceURI);
       
            if(v==null) {
                reportError( ERR_UNKNOWN_DATATYPE_VOCABULARY, tag.namespaceURI );
                // put a dummy vocabulary into the map
                // so that user will never receive the same error again.
                grammar.dataTypes.put( tag.namespaceURI, new UndefinedDataTypeVocabulary() );
                return new IgnoreState();    // recover by ignoring this element.
            }           
           
            return v.createTopLevelReaderState(tag);
        }
           
       
        return super.createExpressionChildState(parent,tag);
    }
View Full Code Here

            return StringType.theInstance;
        }
       
        s[0] = mapNamespace(s[0]);    // s[0] == namespace URI
       
        DataTypeVocabulary v = grammar.dataTypes.get(s[0]);
        if(v==null) {
            reportError( ERR_UNKNOWN_DATATYPE_VOCABULARY, s[0] );
            // put a dummy vocabulary into the map
            // so that user will never receive the same error again.
            grammar.dataTypes.put( s[0], new UndefinedDataTypeVocabulary() );
        } else {
            try {
                return v.getType( s[1] );    // s[1] == local name
            } catch( DatatypeException e ) {
                reportError( ERR_UNDEFINED_DATATYPE, qName );
            }
        }
        // recover by using a dummy DataType
View Full Code Here

TOP

Related Classes of com.sun.msv.reader.datatype.DataTypeVocabulary

Copyright © 2018 www.massapicom. 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.