src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/SAXConnector.java

changeset 707
31893650acaf
parent 650
121e938cb9c3
child 760
e530533619ec
equal deleted inserted replaced
706:1e9d08d74c48 707:31893650acaf
1 /* 1 /*
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
142 if( local==null || local.length()==0 ) 142 if( local==null || local.length()==0 )
143 local=qname; 143 local=qname;
144 if( qname==null || qname.length()==0 ) 144 if( qname==null || qname.length()==0 )
145 qname=local; 145 qname=local;
146 146
147 147 processText(!context.getCurrentState().isMixed());
148 boolean ignorable = true;
149 StructureLoader sl;
150
151 // not null only if element content is processed (StructureLoader is used)
152 // ugly
153 if((sl = this.context.getStructureLoader()) != null) {
154 ignorable = ((ClassBeanInfoImpl)sl.getBeanInfo()).hasElementOnlyContentModel();
155 }
156
157 processText(ignorable);
158 148
159 tagName.uri = uri; 149 tagName.uri = uri;
160 tagName.local = local; 150 tagName.local = local;
161 tagName.qname = qname; 151 tagName.qname = qname;
162 tagName.atts = atts; 152 tagName.atts = atts;
202 public void skippedEntity(String name) { 192 public void skippedEntity(String name) {
203 // nop 193 // nop
204 } 194 }
205 195
206 private void processText( boolean ignorable ) throws SAXException { 196 private void processText( boolean ignorable ) throws SAXException {
207 if( predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) 197 if (predictor.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer)))
208 next.text(buffer); 198 next.text(buffer);
209 buffer.setLength(0); 199 buffer.setLength(0);
210 } 200 }
211 201
212 } 202 }

mercurial