< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDSimpleTypeTraverser.java
Print this page
*** 1,8 ****
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Oct 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
--- 1,8 ----
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
! * @LastModified: Nov 2017
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*** 294,304 ****
int size = memberTypes.size();
dTValidators = new ArrayList<>(size);
// for each qname in the list
for (int i = 0; i < size; i++) {
// get the type decl
! dv = findDTValidator(child, name, (QName)memberTypes.get(i),
XSConstants.DERIVATION_UNION, schemaDoc);
if (dv != null) {
// if it's a union, expand it
if (dv.getVariety() == XSSimpleType.VARIETY_UNION) {
dvs = dv.getMemberTypes();
--- 294,304 ----
int size = memberTypes.size();
dTValidators = new ArrayList<>(size);
// for each qname in the list
for (int i = 0; i < size; i++) {
// get the type decl
! dv = findDTValidator(child, name, memberTypes.get(i),
XSConstants.DERIVATION_UNION, schemaDoc);
if (dv != null) {
// if it's a union, expand it
if (dv.getVariety() == XSSimpleType.VARIETY_UNION) {
dvs = dv.getMemberTypes();
*** 387,397 ****
else if (list) {
newDecl = fSchemaHandler.fDVFactory.createTypeList(name, schemaDoc.fTargetNamespace, (short)finalProperty, baseValidator,
annotations == null? null : new XSObjectListImpl(annotations, annotations.length));
}
else if (union) {
! XSSimpleType[] memberDecls = (XSSimpleType[]) dTValidators.toArray(new XSSimpleType[dTValidators.size()]);
newDecl = fSchemaHandler.fDVFactory.createTypeUnion(name, schemaDoc.fTargetNamespace, (short)finalProperty, memberDecls,
annotations == null? null : new XSObjectListImpl(annotations, annotations.length));
}
// now traverse facets, if it's derived by restriction
if (restriction && content != null) {
--- 387,397 ----
else if (list) {
newDecl = fSchemaHandler.fDVFactory.createTypeList(name, schemaDoc.fTargetNamespace, (short)finalProperty, baseValidator,
annotations == null? null : new XSObjectListImpl(annotations, annotations.length));
}
else if (union) {
! XSSimpleType[] memberDecls = dTValidators.toArray(new XSSimpleType[dTValidators.size()]);
newDecl = fSchemaHandler.fDVFactory.createTypeUnion(name, schemaDoc.fTargetNamespace, (short)finalProperty, memberDecls,
annotations == null? null : new XSObjectListImpl(annotations, annotations.length));
}
// now traverse facets, if it's derived by restriction
if (restriction && content != null) {
< prev index next >