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 identityConstraint extends NGCCHandler { 46 private String name; 47 private UName ref; 48 private ForeignAttributesImpl fa; 49 private AnnotationImpl ann; 50 private XPathImpl field; 51 protected final NGCCRuntimeEx $runtime; 52 private int $_ngcc_current_state; 53 protected String $uri; 54 protected String $localName; 55 protected String $qname; 56 57 public final NGCCRuntime getRuntime() { 58 return($runtime); 59 } 60 61 public identityConstraint(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 454 $_ngcc_current_state = 8; 455 } 456 else { 457 unexpectedLeaveAttribute($__qname); 458 } 459 } 460 break; 461 default: 462 { 463 unexpectedLeaveAttribute($__qname); 464 } 465 break; 466 } 467 } 468 469 public void text(String $value) throws SAXException { 470 int $ai; 471 switch($_ngcc_current_state) { 472 case 15: 473 { 474 name = $value; 475 $_ngcc_current_state = 14; 476 } 477 break; 478 case 16: 479 { 480 if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 481 $runtime.consumeAttribute($ai); 482 $runtime.sendText(super._cookie, $value); 483 } 484 } 485 break; 486 case 0: 487 { 488 revertToParentFromText(makeResult(), super._cookie, $value); 489 } 490 break; 491 case 12: 492 { 493 NGCCHandler h = new qname(this, super._source, $runtime, 280); 494 spawnChildFromText(h, $value); 495 } 496 break; 497 case 17: 498 { 499 if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 500 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null); 501 spawnChildFromText(h, $value); 502 } 503 } 504 break; 505 case 3: 506 { 507 if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) { 508 NGCCHandler h = new xpath(this, super._source, $runtime, 270); 509 spawnChildFromText(h, $value); 510 } 511 } 512 break; 513 case 8: 514 { | 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 com.sun.xml.internal.bind.WhiteSpaceProcessor; 30 import com.sun.xml.internal.xsom.*; 31 import com.sun.xml.internal.xsom.impl.*; 32 import com.sun.xml.internal.xsom.impl.parser.*; 33 import com.sun.xml.internal.xsom.parser.*; 34 35 import java.util.*; 36 import org.xml.sax.Attributes; 37 import org.xml.sax.SAXException; 38 39 40 41 class identityConstraint extends NGCCHandler { 42 private String name; 43 private UName ref; 44 private ForeignAttributesImpl fa; 45 private AnnotationImpl ann; 46 private XPathImpl field; 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 identityConstraint(NGCCHandler parent, NGCCEventSource source, NGCCRuntimeEx runtime, int cookie) { 450 $_ngcc_current_state = 8; 451 } 452 else { 453 unexpectedLeaveAttribute($__qname); 454 } 455 } 456 break; 457 default: 458 { 459 unexpectedLeaveAttribute($__qname); 460 } 461 break; 462 } 463 } 464 465 public void text(String $value) throws SAXException { 466 int $ai; 467 switch($_ngcc_current_state) { 468 case 15: 469 { 470 // <xs:keyref> or <xs:key> or <xs:unique> with attribute 'name' = $value 471 name = WhiteSpaceProcessor.collapse($value); 472 $_ngcc_current_state = 14; 473 } 474 break; 475 case 16: 476 { 477 if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 478 $runtime.consumeAttribute($ai); 479 $runtime.sendText(super._cookie, $value); 480 } 481 } 482 break; 483 case 0: 484 { 485 revertToParentFromText(makeResult(), super._cookie, $value); 486 } 487 break; 488 case 12: 489 { 490 // <xs:keyref> with attribute 'refer' = $value 491 NGCCHandler h = new qname(this, super._source, $runtime, 280); 492 spawnChildFromText(h, WhiteSpaceProcessor.collapse($value)); 493 } 494 break; 495 case 17: 496 { 497 if(($ai = $runtime.getAttributeIndex("","name"))>=0) { 498 NGCCHandler h = new foreignAttributes(this, super._source, $runtime, 287, null); 499 spawnChildFromText(h, $value); 500 } 501 } 502 break; 503 case 3: 504 { 505 if(($ai = $runtime.getAttributeIndex("","xpath"))>=0) { 506 NGCCHandler h = new xpath(this, super._source, $runtime, 270); 507 spawnChildFromText(h, $value); 508 } 509 } 510 break; 511 case 8: 512 { |