protected override XmlValidatingReader GetReader() { if (LogDispatcher != null) { LogDispatcher.DispatchLog("BusinessRulesFileDriver loading " + xmlSource, LogEventImpl.INFO); } return((XmlValidatingReader)GetXmlInputReader(xmlSource, Parameter.GetString("businessrules.xsd", "businessRules.xsd"))); }
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); }
private XslTransform GetXSLT() { if (xslt == null) { if (LogDispatcher != null) { LogDispatcher.DispatchLog("XSLTRulesFileDriver loading " + xslFileURI, LogEventImpl.INFO); } xslt = new XslTransform(); xslt.Load(xslFileURI); } return(xslt); }
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); }