public XmlParseActivityBuilder(XslBuilder xslBuilder, XmlParserHelperBuilder xmlParserHelperBuilder, XsdBuilder xsdBuilder, XsdParser xsdParser) { this.xslBuilder = xslBuilder; this.xmlParserHelperBuilder = xmlParserHelperBuilder; this.xsdBuilder = xsdBuilder; this.xsdParser = xsdParser; }
public void SetUp() { this.xsdParser = new XsdParser(); mapperActivityParser = new MapperActivityParser(xsdParser); var xml = @"<pd:activity name=""Mappe Equity"" xmlns:pd=""http://xmlns.tibco.com/bw/process/2003"" xmlns:xsl=""http://w3.org/1999/XSL/Transform""> <pd:type>com.tibco.plugin.mapper.MapperActivity</pd:type> <config> <element ref=""pfx2:NTMMessage""/> </config> <pd:inputBindings> <sqlParams> <FundName> <xsl:value-of select=""testvalue""/> </FundName> <AdminID> <xsl:value-of select=""EVL""/> </AdminID> </sqlParams> </pd:inputBindings> </pd:activity>"; doc = XElement.Parse(xml); }
public EditorControlViewModel(IContainerExtension container, IEventAggregator eventAggregator, IApplicationCommands appCommands) { _xsdParser = container.Resolve <XsdParser>(); _eventAggregator = eventAggregator; _appCommands = appCommands; InitEvent(); InitCommand(); }
public void CanParseXFormFromXmlFileDocumentumArchivageSettingsXsd() { //asign var xsdParser = new XsdParser(); //action var xForm = xsdParser.ParseXsdFile("DocumentumArchivageSettings.xsd"); //assert Assert.NotNull(xForm); }
public void CanParseXFormFromXmlFileMoveCopySettingsXsd() { //asign var xsdParser = new XsdParser(); //action var xForm = xsdParser.ParseXsdFile("MoveCopySettings.xsd"); //assert Assert.NotNull(xForm); }
public void Should_return_complexType_with_targetNamespace() { var xsdParser = new XsdParser(); string xml = @"<xsd:element name=""group"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""><xsd:complexType><xsd:sequence><xsd:element name=""adminID"" type=""xsd:string"" /></xsd:sequence></xsd:complexType></xsd:element>"; var doc = XElement.Parse(xml); var actual = xsdParser.Parse(new List <XNode>() { doc }, "Mytarget.Namespace"); Assert.AreEqual("Mytarget.Namespace.group", actual[0].Type); }
public void CanParseXFormFromXmlFileDocumentumArchivageSettingsXml() { //asign var xmlParser = new XmlParser(); var xsdParser = new XsdParser(); var xForm = xsdParser.ParseXsdFile("DocumentumArchivageSettings.xsd"); //action var xFormFromXml = xmlParser.GetFilledXForm("DocumentumArchivageSettings.xml", xForm); //assert Assert.NotNull(xFormFromXml); }
public ActivityBuilderFactory() { this.xpathBuilder = new XpathBuilder(); this.xslBuilder = new XslBuilder(this.xpathBuilder); this.dataAccessBuilder = new DataAccessBuilder(); this.dataAccessServiceBuilder = new DataAccessServiceBuilder(); this.dataAccessInterfacesCommonBuilder = new DataAccessInterfacesCommonBuilder(); this.resultSetBuilder = new ResultSetBuilder(); this.xmlParserHelperBuilder = new XmlParserHelperBuilder(); this.engineCommandServiceHelperBuilder = new EngineCommandServiceHelperBuilder(); this.xsdBuilder = new XsdBuilder(); this.xsdParser = new XsdParser(); this.subscriberBuilder = new SubscriberInterfaceBuilder(); }
public void Should_return_One_element_with_Type_String() { var xsdParser = new XsdParser(); string xml = @"<xsd:element name=""adminID"" type=""xsd:string"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""/>"; var doc = XElement.Parse(xml); var actual = xsdParser.Parse(new List <XNode>() { doc }); Assert.AreEqual(1, actual.Count); Assert.AreEqual("adminID", actual[0].Name); Assert.AreEqual("System.String", actual[0].Type); }
private void CreateAFile(string className) { _gen = new XsdParser(XsdFilePath + className + ".xsd"); var generatedFileFullName = ClassFilePath + className + ".cs"; if (File.Exists(generatedFileFullName)) { File.Delete(generatedFileFullName); } //_gen.EdiNodeTree = new Node() {Name = "Name", IsOptional = true, Nodes = null, Segment = null}; _gen.CreateClassFile(ClassFilePath, className); Assert.AreNotEqual(_gen.EdiDocument, null); Assert.IsTrue(File.Exists(generatedFileFullName)); }
public void Should_Manage_ref_element_without_prefix() { var xsdParser = new XsdParser(); string xml = @"<xsd:element ref=""mkdSchedulerInfo"" minOccurs=""0"" maxOccurs=""unbounded"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""/>"; var doc = XElement.Parse(xml); var actual = xsdParser.Parse(new List <XNode>() { doc }); Assert.AreEqual(1, actual.Count); Assert.AreEqual("mkdSchedulerInfo", actual[0].Name); Assert.AreEqual("mkdSchedulerInfo", actual[0].Type); }
/// <summary> /// Creates XForm from given Xsd file /// </summary> /// <param name="file">Path to Xsd file.</param> internal void GenerateFormFromXsdFile(string file) { _mainPanel.Controls.Clear(); _xForm = null; _controlManager.Clear();//prepare for new rendering var xsdParser = new XsdParser(); _xForm = xsdParser.ParseXsdFile(file); _xFormData = xsdParser.ParseXsdFile(file); var generateGuiGetGroupBox = _controlManager.GetGroupBoxGui(_xForm.Root, _xFormData.Root); _mainPanel.Controls.Add(generateGuiGetGroupBox); }
public void Should_return_One_element_with_One_Child() { var xsdParser = new XsdParser(); string xml = @"<xsd:element name=""group"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema""><xsd:complexType><xsd:sequence><xsd:element name=""adminID"" type=""xsd:string"" /></xsd:sequence></xsd:complexType></xsd:element>"; var doc = XElement.Parse(xml); var actual = xsdParser.Parse(new List <XNode>() { doc }); Assert.AreEqual(1, actual.Count); Assert.AreEqual("group", actual[0].Name); Assert.AreEqual("group", actual[0].Type); Assert.AreEqual("adminID", actual[0].ChildProperties[0].Name); Assert.AreEqual("System.String", actual[0].ChildProperties[0].Type); }
public void Should_return_One_With_3_child_when_parsing_the_exemple() { var xsdParser = new XsdParser(); var doc = XElement.Load("../../ressources/xsdtest.xsd"); var actual = xsdParser.Parse(new List <XNode>() { doc }); Assert.AreEqual(1, actual.Count); Assert.AreEqual("group", actual[0].Name); Assert.AreEqual("group", actual[0].Type); Assert.AreEqual(3, actual[0].ChildProperties.Count); Assert.AreEqual("adminID", actual[0].ChildProperties[1].Name); Assert.AreEqual("System.String", actual[0].ChildProperties[1].Type); Assert.AreEqual("param", actual[0].ChildProperties[2].Name); }
public void Dispose() { //Events _settingChangedEvent.Unsubscribe(OnSettingChanged); _loadTextEvent.Unsubscribe(OnLoadText); _updateTabStatusEvent.Unsubscribe(OnUpdateTabStatus); _selectTabEvent.Unsubscribe(OnSelectTab); //Command _appCommands.SaveCommand.UnregisterCommand(SaveCommand); _appCommands.CompileCommand.UnregisterCommand(CompileCommand); _appCommands.RedoCommand.UnregisterCommand(RedoCommand); _appCommands.UndoCommand.UnregisterCommand(UndoCommand); _textEditor?.Dispose(); _textEditor = null; _xsdParser = null; }
public void SetUp() { this.xsdParser = new XsdParser(); xmlParseActivityParser = new XmlParseActivityParser(xsdParser); var xml = @"<pd:activity name=""Parse Equity"" xmlns:pd=""http://xmlns.tibco.com/bw/process/2003"" xmlns:xsl=""http://w3.org/1999/XSL/Transform""> <pd:type>com.tibco.plugin.xml.XMLParseActivity</pd:type> <config> <inputStyle>text</inputStyle> <term ref=""pfx4:EquityRecord""/> </config> <pd:inputBindings> <sqlParams> <xsl:value-of select=""testvalue""/> </sqlParams> </pd:inputBindings> </pd:activity>"; doc = XElement.Parse(xml); }
private void lbDataSets_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems[0] is DataSet selDataSet) { _viewModel.DataTables = XsdParser.GetDataTables(selDataSet.FilePath); _viewModel.Relations = XsdParser.GetRelations(selDataSet.FilePath); CollectionView view = CollectionViewSource.GetDefaultView(lbRelations.ItemsSource) as CollectionView; view.Filter = obj => { var item = obj as Relation; var selectedtables = lbDataTables.SelectedItems.Cast <Models.Table>(); if (selectedtables != null) { return(selectedtables.Where(t => t.Name == item.ParentDataSource).Any() && selectedtables.Where(t => t.Name == item.ChildDataSource).Any()); } return(true); }; } else { _viewModel.DataTables = null; _viewModel.Relations = null; } }
public XsdFileProcessorService(ISourceCodeGeneratorService sourceCodeGeneratorService) { this.sourceCodeGeneratorService = sourceCodeGeneratorService; this.xsdParser = new XsdParser(); }
public MapperActivityBuilder(XslBuilder xslBuilder, XsdBuilder xsdBuilder, XsdParser xsdParser) { this.xslBuilder = xslBuilder; this.xsdBuilder = xsdBuilder; this.xsdParser = xsdParser; }
public XsdParserTests() { parser = new XsdParser(logger.Object); }
public XsdGenerator(string xsdFilePath) { InitializeComponent(); _xDocument = XsdParser.GenerateXmlDictionary(xsdFilePath); tbDictionaryXml.Text = _xDocument.ToString(); }
private void InitCodeCompletionParser() { _xsdParser = new XsdParser(); Task.Run(() => IsCodeCompletion = _xsdParser.TryParse()); }
public XsdBuilder() { this.xsdParser = new XsdParser(); }