[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: NewBie Question - Dynamic XSL
Sure. This is exactly what the <xsl:namespace-alias> mechanism is useful to do. Helps you use XSLT to build XSLT... Consider this example below. Note that the prefix "x" is being used where you normally (by convention) use "xsl" as the prefix, and the "xsl" prefix is used for the literal elements that you want in the transformed output to be in the xsl stylesheet. <x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="anything"> <x:output method="xml" indent="yes"/> <x:namespace-alias stylesheet-prefix="xsl" result-prefix="x"/> <x:template match="/"> <xsl:stylesheet> <xsl:template match="/"> <xsl:value-of select="foo"/> </xsl:template> </xsl:stylesheet> </x:template> </x:stylesheet> ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager Business Components for Java Dev't Team, Oracle Corporation ----- Original Message ----- From: "Simon Taylor3" <Simon.Taylor3@xxxxxxxxxxxxxxxxx> To: <xsl-list-digest@xxxxxxxxxxxxxxxx> Sent: Wednesday, March 08, 2000 2:42 AM Subject: NewBie Question - Dynamic XSL | Hello All | I'm very new to XML/XSL so please forgive any ignorance !! | | Has anyone ever attempted or know if its possible to dynamically build XSL | style sheets on the fly ? | | I'm trying to build an application that has a XML document that is static. To | achieve presentation of the XML I'm wanting to use XSL but instead of having a | standard static XSL stylesheet I'm wanting to connect to a database that is | going to record user preferences and based on these, vary the content of the | XSL stylesheet, hence varying the presentation of the XML. | | My backgrounds very much in ASP's and COM objects so as you can imagine I'm | looking for some approach that mirrors this........ | | Any ideas even a NO cannot be done would be appreciated | | Be lucky | Simon. | | | XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list | 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
|