SetDefaultOutput() private méthode

private SetDefaultOutput ( XsltOutput method ) : bool
method XsltOutput
Résultat bool
Exemple #1
0
        private bool DecideDefaultOutput(BuilderInfo node)
        {
            XsltOutput.OutputMethod method = XsltOutput.OutputMethod.Xml;
            switch (node.NodeType)
            {
            case XmlNodeType.Element:
                if (node.NamespaceURI.Length == 0 && string.Equals("html", node.LocalName, StringComparison.OrdinalIgnoreCase))
                {
                    method = XsltOutput.OutputMethod.Html;
                }
                break;

            case XmlNodeType.Text:
            case XmlNodeType.Whitespace:
            case XmlNodeType.SignificantWhitespace:
                if (XmlCharType.IsOnlyWhitespace(node.Value))
                {
                    return(false);
                }
                method = XsltOutput.OutputMethod.Xml;
                break;

            default:
                return(false);
            }
            if (_processor.SetDefaultOutput(method))
            {
                CacheOuptutProps(_processor.Output);
            }
            return(true);
        }