author | joehw |
Mon, 13 Oct 2014 14:09:03 -0700 | |
changeset 27111 | 7a491d709b83 |
parent 25868 | 686eef1e7a79 |
child 45853 | bfa06be36a17 |
permissions | -rw-r--r-- |
6 | 1 |
/* |
2 |
* reserved comment block |
|
3 |
* DO NOT REMOVE OR ALTER! |
|
4 |
*/ |
|
5 |
/* |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
6 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
7 |
* contributor license agreements. See the NOTICE file distributed with |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
8 |
* this work for additional information regarding copyright ownership. |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
9 |
* The ASF licenses this file to You under the Apache License, Version 2.0 |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
10 |
* (the "License"); you may not use this file except in compliance with |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
11 |
* the License. You may obtain a copy of the License at |
6 | 12 |
* |
13 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
14 |
* |
|
15 |
* Unless required by applicable law or agreed to in writing, software |
|
16 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
17 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
18 |
* See the License for the specific language governing permissions and |
|
19 |
* limitations under the License. |
|
20 |
*/ |
|
21 |
||
22 |
package com.sun.org.apache.xerces.internal.impl.xs; |
|
23 |
||
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
24 |
import com.sun.org.apache.xerces.internal.impl.dv.ValidatedInfo; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
25 |
import com.sun.org.apache.xerces.internal.impl.xs.util.StringListImpl; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
26 |
import com.sun.org.apache.xerces.internal.xs.AttributePSVI; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
27 |
import com.sun.org.apache.xerces.internal.xs.ItemPSVI; |
6 | 28 |
import com.sun.org.apache.xerces.internal.xs.ShortList; |
29 |
import com.sun.org.apache.xerces.internal.xs.StringList; |
|
30 |
import com.sun.org.apache.xerces.internal.xs.XSAttributeDeclaration; |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
31 |
import com.sun.org.apache.xerces.internal.xs.XSConstants; |
6 | 32 |
import com.sun.org.apache.xerces.internal.xs.XSSimpleTypeDefinition; |
33 |
import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition; |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
34 |
import com.sun.org.apache.xerces.internal.xs.XSValue; |
6 | 35 |
|
36 |
/** |
|
37 |
* Attribute PSV infoset augmentations implementation. |
|
38 |
* The PSVI information for attributes will be available at the startElement call. |
|
39 |
* |
|
40 |
* @xerces.internal |
|
41 |
* |
|
42 |
* @author Elena Litani IBM |
|
43 |
*/ |
|
44 |
public class AttributePSVImpl implements AttributePSVI { |
|
45 |
||
46 |
/** attribute declaration */ |
|
47 |
protected XSAttributeDeclaration fDeclaration = null; |
|
48 |
||
49 |
/** type of attribute, simpleType */ |
|
50 |
protected XSTypeDefinition fTypeDecl = null; |
|
51 |
||
52 |
/** If this attribute was explicitly given a |
|
53 |
* value in the original document, this is false; otherwise, it is true */ |
|
54 |
protected boolean fSpecified = false; |
|
55 |
||
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
56 |
/** Schema value */ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
57 |
protected ValidatedInfo fValue = new ValidatedInfo(); |
6 | 58 |
|
59 |
/** validation attempted: none, partial, full */ |
|
60 |
protected short fValidationAttempted = AttributePSVI.VALIDATION_NONE; |
|
61 |
||
62 |
/** validity: valid, invalid, unknown */ |
|
63 |
protected short fValidity = AttributePSVI.VALIDITY_NOTKNOWN; |
|
64 |
||
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
65 |
/** error codes and error messages */ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
66 |
protected String[] fErrors = null; |
6 | 67 |
|
68 |
/** validation context: could be QName or XPath expression*/ |
|
69 |
protected String fValidationContext = null; |
|
70 |
||
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
71 |
/** true if this object is immutable **/ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
72 |
protected boolean fIsConstant; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
73 |
|
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
74 |
public AttributePSVImpl() {} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
75 |
|
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
76 |
public AttributePSVImpl(boolean isConstant, AttributePSVI attrPSVI) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
77 |
fDeclaration = attrPSVI.getAttributeDeclaration(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
78 |
fTypeDecl = attrPSVI.getTypeDefinition(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
79 |
fSpecified = attrPSVI.getIsSchemaSpecified(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
80 |
fValue.copyFrom(attrPSVI.getSchemaValue()); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
81 |
fValidationAttempted = attrPSVI.getValidationAttempted(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
82 |
fValidity = attrPSVI.getValidity(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
83 |
if (attrPSVI instanceof AttributePSVImpl) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
84 |
final AttributePSVImpl attrPSVIImpl = (AttributePSVImpl) attrPSVI; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
85 |
fErrors = (attrPSVIImpl.fErrors != null) ? |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
86 |
(String[]) attrPSVIImpl.fErrors.clone() : null; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
87 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
88 |
else { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
89 |
final StringList errorCodes = attrPSVI.getErrorCodes(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
90 |
final int length = errorCodes.getLength(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
91 |
if (length > 0) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
92 |
final StringList errorMessages = attrPSVI.getErrorMessages(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
93 |
final String[] errors = new String[length << 1]; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
94 |
for (int i = 0, j = 0; i < length; ++i) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
95 |
errors[j++] = errorCodes.item(i); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
96 |
errors[j++] = errorMessages.item(i); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
97 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
98 |
fErrors = errors; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
99 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
100 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
101 |
fValidationContext = attrPSVI.getValidationContext(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
102 |
fIsConstant = isConstant; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
103 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
104 |
|
6 | 105 |
// |
106 |
// AttributePSVI methods |
|
107 |
// |
|
108 |
||
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
109 |
/* (non-Javadoc) |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
110 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#constant() |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
111 |
*/ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
112 |
public ItemPSVI constant() { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
113 |
if (isConstant()) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
114 |
return this; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
115 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
116 |
return new AttributePSVImpl(true, this); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
117 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
118 |
|
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
119 |
/* (non-Javadoc) |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
120 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#isConstant() |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
121 |
*/ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
122 |
public boolean isConstant() { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
123 |
return fIsConstant; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
124 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
125 |
|
6 | 126 |
/** |
127 |
* [schema default] |
|
128 |
* |
|
129 |
* @return The canonical lexical representation of the declaration's {value constraint} value. |
|
130 |
* @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_default>XML Schema Part 1: Structures [schema default]</a> |
|
131 |
*/ |
|
132 |
public String getSchemaDefault() { |
|
133 |
return fDeclaration == null ? null : fDeclaration.getConstraintValue(); |
|
134 |
} |
|
135 |
||
136 |
/** |
|
137 |
* [schema normalized value] |
|
138 |
* |
|
139 |
* |
|
140 |
* @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_normalized_value>XML Schema Part 1: Structures [schema normalized value]</a> |
|
141 |
* @return the normalized value of this item after validation |
|
142 |
*/ |
|
143 |
public String getSchemaNormalizedValue() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
144 |
return fValue.getNormalizedValue(); |
6 | 145 |
} |
146 |
||
147 |
/** |
|
148 |
* [schema specified] |
|
149 |
* @see <a href="http://www.w3.org/TR/xmlschema-1/#e-schema_specified">XML Schema Part 1: Structures [schema specified]</a> |
|
150 |
* @return true - value was specified in schema, false - value comes from the infoset |
|
151 |
*/ |
|
152 |
public boolean getIsSchemaSpecified() { |
|
153 |
return fSpecified; |
|
154 |
} |
|
155 |
||
156 |
||
157 |
/** |
|
158 |
* Determines the extent to which the document has been validated |
|
159 |
* |
|
160 |
* @return return the [validation attempted] property. The possible values are |
|
161 |
* NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION |
|
162 |
*/ |
|
163 |
public short getValidationAttempted() { |
|
164 |
return fValidationAttempted; |
|
165 |
} |
|
166 |
||
167 |
/** |
|
168 |
* Determine the validity of the node with respect |
|
169 |
* to the validation being attempted |
|
170 |
* |
|
171 |
* @return return the [validity] property. Possible values are: |
|
172 |
* UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY |
|
173 |
*/ |
|
174 |
public short getValidity() { |
|
175 |
return fValidity; |
|
176 |
} |
|
177 |
||
178 |
/** |
|
179 |
* A list of error codes generated from validation attempts. |
|
180 |
* Need to find all the possible subclause reports that need reporting |
|
181 |
* |
|
182 |
* @return list of error codes |
|
183 |
*/ |
|
184 |
public StringList getErrorCodes() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
185 |
if (fErrors == null || fErrors.length == 0) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
186 |
return StringListImpl.EMPTY_LIST; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
187 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
188 |
return new PSVIErrorList(fErrors, true); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
189 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
190 |
|
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
191 |
/** |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
192 |
* A list of error messages generated from the validation attempt or |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
193 |
* an empty <code>StringList</code> if no errors occurred during the |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
194 |
* validation attempt. The indices of error messages in this list are |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
195 |
* aligned with those in the <code>[schema error code]</code> list. |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
196 |
*/ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
197 |
public StringList getErrorMessages() { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
198 |
if (fErrors == null || fErrors.length == 0) { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
199 |
return StringListImpl.EMPTY_LIST; |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
200 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
201 |
return new PSVIErrorList(fErrors, false); |
6 | 202 |
} |
203 |
||
204 |
// This is the only information we can provide in a pipeline. |
|
205 |
public String getValidationContext() { |
|
206 |
return fValidationContext; |
|
207 |
} |
|
208 |
||
209 |
/** |
|
210 |
* An item isomorphic to the type definition used to validate this element. |
|
211 |
* |
|
212 |
* @return a type declaration |
|
213 |
*/ |
|
214 |
public XSTypeDefinition getTypeDefinition() { |
|
215 |
return fTypeDecl; |
|
216 |
} |
|
217 |
||
218 |
/** |
|
219 |
* If and only if that type definition is a simple type definition |
|
220 |
* with {variety} union, or a complex type definition whose {content type} |
|
221 |
* is a simple thype definition with {variety} union, then an item isomorphic |
|
222 |
* to that member of the union's {member type definitions} which actually |
|
223 |
* validated the element item's normalized value. |
|
224 |
* |
|
225 |
* @return a simple type declaration |
|
226 |
*/ |
|
227 |
public XSSimpleTypeDefinition getMemberTypeDefinition() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
228 |
return fValue.getMemberTypeDefinition(); |
6 | 229 |
} |
230 |
||
231 |
/** |
|
232 |
* An item isomorphic to the attribute declaration used to validate |
|
233 |
* this attribute. |
|
234 |
* |
|
235 |
* @return an attribute declaration |
|
236 |
*/ |
|
237 |
public XSAttributeDeclaration getAttributeDeclaration() { |
|
238 |
return fDeclaration; |
|
239 |
} |
|
240 |
||
241 |
/* (non-Javadoc) |
|
242 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValue() |
|
243 |
*/ |
|
244 |
public Object getActualNormalizedValue() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
245 |
return fValue.getActualValue(); |
6 | 246 |
} |
247 |
||
248 |
/* (non-Javadoc) |
|
249 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getActualNormalizedValueType() |
|
250 |
*/ |
|
251 |
public short getActualNormalizedValueType() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
252 |
return fValue.getActualValueType(); |
6 | 253 |
} |
254 |
||
255 |
/* (non-Javadoc) |
|
256 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getItemValueTypes() |
|
257 |
*/ |
|
258 |
public ShortList getItemValueTypes() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
259 |
return fValue.getListValueTypes(); |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
260 |
} |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
261 |
|
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
262 |
/* (non-Javadoc) |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
263 |
* @see com.sun.org.apache.xerces.internal.xs.ItemPSVI#getSchemaValue() |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
264 |
*/ |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
265 |
public XSValue getSchemaValue() { |
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
266 |
return fValue; |
6 | 267 |
} |
268 |
||
269 |
/** |
|
270 |
* Reset() |
|
271 |
*/ |
|
272 |
public void reset() { |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
273 |
fValue.reset(); |
6 | 274 |
fDeclaration = null; |
275 |
fTypeDecl = null; |
|
276 |
fSpecified = false; |
|
277 |
fValidationAttempted = AttributePSVI.VALIDATION_NONE; |
|
278 |
fValidity = AttributePSVI.VALIDITY_NOTKNOWN; |
|
27111
7a491d709b83
8036951: Xerces Update: XMLSchemaValidator.java and XMLSchemaLoader.java
joehw
parents:
25868
diff
changeset
|
279 |
fErrors = null; |
6 | 280 |
fValidationContext = null; |
281 |
} |
|
282 |
} |