KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > impl > dv > dtd > StringDatatypeValidator


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.impl.dv.dtd;
18
19 import org.apache.xerces.impl.dv.*;
20
21 /**
22  * <P>StringValidator validates that XML content is a W3C string type.</P>
23  * <P>The string datatype represents character strings in XML. The
24  * value space of string is the set of finite-length sequences
25  * of characters (as defined in [XML 1.0 Recommendation
26  * (Second Edition)]) that match the Char production
27  * from [XML 1.0 Recommendation (Second Edition)].
28  * A character is an atomic unit of communication; it
29  * is not further specified except to note that every
30  * character has a corresponding Universal Code Set
31  * code point ([ISO 10646],[Unicode] and [Unicode3]),
32  * which is an integer.</P>
33  *
34  * @xerces.internal
35  *
36  * @version $Id: StringDatatypeValidator.java,v 1.6 2004/10/06 14:56:51 mrglavas Exp $
37  */

38 public class StringDatatypeValidator implements DatatypeValidator {
39
40     // construct a string datatype validator
41
public StringDatatypeValidator() {
42     }
43
44     /**
45      * Checks that "content" string is valid string value.
46      * If invalid a Datatype validation exception is thrown.
47      *
48      * @param content the string value that needs to be validated
49      * @param context the validation context
50      * @throws InvalidDatatypeException if the content is
51      * invalid according to the rules for the validators
52      * @see InvalidDatatypeValueException
53      */

54     public void validate(String JavaDoc content, ValidationContext context) throws InvalidDatatypeValueException {
55     }
56     
57 }
58
Popular Tags