[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Outputting literal and 'quoted' tags.
Emiliano <emile@xxxxxxxxxxxxxx> wrote: > Mike Brown wrote: [about generating PHP tags with XSLT] > True, but there are several spots where it gets lots more complex than > this (constructing tables form the input, for example. But point well > taken. Well, letting XSLT generate stuff which is processed by yet another processor usually leads to hacks. The question is: Why do you actually have to set up such a pipeline? If you have only reasonably few values which come from the environment you can try to pass them as parameters to the style sheet and use them there, thereby eliminating the need for post-processing. If there is a lot of stuff which needs to be done by PHP (or ASP/...), why not having the PHP page being the master, invoking the XSL processor and embedding the results where possible and doing everything else by itself? As an example, instead of writing a style sheet like <xsl:stylesheet ...> <xsl:template match="/"> <html><head>... <body> <!-- input form --> <form>...query form which needs postprocessing ... <!-- report generated from XML data --> <apply-templates mode="generate-report"/> </body> ... use a foo.php <html><head>... <body> <!-- input form --> <form>....<?php echo($variable)?>... <!-- report generated from XML data --> <?php // invoke XSLT processor from PHP for formatting ?> </body> ... Still other possibilities are using extension functions to pull values from the environment into the stylesheet or, for Java based processors, customized URI-resolvers (http://www.biglist.com/lists/xsl-list/archives/200107/msg01261.html) Regards J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|