F
Frank O'Hara
Hello, I'm very new to XML/XSLT but from what I've seen I really like
it.
I've decided to give XML/XSLT a try for some new development work to
see if it will simply things going forward.
I'm building a 'report generation wizard' for an in-house
application. There isn't much to is but it's meant to help users
walk
through the process a little. I'd like to represent the report
generation data (and C# object) using XML so we can use the model for
our other implementations and just modify the XSLT each time.
The page basically has a few drop down lists, some report filters and
an execute button. The drop down lists are dependent on one another
to an extent. The selection from the first, Report Category (RC),
drives the data from the second, Report Type (RT), which ultimately
determines which filters (FTR) are available and also drives a 3rd
drop down list, Output Format (OF).
The code in the page manages the population of this data dynamically
using XMLHTTP and users have the option to save their report
generation templates for future use. These templates can be edited
at
a later time and herein lies my problem,.
I'm going to have a ReportTemplate class that is going to be
represented by XML. The idea is that when a user wants to edit their
template the XML will just be loaded and transformed into the wizard.
Only the values for RC,RT,FTR,OF are going to be contained in the XML
document.
So my question is, how do I populate my drop down lists? I was
thinking about putting all the options from the drop down lists in
the
XML document and having the ones that belong to the ReportTemplate
class have an attribute "Selected=true" but I don't like that idea
because then the XML document contains information about the
implementation. The other idea was to populate the drop down lists
before transforming the XML and just using the XML data to determine
which value to 'select' in the drop down lists.
Is there a 'standard' method for doing this? The idea is to make the
solution as generic as possible so that this XML/XSLT can be used for
other implementations where things may be slightly different.
Thanks,
Frank
it.
I've decided to give XML/XSLT a try for some new development work to
see if it will simply things going forward.
I'm building a 'report generation wizard' for an in-house
application. There isn't much to is but it's meant to help users
walk
through the process a little. I'd like to represent the report
generation data (and C# object) using XML so we can use the model for
our other implementations and just modify the XSLT each time.
The page basically has a few drop down lists, some report filters and
an execute button. The drop down lists are dependent on one another
to an extent. The selection from the first, Report Category (RC),
drives the data from the second, Report Type (RT), which ultimately
determines which filters (FTR) are available and also drives a 3rd
drop down list, Output Format (OF).
The code in the page manages the population of this data dynamically
using XMLHTTP and users have the option to save their report
generation templates for future use. These templates can be edited
at
a later time and herein lies my problem,.
I'm going to have a ReportTemplate class that is going to be
represented by XML. The idea is that when a user wants to edit their
template the XML will just be loaded and transformed into the wizard.
Only the values for RC,RT,FTR,OF are going to be contained in the XML
document.
So my question is, how do I populate my drop down lists? I was
thinking about putting all the options from the drop down lists in
the
XML document and having the ones that belong to the ReportTemplate
class have an attribute "Selected=true" but I don't like that idea
because then the XML document contains information about the
implementation. The other idea was to populate the drop down lists
before transforming the XML and just using the XML data to determine
which value to 'select' in the drop down lists.
Is there a 'standard' method for doing this? The idea is to make the
solution as generic as possible so that this XML/XSLT can be used for
other implementations where things may be slightly different.
Thanks,
Frank