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;
}