Exemple #1
0
        protected override XmlValidatingReader GetReader()
        {
            if (LogDispatcher != null)
            {
                LogDispatcher.DispatchLog("BusinessRulesFileDriver loading " + xmlSource, LogEventImpl.INFO);
            }

            return((XmlValidatingReader)GetXmlInputReader(xmlSource,
                                                          Parameter.GetString("businessrules.xsd", "businessRules.xsd")));
        }
Exemple #2
0
        public XBusinessRulesFileDriver(string xmlFileURI) : base(xmlFileURI)
        {
            if (LogDispatcher != null)
            {
                LogDispatcher.DispatchLog("XBusinessRulesFileDriver accessing " + Parameter.GetString("transformxrules.xsl", "transformXRules.xsl") + " in assembly",
                                          LogEventImpl.INFO);
            }

            inputXMLSchema = Parameter.GetString("xbusinessrules.xsd", "xBusinessRules.xsd");

            xslt = new XslTransform();
            xslt.Load(new XmlTextReader(Assembly
                                        .GetExecutingAssembly()
                                        .GetManifestResourceStream(Parameter.GetString("transformxrules.xsl", "transformXRules.xsl"))), null, null);
        }
Exemple #3
0
        private XslTransform GetXSLT()
        {
            if (xslt == null)
            {
                if (LogDispatcher != null)
                {
                    LogDispatcher.DispatchLog("XSLTRulesFileDriver loading " + xslFileURI, LogEventImpl.INFO);
                }

                xslt = new XslTransform();
                xslt.Load(xslFileURI);
            }

            return(xslt);
        }
Exemple #4
0
        protected override XmlValidatingReader GetReader()
        {
            if (LogDispatcher != null)
            {
                LogDispatcher.DispatchLog("XSLTRulesFileDriver loading " + xmlSource, LogEventImpl.INFO);
            }

            XmlReader fileReader = GetXmlInputReader(xmlSource, inputXMLSchema);

            MemoryStream stream = new MemoryStream();

            GetXSLT().Transform(new XPathDocument(fileReader), null, stream, null);
            fileReader.Close();
            stream.Seek(0, SeekOrigin.Begin);
            XmlSchemaCollection schemas = new XmlSchemaCollection();

            XmlValidatingReader streamReader = (XmlValidatingReader)GetXmlInputReader(stream,
                                                                                      Parameter.GetString("businessrules.xsd", "businessRules.xsd"));

            return(streamReader);
        }