Java Code Examples for com.sun.org.apache.xerces.internal.util.DOMUtil#getParent()
The following examples show how to use
com.sun.org.apache.xerces.internal.util.DOMUtil#getParent() .
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: XSDComplexTypeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 2
Source File: XSDComplexTypeTraverser.java From Bytecoder with Apache License 2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 3
Source File: XSDSimpleTypeTraverser.java From Bytecoder with Apache License 2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 4
Source File: XSDComplexTypeTraverser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 5
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 6
Source File: XSDComplexTypeTraverser.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 7
Source File: XSDSimpleTypeTraverser.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 8
Source File: XSDComplexTypeTraverser.java From JDKSourceCode1.8 with MIT License | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 9
Source File: XSDSimpleTypeTraverser.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 10
Source File: XSDSimpleTypeTraverser.java From JDKSourceCode1.8 with MIT License | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 11
Source File: XSDSimpleTypeTraverser.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 12
Source File: XSDSimpleTypeTraverser.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 13
Source File: XSDComplexTypeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 14
Source File: XSDSimpleTypeTraverser.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 15
Source File: XSDComplexTypeTraverser.java From hottub with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element complexTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(complexTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 16
Source File: XSDSimpleTypeTraverser.java From hottub with GNU General Public License v2.0 | 5 votes |
private String genAnonTypeName(Element simpleTypeDecl) { // Generate a unique name for the anonymous type by concatenating together the // names of parent nodes // The name is quite good for debugging/error purposes, but we may want to // revisit how this is done for performance reasons (LM). StringBuffer typeName = new StringBuffer("#AnonType_"); Element node = DOMUtil.getParent(simpleTypeDecl); while (node != null && (node != DOMUtil.getRoot(DOMUtil.getDocument(node)))) { typeName.append(node.getAttribute(SchemaSymbols.ATT_NAME)); node = DOMUtil.getParent(node); } return typeName.toString(); }
Example 17
Source File: XSDHandler.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
protected Object traverseGlobalDecl(int declType, Element decl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { Object retObj = null; DOMUtil.setHidden(decl, fHiddenNodes); SchemaNamespaceSupport nsSupport = null; // if the parent is <redefine> use the namespace delcs for it. Element parent = DOMUtil.getParent(decl); if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) nsSupport = (fRedefine2NSSupport!=null)?(SchemaNamespaceSupport)fRedefine2NSSupport.get(parent):null; // back up the current SchemaNamespaceSupport, because we need to provide // a fresh one to the traverseGlobal methods. schemaDoc.backupNSSupport(nsSupport); // traverse the referenced global component switch (declType) { case TYPEDECL_TYPE : if (DOMUtil.getLocalName(decl).equals(SchemaSymbols.ELT_COMPLEXTYPE)) { retObj = fComplexTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } else { retObj = fSimpleTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } break; case ATTRIBUTE_TYPE : retObj = fAttributeTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ELEMENT_TYPE : retObj = fElementTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ATTRIBUTEGROUP_TYPE : retObj = fAttributeGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case GROUP_TYPE : retObj = fGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case NOTATION_TYPE : retObj = fNotationTraverser.traverse(decl, schemaDoc, grammar); break; case IDENTITYCONSTRAINT_TYPE : // identity constraints should have been parsed already... // we should never get here break; } // restore the previous SchemaNamespaceSupport, so that the caller can get // proper namespace binding. schemaDoc.restoreNSSupport(); return retObj; }
Example 18
Source File: XSDHandler.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected Object traverseGlobalDecl(int declType, Element decl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { Object retObj = null; DOMUtil.setHidden(decl, fHiddenNodes); SchemaNamespaceSupport nsSupport = null; // if the parent is <redefine> use the namespace delcs for it. Element parent = DOMUtil.getParent(decl); if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) nsSupport = (fRedefine2NSSupport!=null)?(SchemaNamespaceSupport)fRedefine2NSSupport.get(parent):null; // back up the current SchemaNamespaceSupport, because we need to provide // a fresh one to the traverseGlobal methods. schemaDoc.backupNSSupport(nsSupport); // traverse the referenced global component switch (declType) { case TYPEDECL_TYPE : if (DOMUtil.getLocalName(decl).equals(SchemaSymbols.ELT_COMPLEXTYPE)) { retObj = fComplexTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } else { retObj = fSimpleTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } break; case ATTRIBUTE_TYPE : retObj = fAttributeTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ELEMENT_TYPE : retObj = fElementTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ATTRIBUTEGROUP_TYPE : retObj = fAttributeGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case GROUP_TYPE : retObj = fGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case NOTATION_TYPE : retObj = fNotationTraverser.traverse(decl, schemaDoc, grammar); break; case IDENTITYCONSTRAINT_TYPE : // identity constraints should have been parsed already... // we should never get here break; } // restore the previous SchemaNamespaceSupport, so that the caller can get // proper namespace binding. schemaDoc.restoreNSSupport(); return retObj; }
Example 19
Source File: XSDHandler.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected Object traverseGlobalDecl(int declType, Element decl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { Object retObj = null; DOMUtil.setHidden(decl, fHiddenNodes); SchemaNamespaceSupport nsSupport = null; // if the parent is <redefine> use the namespace delcs for it. Element parent = DOMUtil.getParent(decl); if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) nsSupport = (fRedefine2NSSupport!=null)?(SchemaNamespaceSupport)fRedefine2NSSupport.get(parent):null; // back up the current SchemaNamespaceSupport, because we need to provide // a fresh one to the traverseGlobal methods. schemaDoc.backupNSSupport(nsSupport); // traverse the referenced global component switch (declType) { case TYPEDECL_TYPE : if (DOMUtil.getLocalName(decl).equals(SchemaSymbols.ELT_COMPLEXTYPE)) { retObj = fComplexTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } else { retObj = fSimpleTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } break; case ATTRIBUTE_TYPE : retObj = fAttributeTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ELEMENT_TYPE : retObj = fElementTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ATTRIBUTEGROUP_TYPE : retObj = fAttributeGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case GROUP_TYPE : retObj = fGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case NOTATION_TYPE : retObj = fNotationTraverser.traverse(decl, schemaDoc, grammar); break; case IDENTITYCONSTRAINT_TYPE : // identity constraints should have been parsed already... // we should never get here break; } // restore the previous SchemaNamespaceSupport, so that the caller can get // proper namespace binding. schemaDoc.restoreNSSupport(); return retObj; }
Example 20
Source File: XSDHandler.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
protected Object traverseGlobalDecl(int declType, Element decl, XSDocumentInfo schemaDoc, SchemaGrammar grammar) { Object retObj = null; DOMUtil.setHidden(decl, fHiddenNodes); SchemaNamespaceSupport nsSupport = null; // if the parent is <redefine> use the namespace delcs for it. Element parent = DOMUtil.getParent(decl); if (DOMUtil.getLocalName(parent).equals(SchemaSymbols.ELT_REDEFINE)) nsSupport = (fRedefine2NSSupport!=null)?(SchemaNamespaceSupport)fRedefine2NSSupport.get(parent):null; // back up the current SchemaNamespaceSupport, because we need to provide // a fresh one to the traverseGlobal methods. schemaDoc.backupNSSupport(nsSupport); // traverse the referenced global component switch (declType) { case TYPEDECL_TYPE : if (DOMUtil.getLocalName(decl).equals(SchemaSymbols.ELT_COMPLEXTYPE)) { retObj = fComplexTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } else { retObj = fSimpleTypeTraverser.traverseGlobal(decl, schemaDoc, grammar); } break; case ATTRIBUTE_TYPE : retObj = fAttributeTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ELEMENT_TYPE : retObj = fElementTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case ATTRIBUTEGROUP_TYPE : retObj = fAttributeGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case GROUP_TYPE : retObj = fGroupTraverser.traverseGlobal(decl, schemaDoc, grammar); break; case NOTATION_TYPE : retObj = fNotationTraverser.traverse(decl, schemaDoc, grammar); break; case IDENTITYCONSTRAINT_TYPE : // identity constraints should have been parsed already... // we should never get here break; } // restore the previous SchemaNamespaceSupport, so that the caller can get // proper namespace binding. schemaDoc.restoreNSSupport(); return retObj; }