com.sun.org.apache.xerces.internal.dom.PSVIElementNSImpl Java Examples
The following examples show how to use
com.sun.org.apache.xerces.internal.dom.PSVIElementNSImpl.
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: RootTypeDefinitionTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void testSettingTypeAndInvalidXSIType() { try { reset(); ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE, "Z"); fValidator.setProperty(ROOT_TYPE, typeX); validateDocument(); } catch (Exception e) { fail("Validation failed: " + e.getMessage()); } assertError(INVALID_DERIVATION_ERROR); assertValidity(ItemPSVI.VALIDITY_INVALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("Z", fRootNode.getTypeDefinition().getName()); }
Example #2
Source File: FixedAttrTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void testDefault() { try { reset(); validateDocument(); } catch (Exception e) { fail("Validation failed: " + e.getMessage()); } assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementName("A", fRootNode.getElementDeclaration().getName()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("B", child.getElementDeclaration().getName()); child = super.getChild(2); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("D", child.getElementDeclaration().getName()); }
Example #3
Source File: IgnoreXSITypeTest_C_CA.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkTrueResult() { assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_PARTIAL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertAnyType(fRootNode.getTypeDefinition()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child .getValidationAttempted()); assertElementNull(child.getElementDeclaration()); assertAnyType(child.getTypeDefinition()); child = super.getChild(2); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("A", child.getElementDeclaration().getName()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); }
Example #4
Source File: DOMResultAugmentor.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #5
Source File: IgnoreXSITypeTest_C_AC.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkTrueResult() { assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_PARTIAL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertAnyType(fRootNode.getTypeDefinition()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("A", child.getElementDeclaration().getName()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); child = super.getChild(2); assertValidity(ItemPSVI.VALIDITY_NOTKNOWN, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_NONE, child .getValidationAttempted()); assertElementNull(child.getElementDeclaration()); assertAnyType(child.getTypeDefinition()); }
Example #6
Source File: IgnoreXSITypeTest_C_AC.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkFalseResult() { assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("A", child.getElementDeclaration().getName()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); child = super.getChild(2); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementNull(child.getElementDeclaration()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); }
Example #7
Source File: IgnoreXSITypeTest_A_A.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkResult() { assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementName("A", fRootNode.getElementDeclaration().getName()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("A", child.getElementDeclaration().getName()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); }
Example #8
Source File: RootTypeDefinitionTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void testSettingToDerivedType() { try { reset(); // this is required to make it a valid type Y node ((PSVIElementNSImpl) fRootNode).setAttributeNS(null, "attr", "typeY"); fValidator.setProperty(ROOT_TYPE, typeY); validateDocument(); } catch (Exception e) { fail("Validation failed: " + e.getMessage()); } assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); }
Example #9
Source File: RootTypeDefinitionTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void testSettingToOtherSchemaType() { try { reset(); ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_SCHEMALOCATION, "xslt.unittests otherNamespace.xsd"); fValidator.setProperty(ROOT_TYPE, typeOtherNamespace); validateDocument(); } catch (Exception e) { fail("Validation failed: " + e.getMessage()); } assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("W", fRootNode.getTypeDefinition().getName()); assertTypeNamespace("xslt.unittests", fRootNode.getTypeDefinition() .getNamespace()); }
Example #10
Source File: RootTypeDefinitionTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Test public void testSettingTypeAndXSIType() { try { reset(); // this is required to make it a valid type Y node ((PSVIElementNSImpl) fRootNode).setAttributeNS(null, "attr", "typeY"); ((PSVIElementNSImpl) fRootNode).setAttributeNS(SchemaSymbols.URI_XSI, SchemaSymbols.XSI_TYPE, "Y"); fValidator.setProperty(ROOT_TYPE, typeX); validateDocument(); } catch (Exception e) { fail("Validation failed: " + e.getMessage()); } assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); }
Example #11
Source File: IgnoreXSITypeTest_C_CA.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkFalseResult() { assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementNull(fRootNode.getElementDeclaration()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementNull(child.getElementDeclaration()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); child = super.getChild(2); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementName("A", child.getElementDeclaration().getName()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); }
Example #12
Source File: IgnoreXSITypeTest_A_C.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private void checkResult() { assertValidity(ItemPSVI.VALIDITY_VALID, fRootNode.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, fRootNode .getValidationAttempted()); assertElementName("A", fRootNode.getElementDeclaration().getName()); assertTypeName("Y", fRootNode.getTypeDefinition().getName()); assertTypeNamespaceNull(fRootNode.getTypeDefinition().getNamespace()); PSVIElementNSImpl child = super.getChild(1); assertValidity(ItemPSVI.VALIDITY_VALID, child.getValidity()); assertValidationAttempted(ItemPSVI.VALIDATION_FULL, child .getValidationAttempted()); assertElementNull(child.getElementDeclaration()); assertTypeName("Y", child.getTypeDefinition().getName()); assertTypeNamespaceNull(child.getTypeDefinition().getNamespace()); }
Example #13
Source File: DOMResultAugmentor.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #14
Source File: DOMResultBuilder.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #15
Source File: DOMResultAugmentor.java From hottub with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #16
Source File: DOMResultBuilder.java From hottub with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #17
Source File: DOMResultAugmentor.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #18
Source File: DOMResultBuilder.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #19
Source File: DOMResultAugmentor.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #20
Source File: DOMResultBuilder.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #21
Source File: DOMResultBuilder.java From Bytecoder with Apache License 2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #22
Source File: DOMResultBuilder.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #23
Source File: DOMResultAugmentor.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #24
Source File: DOMResultBuilder.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #25
Source File: DOMResultAugmentor.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #26
Source File: DOMResultBuilder.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #27
Source File: DOMResultAugmentor.java From JDKSourceCode1.8 with MIT License | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #28
Source File: DOMResultBuilder.java From JDKSourceCode1.8 with MIT License | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }
Example #29
Source File: DOMResultAugmentor.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { final Node currentElement = fDOMValidatorHelper.getCurrentElement(); // Write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl) currentElement).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl) currentElement).setType(type); } } }
Example #30
Source File: DOMResultBuilder.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public void endElement(QName element, Augmentations augs) throws XNIException { // write type information to this element if (augs != null && fDocumentImpl != null) { ElementPSVI elementPSVI = (ElementPSVI)augs.getItem(Constants.ELEMENT_PSVI); if (elementPSVI != null) { if (fStorePSVI) { ((PSVIElementNSImpl)fCurrentNode).setPSVI(elementPSVI); } XSTypeDefinition type = elementPSVI.getMemberTypeDefinition(); if (type == null) { type = elementPSVI.getTypeDefinition(); } ((ElementNSImpl)fCurrentNode).setType(type); } } // adjust current node reference if (fCurrentNode == fFragmentRoot) { fCurrentNode = null; fFragmentRoot = null; return; } fCurrentNode = fCurrentNode.getParentNode(); }