[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is it possible to write an XSLT program that outpu
On Sun, 2 Jul 2023 at 11:58, Roger L Costello costello@xxxxxxxxx < xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > Hi Folks, > > Years ago I read the source code for the XSLT implementation of > Schematron. From it I learned how to write an XSLT program that outputs an > XSLT program. Since that time I have written a number of XSLT programs that > output XSLT programs. I enjoy writing these kinds of programs. They seem > almost magical. A program that produces a program - wow! > > This week I got to wondering: is it possible to write an XSLT program that > outputs an XSLT program and when the latter is run it outputs another XSLT > program? That is, > > XSLT program #1 --> run --> outputs XSLT program #2 --> run --> outputs > XSLT program #3 --> run --> solves some problem > > Is this even possible in XSLT? Have you ever done this? What types of > problems are suitable for this approach? > > /Roger > <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl=" http://www.w3.org/1999/XSL/Transform" version="3.0"> <xsl:template match="/"> <xsl:copy-of select="doc('')"/> </xsl:template> </xsl:stylesheet> has the useful feature of taking any xml on input and returning an equally useful stylesheet as result.
|
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
|