none
Autogenerate XSL file RRS feed

  • Question

  • I have a mapper utility that map the input XML nodes to another nodes (it doesn't use XSLT). At runtime, it walks the XML nodes and converts it. Glorified node to node converter but not efficient and has a performance barrier that we cannot overcome. The good part is that it writes a definition file that lists inbound XML elements and its corresponding conversion names. I would like to write a tool in .NET, that would read this definition file and auto-generates a XSLT with it. Once it generates the XSLT, I can compile it using XSLTC and include it using reflection in my Web apps for runtime conversions. Any ideas, guidance, suggestions or tools available to make this happen is much appreciated

    Below is an over simplified example

    <order>
    	<order_id>12345</order_id>
    	<customer>Cust1</customer>
    </order>
    


    definition file

    [Header]
    order=customer_order 
    [Fields] 
    order_id=order_number 
    customer=customer_number


    Tool runs the conversion using the definition file and generate the below xml after conversion

    <customer_order>
    	<order_number>12345</order_number>
    	<customer_number>Cust1</customer_number>
    </customer_order>
    


    • Moved by John Saunders Sunday, June 12, 2011 3:18 AM xml q (From:ASMX Web Services and XML Serialization)
    Friday, June 10, 2011 1:27 AM