posted 18 years ago
Hi all I am trying to solve the below scenario. Please help me at least with a starting idea or some pseudo code for the following:
For a simple example, I have an access database which has 2 columns:
Let's say one column is InputXML and other column is OutputXML that we want.
This contains the mapping rules.
The table structure is as follows:
INPUTXML OUTPUTXML
Fname First Name
Lname Last Name
So basically Fname in input XML should be changed to First Name in output XML. So the database just has the mapping rules for the transformation and not the values.
Now the task is to create an application that has a button called GENERATE XSLT . On clicking this button, it should dynamically generate the XSLT taking the mapping rules from the database. In other words instead of hardcoding the XSLT , based on the DB mapping rules like Fname to FirstName etc, it should just generate the code for XSLT in a txt file or XSL file, which is the code which does the transformation.
So basically an XSLT code generator should be written.
Someone said there is a function call or API which generates the xslt template, I just have to define the relationships among them using values from DB. Not even sure what this means.
Any help on how to approach solving this problem or an idea would be great, I am learning XML/XSLT. If any pseudo code is available , please post.
If you are aware of the API by any chance, please let me know as it will save me some searching time.
Thanks,
Sdee