Hi good folks of Axkit, I've been using axkit for a couple of years now and am planning to migrate from XPathScript to XSLT. I had to add a bunch of features to XPathScript to get it to give me nested components with their own stylesheets and am just planning out how I can do this using XSLT.
The trouble I am having is trying to get my head around the Stylesheet Choosing mechanisms, in the past I did this outside of Axkit and to be honest it was a bit messy so im trying to figure out what the "best" way is. Firstly, am I right in thinking that the AxStyleChooser only runs once per request? (and not at each segment of the pipe) Secondly, can the StyleChooser only provide the name of the style to use and not the actualy stylesheet file to use? Thirdly, what I would like to do is have some module/code/chooser whatever make a decision about which stylesheet to apply whenever an XSLT stylesheet needs to be applied. Ideally I could say something like, 1. Apply XSP 2. Apply XSLT - goes and checks stylechooser for stylesheet to apply 3. Apply XSLT - goes and checks stylechooser for stylesheet to apply 4. Return to browser Consider the following pipeline 1. 2. 3. 4. |---| |---| |---| |---| |big| |wml| Request - Provider - |xsp| - XSP - |xml| - XSLT - |xml| - XSLT - |htm| - Response |---| |---| |doc| |etc| |---| |---| 1. AxProvider finds the correct XSP file 2. XSP file is executed 3. Common XSLT stylesheet is applied that pulls in other components required for the page (menus etc) making one big xml/xhtml doc 4. Look/feel XSLT stylesheet(s) are applied What im trying to work out is how best to handle stage 3 and 4. There are plenty of different factors that could determine which stylesheet(s) to use. Eg. - Printable version - Localised Country/Sites - ReBranding - User Preference - Browser/Device dependant - Accessibility My concern is where best to make the decision as to which stylesheet(s) need to be applied. The default seems to be to list them one after the other within your XML file as <?xml-stylesheet PIs. This seems awkward because it assumes you know which stylesheets may be applied when you create the XML document. My two options seem to be either A) Find a way to work out which stylesheets to apply and then apply them in the correct order. - Can I use StyleChooser for this? - Is there a funky way to automagically edit the xml enroute to add dynamic <?xml-stylesheet.. Pis? B) Apply all possible stylesheets one after the other, checking within each stylesheet whether it needs to be applied and passing on anything it doesn't recognise. This still means that if I want to change the stylesheets to be applied then I have to re-edit every file again. My feeling is to want to avoid putting the references to the stylesheet files within the XSP/XML files since the data could be useful in many situations so all sorts of stylsheets might need to be applied to the data. Sometimes circumstances might require modifying the pipeline on the fly, adding or removing XSLT processing stages, how would one go about this? Is there a definitive set of documentation on stylesheet choosing and automating the pipeline? I've read all the tutorials I can find. Comments appreciated, Thanks, Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]