PreserveWhiteSpace() private method

private PreserveWhiteSpace ( Processor proc, XPathNavigator node ) : bool
proc Processor
node System.Xml.XPath.XPathNavigator
return bool
コード例 #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);
 }
コード例 #2
0
 public override bool PreserveWhitespace(XPathNavigator node)
 {
     node = node.Clone();
     node.MoveToParent();
     return(_processor !.Stylesheet.PreserveWhiteSpace(_processor, node));
 }