public XsltInput(XmlReader reader, Compiler compiler) {
            Debug.Assert(reader != null);
            EnsureExpandEntities(reader);
            IXmlLineInfo xmlLineInfo = reader as IXmlLineInfo;

            this.reader         = reader;
            this.readerLineInfo = (xmlLineInfo != null && xmlLineInfo.HasLineInfo()) ? xmlLineInfo : null;
            this.topLevelReader = reader.ReadState == ReadState.Initial;
            this.scopeManager   = new InputScopeManager(reader.NameTable);
            this.atoms          = new KeywordsTable(reader.NameTable);
            this.compiler       = compiler;
            this.textIsWhite    = true;
            this.nodeType       = XPathNodeType.Root;
        }
        public XsltInput(XmlReader reader, Compiler compiler)
        {
            Debug.Assert(reader != null);
            EnsureExpandEntities(reader);
            IXmlLineInfo xmlLineInfo = reader as IXmlLineInfo;

            this.reader         = reader;
            this.readerLineInfo = (xmlLineInfo != null && xmlLineInfo.HasLineInfo()) ? xmlLineInfo : null;
            this.topLevelReader = reader.ReadState == ReadState.Initial;
            this.scopeManager   = new InputScopeManager(reader.NameTable);
            this.atoms          = new KeywordsTable(reader.NameTable);
            this.compiler       = compiler;
            this.textIsWhite    = true;
            this.nodeType       = XPathNodeType.Root;
        }
        public XsltInput(XmlReader reader, Compiler compiler, KeywordsTable atoms) {
            Debug.Assert(reader != null);
            Debug.Assert(atoms != null);
            EnsureExpandEntities(reader);
            IXmlLineInfo xmlLineInfo = reader as IXmlLineInfo;

            this.atoms          = atoms;
            this.reader         = reader;
            this.reatomize      = reader.NameTable != atoms.NameTable;
            this.readerLineInfo = (xmlLineInfo != null && xmlLineInfo.HasLineInfo()) ? xmlLineInfo : null;
            this.topLevelReader = reader.ReadState == ReadState.Initial;
            this.scopeManager   = new CompilerScopeManager<VarPar>(atoms);
            this.compiler       = compiler;
            this.nodeType       = XmlNodeType.Document;
        }
Exemple #4
0
        public XsltInput(XmlReader reader, Compiler compiler, KeywordsTable atoms)
        {
            Debug.Assert(reader != null);
            Debug.Assert(atoms != null);
            EnsureExpandEntities(reader);
            IXmlLineInfo?xmlLineInfo = reader as IXmlLineInfo;

            _atoms          = atoms;
            _reader         = reader;
            _reatomize      = reader.NameTable != atoms.NameTable;
            _readerLineInfo = (xmlLineInfo != null && xmlLineInfo.HasLineInfo()) ? xmlLineInfo : null;
            _topLevelReader = reader.ReadState == ReadState.Initial;
            _scopeManager   = new CompilerScopeManager <VarPar>(atoms);
            _compiler       = compiler;
            _nodeType       = XmlNodeType.Document;
        }
Exemple #5
0
 public CompilerScopeManager(KeywordsTable atoms)
 {
     _records[0].flags  = ScopeFlags.NsDecl;
     _records[0].ncName = atoms.Xml;
     _records[0].nsUri  = atoms.UriXml;
 }
Exemple #6
0
 private void Load(XmlReader reader)
 {
     _atoms = new KeywordsTable(reader.NameTable);
     AtomizeAttributes();
     LoadStylesheet(reader, /*include:*/false);
 }