Package org.apache.xerces.xni

Examples of org.apache.xerces.xni.XMLString


        fCurrentPSVI.fTypeDecl = this.fCurrentType;
        fCurrentPSVI.fNotation = this.fNotation;
        fCurrentPSVI.fValidationContext = this.fValidationRoot;

        // now validate the content of the element
        XMLString defaultValue = processElementContent(element);

        // Element Locally Valid (Element)
        // 6 The element information item must be valid with respect to each of the {identity-constraint definitions} as per Identity-constraint Satisfied (3.11.4).

        // call matchers and de-activate context
View Full Code Here


     {value constraint} on the corresponding element decl, then return
     *  an XMLString representing the default value.
     */
    XMLString processElementContent(QName element) {
        // fCurrentElemDecl: default value; ...
        XMLString defaultValue = null;
        // 1 If the item is ?valid? with respect to an element declaration as per Element Locally Valid (Element) (?3.3.4) and the {value constraint} is present, but clause 3.2 of Element Locally Valid (Element) (?3.3.4) above is not satisfied and the item has no element or character information item [children], then schema. Furthermore, the post-schema-validation infoset has the canonical lexical representation of the {value constraint} value as the item's [schema normalized value] property.
        if (fCurrentElemDecl != null && fCurrentElemDecl.fDefault != null &&
            fBuffer.toString().length() == 0 && fChildCount == 0 && !fNil) {

            // PSVI: specified
            fCurrentPSVI.fSpecified = false;

            int bufLen = fCurrentElemDecl.fDefault.normalizedValue.length();
            char [] chars = new char[bufLen];
            fCurrentElemDecl.fDefault.normalizedValue.getChars(0, bufLen, chars, 0);
            defaultValue = new XMLString(chars, 0, bufLen);
        }
        // fixed values are handled later, after xsi:type determined.


        if (fCurrentElemDecl != null &&
View Full Code Here

            reportFatalError("OpenQuoteMissingInDecl", null);
        }
        // store at which depth of entities we start
        int entityDepth = fEntityDepth;

        XMLString literal = fString;
        XMLString literal2 = fString;
        if (fEntityScanner.scanLiteral(quote, fString) != quote) {
            fStringBuffer.clear();
            fStringBuffer2.clear();
            do {
                fStringBuffer.append(fString);
View Full Code Here

    private void sendElementEvent(
        String elementName,
        Vector attributes,
        String elementValue) {
        XMLString text =
            elementValue == null
                ? null
                : new XMLString(
                    elementValue.toCharArray(),
                    0,
                    elementValue.length());
        this.sendElementEvent(elementName, attributes, text);
    }
View Full Code Here

            fIndentChars = new char[fIndentChars.length * 2];
            for (int i = 0; i < fIndentChars.length; i++) {
                fIndentChars[i] = '\t';
            }
        }
        XMLString text = new XMLString(fIndentChars, 0, fIndent);
        fDocumentHandler.characters(text, null);
    }
View Full Code Here

    protected boolean isSpace(int c) {
        return XMLChar.isSpace(c);
    } // isSpace(int):  boolean

    public boolean characterData(String data, Augmentations augs) {      
        characters(new XMLString(data.toCharArray(), 0, data.length()), augs);
        return true;
    }
View Full Code Here

     */
    public XIncludeTextReader(XMLInputSource source, XIncludeHandler handler, int bufferSize)
        throws IOException {
        fHandler = handler;
        fSource = source;
        fTempString = new XMLString(new char[bufferSize + 1], 0, 0);
    }
View Full Code Here

            String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA);
            QName annQName = new QName(schemaPrefix, SchemaSymbols.ELT_ANNOTATION, schemaPrefix + (schemaPrefix.length() == 0?"":":") + SchemaSymbols.ELT_ANNOTATION, SchemaSymbols.URI_SCHEMAFORSCHEMA);
            schemaDOM.startAnnotation(annQName, attributes, fNamespaceContext);
            QName elemQName = new QName(schemaPrefix, SchemaSymbols.ELT_DOCUMENTATION, schemaPrefix + (schemaPrefix.length() == 0?"":":") + SchemaSymbols.ELT_DOCUMENTATION, SchemaSymbols.URI_SCHEMAFORSCHEMA);
            schemaDOM.startAnnotationElement(elemQName, attributes);
            schemaDOM.characters(new XMLString("SYNTHETIC_ANNOTATION".toCharArray(), 0, 20 ));    
            schemaDOM.endSyntheticAnnotationElement(elemQName, false);
            schemaDOM.endSyntheticAnnotationElement(annQName, true);
           
            schemaDOM.endElement();
           
View Full Code Here

                    String schemaPrefix = fNamespaceContext.getPrefix(SchemaSymbols.URI_SCHEMAFORSCHEMA);
                    QName annQName = new QName(schemaPrefix, SchemaSymbols.ELT_ANNOTATION, schemaPrefix + (schemaPrefix.length() == 0?"":":") + SchemaSymbols.ELT_ANNOTATION, SchemaSymbols.URI_SCHEMAFORSCHEMA);
                    schemaDOM.startAnnotation(annQName, fEmptyAttr, fNamespaceContext);
                    QName elemQName = new QName(schemaPrefix, SchemaSymbols.ELT_DOCUMENTATION, schemaPrefix + (schemaPrefix.length() == 0?"":":") + SchemaSymbols.ELT_DOCUMENTATION, SchemaSymbols.URI_SCHEMAFORSCHEMA);
                    schemaDOM.startAnnotationElement(elemQName, fEmptyAttr);
                    schemaDOM.characters(new XMLString("SYNTHETIC_ANNOTATION".toCharArray(), 0, 20 ));    
                    schemaDOM.endSyntheticAnnotationElement(elemQName, false);
                    schemaDOM.endSyntheticAnnotationElement(annQName, true);
                }
            }
            schemaDOM.endElement();
View Full Code Here

            reportFatalError("OpenQuoteMissingInDecl", null);
        }
        // store at which depth of entities we start
        int entityDepth = fEntityDepth;

        XMLString literal = fString;
        XMLString literal2 = fString;
        if (fEntityScanner.scanLiteral(quote, fString) != quote) {
            fStringBuffer.clear();
            fStringBuffer2.clear();
            do {
                fStringBuffer.append(fString);
View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.XMLString

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.