< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDElementTraverser.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Oct 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  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.traversers;
  23 


  53  *   default = string
  54  *   final = (#all | List of (extension | restriction))
  55  *   fixed = string
  56  *   form = (qualified | unqualified)
  57  *   id = ID
  58  *   maxOccurs = (nonNegativeInteger | unbounded)  : 1
  59  *   minOccurs = nonNegativeInteger : 1
  60  *   name = NCName
  61  *   nillable = boolean : false
  62  *   ref = QName
  63  *   substitutionGroup = QName
  64  *   type = QName
  65  *   {any attributes with non-schema namespace . . .}>
  66  *   Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*))
  67  * </element>
  68  *
  69  * @xerces.internal
  70  *
  71  * @author Sandy Gao, IBM
  72  *

  73  */
  74 class XSDElementTraverser extends XSDAbstractTraverser {
  75 
  76     protected final XSElementDecl  fTempElementDecl  = new XSElementDecl();
  77 
  78     // this controls what happens when a local element is encountered.
  79     // We may not encounter all local elements when first parsing.
  80     boolean fDeferTraversingLocalElements;
  81 
  82     XSDElementTraverser (XSDHandler handler,
  83             XSAttributeChecker gAttrCheck) {
  84         super(handler, gAttrCheck);
  85     }
  86 
  87     /**
  88      * Traverse a locally declared element (or an element reference).
  89      *
  90      * To handle the recursive cases efficiently, we delay the traversal
  91      * and return an empty particle node. We'll fill in this particle node
  92      * later after we've done with all the global declarations.


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.xs.traversers;
  22 


  52  *   default = string
  53  *   final = (#all | List of (extension | restriction))
  54  *   fixed = string
  55  *   form = (qualified | unqualified)
  56  *   id = ID
  57  *   maxOccurs = (nonNegativeInteger | unbounded)  : 1
  58  *   minOccurs = nonNegativeInteger : 1
  59  *   name = NCName
  60  *   nillable = boolean : false
  61  *   ref = QName
  62  *   substitutionGroup = QName
  63  *   type = QName
  64  *   {any attributes with non-schema namespace . . .}>
  65  *   Content: (annotation?, ((simpleType | complexType)?, (unique | key | keyref)*))
  66  * </element>
  67  *
  68  * @xerces.internal
  69  *
  70  * @author Sandy Gao, IBM
  71  *
  72  * @LastModified: Oct 2017
  73  */
  74 class XSDElementTraverser extends XSDAbstractTraverser {
  75 
  76     protected final XSElementDecl  fTempElementDecl  = new XSElementDecl();
  77 
  78     // this controls what happens when a local element is encountered.
  79     // We may not encounter all local elements when first parsing.
  80     boolean fDeferTraversingLocalElements;
  81 
  82     XSDElementTraverser (XSDHandler handler,
  83             XSAttributeChecker gAttrCheck) {
  84         super(handler, gAttrCheck);
  85     }
  86 
  87     /**
  88      * Traverse a locally declared element (or an element reference).
  89      *
  90      * To handle the recursive cases efficiently, we delay the traversal
  91      * and return an empty particle node. We'll fill in this particle node
  92      * later after we've done with all the global declarations.


< prev index next >