Home
TeamSite
Include XSL file dynamically at Page/Component level?
tech17
Hi,
I have around 50 XSL files, out of which only one should be included in the component based on user input in Datum.
I tried various ways to achieve this but couldn't do it, I cannot include all XSL files in the component otherwise unnecessarily my page will become heavy, when I know I am going to use only 1 XSL at a time.
Can someone provide any inputs if you have faced similar issues in your project.
Thanks.
Find more posts tagged with
Comments
RonaldV
I might be wise to ask this question on a xsl dedicated forum. They might have better answers for this type of question. [and once you have an answer post it here :-)]
Topic_39363__Scatter Plot Grouped_OS_BIRT.rptdesign
Rick Poulin
You can't dynamically set the href for an xsl:include, and you also can't branch with an xsl:if or xsl:choose (it'll just load all of them anyway, if you don't get an error). Bottom line, the only way you can do conditional includes is by using different component skins.
The (possible) alternative is to xsl:include a URL that goes to a Java servlet (or whatever) and returns different XSL depending on what's sent in the HttpServletRequest. It's unlikely you'll be able to pass a datum through that, but there might be a way.. haven't tried it.