当前位置: 首页>>代码示例>>Java>>正文


Java Augmentations.putItem方法代码示例

本文整理汇总了Java中org.apache.xerces.xni.Augmentations.putItem方法的典型用法代码示例。如果您正苦于以下问题:Java Augmentations.putItem方法的具体用法?Java Augmentations.putItem怎么用?Java Augmentations.putItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.xerces.xni.Augmentations的用法示例。


在下文中一共展示了Augmentations.putItem方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: scanCharReference

import org.apache.xerces.xni.Augmentations; //导入方法依赖的package包/类
/**
 * Scans a character reference.
 * <p>
 * <pre>
 * [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'
 * </pre>
 */
protected void scanCharReference() 
    throws IOException, XNIException {

    fStringBuffer2.clear();
    int ch = scanCharReferenceValue(fStringBuffer2, null);
    fMarkupDepth--;
    if (ch != -1) {
        // call handler
        if (fDocumentHandler != null) {
            if (fNotifyCharRefs) {
                fDocumentHandler.startGeneralEntity(fCharRefLiteral, null, null, null);
            }
            Augmentations augs = null;
            if (fValidation && ch <= 0x20) {
                if (fTempAugmentations != null) {
                    fTempAugmentations.removeAllItems();
                }
                else {
                    fTempAugmentations = new AugmentationsImpl();
                }
                augs = fTempAugmentations;
                augs.putItem(Constants.CHAR_REF_PROBABLE_WS, Boolean.TRUE);
            }
            fDocumentHandler.characters(fStringBuffer2, augs);
            if (fNotifyCharRefs) {
                fDocumentHandler.endGeneralEntity(fCharRefLiteral, null);
            }
        }
    }

}
 
开发者ID:BowlerHatLLC,项目名称:feathers-sdk,代码行数:39,代码来源:XMLDocumentFragmentScannerMMImpl.java

示例2: getEmptyAugs

import org.apache.xerces.xni.Augmentations; //导入方法依赖的package包/类
Augmentations getEmptyAugs(Augmentations augs) {
    if (augs == null) {
        augs = fAugmentations;
        augs.removeAllItems();
    }
    augs.putItem(Constants.ELEMENT_PSVI, fCurrentPSVI);
    fCurrentPSVI.reset();

    return augs;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:11,代码来源:XMLSchemaValidator.java

示例3: modifyAugmentations

import org.apache.xerces.xni.Augmentations; //导入方法依赖的package包/类
/**
 * Modify the augmentations.  Add an [included] infoset item, if <code>force</code>
 * is true, or if the current element is a top level included item.
 * @param augs the Augmentations to modify.
 * @param force whether to force modification
 * @return the modified Augmentations
 */
protected Augmentations modifyAugmentations(
    Augmentations augs,
    boolean force) {
    if (force || isTopLevelIncludedItem()) {
        if (augs == null) {
            augs = new AugmentationsImpl();
        }
        augs.putItem(XINCLUDE_INCLUDED, Boolean.TRUE);
    }
    return augs;
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:19,代码来源:XIncludeHandler.java

示例4: startDocument

import org.apache.xerces.xni.Augmentations; //导入方法依赖的package包/类
/**
 * Event sent at the start of the document.
 *
 * A fatal error will occur here, if it is detected that this document has been processed
 * before.
 *
 * This event is only passed on to the document handler if this is the root document.
 */
public void startDocument(
    XMLLocator locator,
    String encoding,
    NamespaceContext namespaceContext,
    Augmentations augs)
    throws XNIException {

    // we do this to ensure that the proper location is reported in errors
    // otherwise, the locator from the root document would always be used
    fErrorReporter.setDocumentLocator(locator);

    if (!(namespaceContext instanceof XIncludeNamespaceSupport)) {
        reportFatalError("IncompatibleNamespaceContext");
    }
    fNamespaceContext = (XIncludeNamespaceSupport)namespaceContext;
    fDocLocation = locator;
    fXIncludeLocator.setLocator(fDocLocation);

    // initialize the current base URI
    setupCurrentBaseURI(locator);
    saveBaseURI();
    if (augs == null) {
        augs = new AugmentationsImpl();
    }
    augs.putItem(CURRENT_BASE_URI, fCurrentBaseURI);
    
    // abort here if we detect a recursive include
    if (!isRootDocument()) {
        fParentXIncludeHandler.fHasIncludeReportedContent = true;
        if (fParentXIncludeHandler.searchForRecursiveIncludes(
            fCurrentBaseURI.getExpandedSystemId())) {
            reportFatalError(
                    "RecursiveInclude",
                    new Object[] { fCurrentBaseURI.getExpandedSystemId()});
        }
    }

    // initialize the current language
    fCurrentLanguage = XMLSymbols.EMPTY_STRING;
    saveLanguage(fCurrentLanguage);

    if (isRootDocument() && fDocumentHandler != null) {
        fDocumentHandler.startDocument(
            fXIncludeLocator,
            encoding,
            namespaceContext,
            augs);
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:58,代码来源:XIncludeHandler.java


注:本文中的org.apache.xerces.xni.Augmentations.putItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。