[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Where (how) to use XML/XSLT in my .Net Project
C# ASP.Net 3.5 (2008) XSLT 2.0 developed: SaxonicaHE, production: SaxonPE MSSQL XML Accord Standard, <TXLife/>, <TXLifeRequest/> The project will query SQL data from a few data sources, then use an XML and/or XSLT to build an output XML file. Later on the same XML will be sent to a webservice. The project's code will not know how to build the output file, instead it will rely on an XML/XSLT control file to tell it what to do. My dilemma lies in that I'm not sure if I should have the control file be an XML, XSLT or ?? Below is a possible avenue using XML to instruct the c#.Net project what nodes need to be constructed and where to map the data. ...this pseudo example.... <Control> <TXLife> <Obj_Name>Policy</Obj_Name> <!-- comment: 1=true, 0=false --> <Obj_Complex>1</Obj_Complex> <!-- comment: attribute value 1=term, 2=Disability, 3=..... --> <Obj_Attribute value="1">tc</Obj_Attribute> <Parent_Name>Olife</Parent_Name> <!-- comment: Object Elements... --> <Obj_Elements>PolicyAmount,Term,Modal</Obj_Elements> <!-- comment: Source/Result Name/Value Pair mapping --> <Source_ResultNV sc="uPolAmount">PolicyAmount</Source_ResultNV> <Source_ResultNV sc="uPolYears">Term</Source_ResultNV> <Source_ResultNV sc="uPmtMode">PremiumModal</Source_ResultNV> </Obj_Name> <Obj_Name...etc for each simple or complex element /> </TXLife> </Control> The project will then build the result XML based on the above and any subsequent additions/changes to the control file, will (if all is well) result in a different result XML file, with no need to change the c# code. I suppose that my question is if a control XML file is a good direction or if XSLT can do it all, map data into the XML output and not rely on my c# .Net code to know how to form or map the data into the result XML. TIA JeffPGMT...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|