Exemple #1
0
        public XmlTransformation(Stream transformStream, IXmlTransformationLogger logger)
        {
            _logger        = new XmlTransformationLogger(logger);
            _transformFile = string.Empty;

            _xmlTransformation = new XmlFileInfoDocument();
            _xmlTransformation.Load(transformStream);

            InitializeTransformationServices();

            PreprocessTransformDocument();
        }
Exemple #2
0
        public XmlTransformation(string transform, bool isTransformAFile, IXmlTransformationLogger logger)
        {
            _transformFile = transform;
            _logger        = new XmlTransformationLogger(logger);

            _xmlTransformation = new XmlFileInfoDocument();

            if (isTransformAFile)
            {
                _xmlTransformation.Load(transform);
            }
            else
            {
                _xmlTransformation.LoadXml(transform);
            }

            InitializeTransformationServices();

            PreprocessTransformDocument();
        }
            internal XmlFileInfoElement(
                string prefix,
                string localName,
                string namespaceUri,
                XmlFileInfoDocument document)
                : base(prefix, localName, namespaceUri, document)
            {
                LineNumber   = document.CurrentLineNumber;
                LinePosition = document.CurrentLinePosition;
                IsOriginal   = document.FirstLoad;

                if (document.PreservationProvider != null)
                {
                    _preservationDict = document.PreservationProvider.GetDictAtPosition(LineNumber, LinePosition - 1);
                }

                if (_preservationDict == null)
                {
                    _preservationDict = new XmlAttributePreservationDict();
                }
            }
Exemple #4
0
 private XmlFormatter(XmlFileInfoDocument document)
 {
     _document        = document;
     OriginalFileName = document.FileName;
 }
 public XmlNodeException(string message, XmlNode node)
     : base(message)
 {
     _lineInfo = node as IXmlLineInfo;
     _document = node.OwnerDocument as XmlFileInfoDocument;
 }
 public XmlNodeException(Exception innerException, XmlNode node)
     : base(innerException.Message, innerException)
 {
     _lineInfo = node as IXmlLineInfo;
     _document = node.OwnerDocument as XmlFileInfoDocument;
 }