< prev index next >

src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/parser/state/qname.java

Print this page


   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /* this file is generated by RelaxNGCC */
  27 package com.sun.xml.internal.xsom.impl.parser.state;

  28 import org.xml.sax.SAXException;
  29 import org.xml.sax.XMLReader;
  30 import org.xml.sax.Attributes;
  31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
  32 
  33     import com.sun.xml.internal.xsom.*;
  34     import com.sun.xml.internal.xsom.parser.*;
  35     import com.sun.xml.internal.xsom.impl.*;
  36     import com.sun.xml.internal.xsom.impl.parser.*;
  37     import org.xml.sax.Locator;
  38     import org.xml.sax.ContentHandler;
  39     import org.xml.sax.helpers.*;
  40     import java.util.*;
  41     import java.math.BigInteger;
  42 
  43 
  44 
  45 class qname extends NGCCHandler {
  46     private String qvalue;
  47     protected final NGCCRuntimeEx $runtime;
  48     private int $_ngcc_current_state;
  49     protected String $uri;
  50     protected String $localName;
  51     protected String $qname;
  52 
  53     public final NGCCRuntime getRuntime() {
  54         return($runtime);
  55     }
  56 
  57     public qname(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
  58         super(source, parent, cookie);
  59         $runtime = runtime;
  60         $_ngcc_current_state = 1;
  61     }
  62 
  63     public qname(NGCCRuntimeEx runtime) {
  64         this(null, runtime, runtime, -1);


 133             }
 134             break;
 135         default:
 136             {
 137                 unexpectedLeaveAttribute($__qname);
 138             }
 139             break;
 140         }
 141     }
 142 
 143     public void text(String $value) throws SAXException {
 144         int $ai;
 145         switch($_ngcc_current_state) {
 146         case 0:
 147             {
 148                 revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
 149             }
 150             break;
 151         case 1:
 152             {
 153                 qvalue = $value;
 154                 $_ngcc_current_state = 0;
 155             }
 156             break;
 157         }
 158     }
 159 
 160     public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
 161         switch($__cookie__) {
 162         }
 163     }
 164 
 165     public boolean accepted() {
 166         return(($_ngcc_current_state == 0));
 167     }
 168 
 169 
 170 }
   1 /*
   2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 /* this file is generated by RelaxNGCC */
  27 package com.sun.xml.internal.xsom.impl.parser.state;
  28 
  29 import org.xml.sax.SAXException;

  30 import org.xml.sax.Attributes;
  31 import com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx;
  32 












  33 class qname extends NGCCHandler {
  34     private String qvalue;
  35     protected final NGCCRuntimeEx $runtime;
  36     private int $_ngcc_current_state;
  37     protected String $uri;
  38     protected String $localName;
  39     protected String $qname;
  40 
  41     public final NGCCRuntime getRuntime() {
  42         return($runtime);
  43     }
  44 
  45     public qname(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) {
  46         super(source, parent, cookie);
  47         $runtime = runtime;
  48         $_ngcc_current_state = 1;
  49     }
  50 
  51     public qname(NGCCRuntimeEx runtime) {
  52         this(null, runtime, runtime, -1);


 121             }
 122             break;
 123         default:
 124             {
 125                 unexpectedLeaveAttribute($__qname);
 126             }
 127             break;
 128         }
 129     }
 130 
 131     public void text(String $value) throws SAXException {
 132         int $ai;
 133         switch($_ngcc_current_state) {
 134         case 0:
 135             {
 136                 revertToParentFromText($runtime.parseUName(qvalue), super._cookie, $value);
 137             }
 138             break;
 139         case 1:
 140             {
 141                 qvalue = $runtime.collapse($value);
 142                 $_ngcc_current_state = 0;
 143             }
 144             break;
 145         }
 146     }
 147 
 148     public void onChildCompleted(Object $__result__, int $__cookie__, boolean $__needAttCheck__)throws SAXException {
 149         switch($__cookie__) {
 150         }
 151     }
 152 
 153     public boolean accepted() {
 154         return(($_ngcc_current_state == 0));
 155     }
 156 
 157 
 158 }
< prev index next >