Java Code Examples for com.sun.org.apache.xerces.internal.impl.xs.SchemaSymbols#ELT_DOCUMENTATION
The following examples show how to use
com.sun.org.apache.xerces.internal.impl.xs.SchemaSymbols#ELT_DOCUMENTATION .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SchemaDOMParser.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 2
Source File: SchemaDOMParser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 3
Source File: SchemaDOMParser.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 4
Source File: SchemaDOMParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 5
Source File: SchemaDOMParser.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 6
Source File: SchemaDOMParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 7
Source File: SchemaDOMParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 8
Source File: SchemaDOMParser.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 9
Source File: SchemaDOMParser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 10
Source File: SchemaDOMParser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 11
Source File: SchemaDOMParser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * The end of an element. * * @param element The name of the element. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void endElement(QName element, Augmentations augs) throws XNIException { // when we reach the endElement of xs:appinfo or xs:documentation, // change fInnerAnnotationDepth to -1 if(fAnnotationDepth > -1) { if (fInnerAnnotationDepth == fDepth) { fInnerAnnotationDepth = -1; schemaDOM.endAnnotationElement(element); schemaDOM.endElement(); } else if (fAnnotationDepth == fDepth) { fAnnotationDepth = -1; schemaDOM.endAnnotation(element, fCurrentAnnotationElement); schemaDOM.endElement(); } else { // inside a child of annotation schemaDOM.endAnnotationElement(element); } } else { // not in an annotation at all if(element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && fGenerateSyntheticAnnotation) { boolean value = fHasNonSchemaAttributes.pop(); boolean sawann = fSawAnnotation.pop(); if (value && !sawann) { String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, fEmptyAttr, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, fEmptyAttr); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); } } schemaDOM.endElement(); } fDepth--; }
Example 12
Source File: SchemaDOMParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 13
Source File: SchemaDOMParser.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 14
Source File: SchemaDOMParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 15
Source File: SchemaDOMParser.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 16
Source File: SchemaDOMParser.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 17
Source File: SchemaDOMParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 18
Source File: SchemaDOMParser.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 19
Source File: SchemaDOMParser.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }
Example 20
Source File: SchemaDOMParser.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** * An empty element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown by handler to signal an error. */ public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (fGenerateSyntheticAnnotation && fAnnotationDepth == -1 && element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart != SchemaSymbols.ELT_ANNOTATION && hasNonSchemaAttributes(element, attributes)) { schemaDOM.startElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); attributes.removeAllAttributes(); String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA); final String annRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_ANNOTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_ANNOTATION); schemaDOM.startAnnotation(annRawName, attributes, fNamespaceContext); final String elemRawName = (schemaPrefix.length() == 0) ? SchemaSymbols.ELT_DOCUMENTATION : (schemaPrefix + ':' + SchemaSymbols.ELT_DOCUMENTATION); schemaDOM.startAnnotationElement(elemRawName, attributes); schemaDOM.charactersRaw("SYNTHETIC_ANNOTATION"); schemaDOM.endSyntheticAnnotationElement(elemRawName, false); schemaDOM.endSyntheticAnnotationElement(annRawName, true); schemaDOM.endElement(); return; } // the order of events that occurs here is: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.emptyElement (basically the same as startElement then endElement) // schemaDOM.endAnnotationElement (if applicable) // the order of events that would occur if this was <element></element>: // schemaDOM.startAnnotation/startAnnotationElement (if applicable) // schemaDOM.startElement // schemaDOM.endAnnotationElement (if applicable) // schemaDOM.endElementElement // Thus, we can see that the order of events isn't the same. However, it doesn't // seem to matter. -- PJM if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.startAnnotation(element, attributes, fNamespaceContext); } } else { schemaDOM.startAnnotationElement(element, attributes); } ElementImpl newElem = schemaDOM.emptyElement(element, attributes, fLocator.getLineNumber(), fLocator.getColumnNumber(), fLocator.getCharacterOffset()); if (fAnnotationDepth == -1) { // this is messed up, but a case to consider: if (element.uri == SchemaSymbols.URI_SCHEMAFORSCHEMA && element.localpart == SchemaSymbols.ELT_ANNOTATION) { schemaDOM.endAnnotation(element, newElem); } } else { schemaDOM.endAnnotationElement(element); } }