org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xs.ElementPSVI源码实例Demo

下面列出了org.w3c.dom.TypeInfo#com.sun.org.apache.xerces.internal.xs.ElementPSVI 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
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);
        }
    }
}
 
源代码3 项目: jdk1.8-source-analysis   文件: DOMResultBuilder.java
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();
}
 
源代码4 项目: jdk1.8-source-analysis   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码5 项目: TencentKona-8   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码6 项目: TencentKona-8   文件: DOMResultAugmentor.java
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);
        }
    }
}
 
源代码7 项目: TencentKona-8   文件: DOMResultBuilder.java
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();
}
 
源代码8 项目: openjdk-8   文件: DOMResultBuilder.java
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();
}
 
源代码9 项目: jdk8u60   文件: DOMResultBuilder.java
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();
}
 
源代码10 项目: jdk8u60   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码11 项目: openjdk-jdk9   文件: DOMResultBuilder.java
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();
}
 
源代码12 项目: openjdk-jdk9   文件: RootTypeDefinitionTest.java
/**
 * XERCESJ-1141 root-type-definition property not read by XMLSchemaValidator during reset()
 */
@Test
public void testUsingDocumentBuilderFactory() throws Exception {
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setAttribute(ROOT_TYPE, typeX);
    dbf.setAttribute(DOCUMENT_CLASS_NAME,"com.sun.org.apache.xerces.internal.dom.PSVIDocumentImpl");
    dbf.setNamespaceAware(true);
    dbf.setValidating(false);

    SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    dbf.setSchema(sf.newSchema(fSchemaURL));

    DocumentBuilder db = dbf.newDocumentBuilder();
    Document document = db.parse(fDocumentURL.toExternalForm());
    ElementPSVI rootNode = (ElementPSVI) document.getDocumentElement();

    assertValidity(ItemPSVI.VALIDITY_VALID, rootNode.getValidity());
    assertValidationAttempted(ItemPSVI.VALIDATION_FULL, rootNode
            .getValidationAttempted());
    assertElementNull(rootNode.getElementDeclaration());
    assertTypeName("X", rootNode.getTypeDefinition().getName());
}
 
源代码13 项目: openjdk-8-source   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码14 项目: openjdk-jdk8u   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码15 项目: openjdk-8-source   文件: DOMResultAugmentor.java
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);
        }
    }
}
 
源代码16 项目: openjdk-8   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码17 项目: openjdk-jdk9   文件: DOMResultAugmentor.java
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);
        }
    }
}
 
源代码18 项目: openjdk-8-source   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码19 项目: openjdk-8   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码20 项目: openjdk-jdk8u   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码21 项目: openjdk-jdk8u-backup   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param attr  the source of attribute PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fNormalizedValue = elem.getSchemaNormalizedValue();
    this.fActualValue = elem.getActualNormalizedValue();
    this.fActualValueType = elem.getActualNormalizedValueType();
    this.fItemValueTypes = elem.getItemValueTypes();
    this.fMemberType = elem.getMemberTypeDefinition();
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码22 项目: openjdk-jdk8u-backup   文件: DOMResultAugmentor.java
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);
        }
    }
}
 
源代码23 项目: openjdk-jdk8u-backup   文件: DOMResultBuilder.java
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();
}
 
源代码24 项目: openjdk-jdk8u-backup   文件: ElementPSVImpl.java
/**
 * Reset() should be called in validator startElement(..) method.
 */
public void reset() {
    fDeclaration = null;
    fTypeDecl = null;
    fNil = false;
    fSpecified = false;
    fNotation = null;
    fMemberType = null;
    fValidationAttempted = ElementPSVI.VALIDATION_NONE;
    fValidity = ElementPSVI.VALIDITY_NOTKNOWN;
    fErrorCodes = null;
    fValidationContext = null;
    fNormalizedValue = null;
    fActualValue = null;
    fActualValueType = XSConstants.UNAVAILABLE_DT;
    fItemValueTypes = null;
}
 
源代码25 项目: Bytecoder   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param elem  the source of element PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fErrorMessages = elem.getErrorMessages();
    if (fTypeDecl instanceof XSSimpleTypeDefinition ||
            fTypeDecl instanceof XSComplexTypeDefinition &&
            ((XSComplexTypeDefinition)fTypeDecl).getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) {
        this.fValue.copyFrom(elem.getSchemaValue());
    }
    else {
        this.fValue.reset();
    }
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码26 项目: hottub   文件: DOMResultBuilder.java
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();
}
 
源代码27 项目: Bytecoder   文件: DOMResultBuilder.java
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();
}
 
源代码28 项目: openjdk-jdk9   文件: PSVIElementNSImpl.java
/**
 * Copy PSVI properties from another psvi item.
 *
 * @param elem  the source of element PSVI items
 */
public void setPSVI(ElementPSVI elem) {
    this.fDeclaration = elem.getElementDeclaration();
    this.fNotation = elem.getNotation();
    this.fValidationContext = elem.getValidationContext();
    this.fTypeDecl = elem.getTypeDefinition();
    this.fSchemaInformation = elem.getSchemaInformation();
    this.fValidity = elem.getValidity();
    this.fValidationAttempted = elem.getValidationAttempted();
    this.fErrorCodes = elem.getErrorCodes();
    this.fErrorMessages = elem.getErrorMessages();
    if (fTypeDecl instanceof XSSimpleTypeDefinition ||
            fTypeDecl instanceof XSComplexTypeDefinition &&
            ((XSComplexTypeDefinition)fTypeDecl).getContentType() == XSComplexTypeDefinition.CONTENTTYPE_SIMPLE) {
        this.fValue.copyFrom(elem.getSchemaValue());
    }
    else {
        this.fValue.reset();
    }
    this.fSpecified = elem.getIsSchemaSpecified();
    this.fNil = elem.getNil();
}
 
源代码29 项目: jdk1.8-source-analysis   文件: DOMNormalizer.java
/**
* 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 {
           if (DEBUG_EVENTS) {
                   System.out.println("==>endElement: " + element);
           }

   if(augs != null) {
           ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
           if (elementPSVI != null) {
                   ElementImpl elementNode = (ElementImpl) fCurrentNode;
                   if (fPSVI) {
                           ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
                   }
                   // include element default content (if one is available)
                   String normalizedValue = elementPSVI.getSchemaNormalizedValue();
                   if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
               if (normalizedValue !=null)
                               elementNode.setTextContent(normalizedValue);
                   }
                   else {
                           // NOTE: this is a hack: it is possible that DOM had an empty element
                           // and validator sent default value using characters(), which we don't
                           // implement. Thus, here we attempt to add the default value.
                           String text = elementNode.getTextContent();
                           if (text.length() == 0) {
                                   // default content could be provided
                   if (normalizedValue !=null)
                       elementNode.setTextContent(normalizedValue);
                           }
                   }
           }
   }
   }
 
源代码30 项目: Bytecoder   文件: ElementPSVImpl.java
public ElementPSVImpl(boolean isConstant, ElementPSVI elementPSVI) {
    fDeclaration = elementPSVI.getElementDeclaration();
    fTypeDecl = elementPSVI.getTypeDefinition();
    fNil = elementPSVI.getNil();
    fSpecified = elementPSVI.getIsSchemaSpecified();
    fValue.copyFrom(elementPSVI.getSchemaValue());
    fNotation = elementPSVI.getNotation();
    fValidationAttempted = elementPSVI.getValidationAttempted();
    fValidity = elementPSVI.getValidity();
    fValidationContext = elementPSVI.getValidationContext();
    if (elementPSVI instanceof ElementPSVImpl) {
        final ElementPSVImpl elementPSVIImpl = (ElementPSVImpl) elementPSVI;
        fErrors = (elementPSVIImpl.fErrors != null) ? elementPSVIImpl.fErrors.clone() : null;
        elementPSVIImpl.copySchemaInformationTo(this);
    }
    else {
        final StringList errorCodes = elementPSVI.getErrorCodes();
        final int length = errorCodes.getLength();
        if (length > 0) {
            final StringList errorMessages = elementPSVI.getErrorMessages();
            final String[] errors = new String[length << 1];
            for (int i = 0, j = 0; i < length; ++i) {
                errors[j++] = errorCodes.item(i);
                errors[j++] = errorMessages.item(i);
            }
            fErrors = errors;
        }
        fSchemaInformation = elementPSVI.getSchemaInformation();
    }
    fIsConstant = isConstant;
}