System.Xml.Xsl.XsltOld.Stylesheet.PreserveWhiteSpace C# (CSharp) Method

PreserveWhiteSpace() private method

private PreserveWhiteSpace ( Processor proc, XPathNavigator node ) : bool
proc Processor
node System.Xml.XPath.XPathNavigator
return bool
        internal bool PreserveWhiteSpace(Processor proc, XPathNavigator node){
            // last one should win. I.E. We starting from the end. I.E. Lowest priority should go first
            if (this.whitespaceList != null) {
                for (int i = this.whitespaceList.Count - 1; 0 <= i; i --) {
                    WhitespaceElement elem = (WhitespaceElement) this.whitespaceList[i];
                    if (proc.Matches(node, elem.Key)) {
                        return elem.PreserveSpace;
                    }
                }
            }
            if (this.imports != null) {
                for (int importIndex = this.imports.Count - 1; importIndex >= 0; importIndex --) {
                    Stylesheet stylesheet = (Stylesheet) this.imports[importIndex];
                    if (! stylesheet.PreserveWhiteSpace(proc, node))
                        return false;
                }
            }
            return true;
        }

Usage Example

Ejemplo n.º 1
0
 internal bool PreserveWhiteSpace(Processor proc, XPathNavigator node)
 {
     // last one should win. I.E. We starting from the end. I.E. Lowest priority should go first
     if (_whitespaceList != null)
     {
         for (int i = _whitespaceList.Count - 1; 0 <= i; i--)
         {
             WhitespaceElement elem = (WhitespaceElement)_whitespaceList[i];
             if (proc.Matches(node, elem.Key))
             {
                 return(elem.PreserveSpace);
             }
         }
     }
     if (_imports != null)
     {
         for (int importIndex = _imports.Count - 1; importIndex >= 0; importIndex--)
         {
             Stylesheet stylesheet = (Stylesheet)_imports[importIndex];
             if (!stylesheet.PreserveWhiteSpace(proc, node))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
All Usage Examples Of System.Xml.Xsl.XsltOld.Stylesheet::PreserveWhiteSpace