Where to use XML/XSLT in my .Net Project

Help
JeffPGMT
2011-02-23
2012-10-08
  • JeffPGMT
    JeffPGMT
    2011-02-23

    The project will query SQL data from a few sources, then use an XML and/or
    XSLT to build an output XML file.

    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 file such as...
    ...this pseudo example....
    <Control>
    <TXLife>
    <Obj_Name>Policy</Obj_Name>

    <Obj_Complex>1</Obj_Complex>

    <Obj_Attribute value="1">tc</Obj_Attribute>
    <Parent_Name>Olife</Parent_Name>

    <Obj_Elements>PolicyAmount,Term,Modal</Obj_Elements>

    <Source_ResultNV sc="uPolAmount">PolicyAmount</Source_ResultNV>
    <Source_ResultNV sc="uPolYears">Term</Source_ResultNV>
    <Source_ResultNV sc="uPmtMode">PremiumModal</Source_ResultNV>
    </Obj_Name>
    ...etc for each simple or complex element
    </TXLife>
    </Control>
    The project will then build the XML based on the above and any changes to the
    control file will (if all is well) result in a different result XML file.

    I suppose that my question is if this 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...

     
  • Michael Kay
    Michael Kay
    2011-02-23

    I'm afraid there's really not enough detail here to advise you. Also it's not
    really a Saxon-specific question - it would be better asked on a general XSLT
    forum such as the xsl-list at mulberrytech,com. It sounds like a perfectly
    reasonable avenue to pursue.