/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); mCachedEntities = mCfgTreatCharRefsAsEntities ? new HashMap() : Collections.EMPTY_MAP; }
/** * Method called when an entity has been expanded (new input source * has been created). Needs to initialize location information and change * active input source. */ protected void initInputSource(WstxInputSource newInput, boolean isExt) throws IOException, XMLStreamException { mInput = newInput; // Let's make sure new input will be read next time input is needed: mInputPtr = 0; mInputLen = 0; /* Plus, reset the input location so that'll be accurate for * error reporting etc. */ mInputTopDepth = mCurrDepth; mInput.initInputLocation(this, mCurrDepth); /* 21-Feb-2006, TSa: Linefeeds are NOT normalized when expanding * internal entities (XML, 2.11) */ if (isExt) { mCfgNormalizeLFs = mConfig.willNormalizeLFs(); } else { mCfgNormalizeLFs = false; } }
/** * Method called when an entity has been expanded (new input source * has been created). Needs to initialize location information and change * active input source. */ protected void initInputSource(WstxInputSource newInput, boolean isExt) throws IOException, XMLStreamException { mInput = newInput; // Let's make sure new input will be read next time input is needed: mInputPtr = 0; mInputLen = 0; /* Plus, reset the input location so that'll be accurate for * error reporting etc. */ mInputTopDepth = mCurrDepth; mInput.initInputLocation(this, mCurrDepth); /* 21-Feb-2006, TSa: Linefeeds are NOT normalized when expanding * internal entities (XML, 2.11) */ if (isExt) { mCfgNormalizeLFs = mConfig.willNormalizeLFs(); } else { mCfgNormalizeLFs = false; } }
/** * Method called when an entity has been expanded (new input source * has been created). Needs to initialize location information and change * active input source. */ protected void initInputSource(WstxInputSource newInput, boolean isExt) throws IOException, XMLStreamException { mInput = newInput; // Let's make sure new input will be read next time input is needed: mInputPtr = 0; mInputLen = 0; /* Plus, reset the input location so that'll be accurate for * error reporting etc. */ mInputTopDepth = mCurrDepth; mInput.initInputLocation(this, mCurrDepth); /* 21-Feb-2006, TSa: Linefeeds are NOT normalized when expanding * internal entities (XML, 2.11) */ if (isExt) { mCfgNormalizeLFs = mConfig.willNormalizeLFs(); } else { mCfgNormalizeLFs = false; } }
/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); if (mCfgTreatCharRefsAsEntities) { mCachedEntities = new HashMap<String,IntEntity>(); } else { mCachedEntities = Collections.emptyMap(); } }
/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; // waiting for pull request, see https://github.com/FasterXML/woodstox/pull/56 mXml10AllowAllEscapedChars = true;//mConfig.willXml10AllowAllEscapedChars(); mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); if (mCfgTreatCharRefsAsEntities) { mCachedEntities = new HashMap<String,IntEntity>(); } else { mCachedEntities = Collections.emptyMap(); } }
/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); mCachedEntities = mCfgTreatCharRefsAsEntities ? new HashMap() : Collections.EMPTY_MAP; }
/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; mAllowXml11EscapedCharsInXml10 = mConfig.willAllowXml11EscapedCharsInXml10(); mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); if (mCfgTreatCharRefsAsEntities) { mCachedEntities = new HashMap<String,IntEntity>(); } else { mCachedEntities = Collections.emptyMap(); } }
/** * Constructor used when creating a complete new (main-level) reader that * does not share its input buffers or state with another reader. */ protected StreamScanner(WstxInputSource input, ReaderConfig cfg, XMLResolver res) { super(); mInput = input; // 17-Jun-2004, TSa: Need to know root-level input source mRootInput = input; mConfig = cfg; mSymbols = cfg.getSymbols(); int cf = cfg.getConfigFlags(); mCfgNsEnabled = (cf & CFG_NAMESPACE_AWARE) != 0; mCfgReplaceEntities = (cf & CFG_REPLACE_ENTITY_REFS) != 0; mAllowXml11EscapedCharsInXml10 = mConfig.willAllowXml11EscapedCharsInXml10(); mNormalizeLFs = mConfig.willNormalizeLFs(); mInputBuffer = null; mInputPtr = mInputEnd = 0; mEntityResolver = res; mCfgTreatCharRefsAsEntities = mConfig.willTreatCharRefsAsEnts(); if (mCfgTreatCharRefsAsEntities) { mCachedEntities = new HashMap<String,IntEntity>(); } else { mCachedEntities = Collections.emptyMap(); } }
return willNormalizeLFs() ? Boolean.TRUE : Boolean.FALSE;
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
if (mCfgNormalizeLFs != mConfig.willNormalizeLFs()) { mCfgNormalizeLFs = !input.fromInternalEntity();
return willNormalizeLFs() ? Boolean.TRUE : Boolean.FALSE; case PROP_NORMALIZE_ATTR_VALUES: return willNormalizeAttrValues() ? Boolean.TRUE : Boolean.FALSE;
return willNormalizeLFs() ? Boolean.TRUE : Boolean.FALSE; case PROP_NORMALIZE_ATTR_VALUES: return willNormalizeAttrValues() ? Boolean.TRUE : Boolean.FALSE;
return willNormalizeLFs() ? Boolean.TRUE : Boolean.FALSE; case PROP_NORMALIZE_ATTR_VALUES: return willNormalizeAttrValues() ? Boolean.TRUE : Boolean.FALSE;
return willAllowXml11EscapedCharsInXml10() ? Boolean.TRUE : Boolean.FALSE; case PROP_NORMALIZE_LFS: return willNormalizeLFs() ? Boolean.TRUE : Boolean.FALSE;