[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

Subject: Re: Is it possible to write an XSLT program that outputs an XSLT program that outputs an XSLT program?
From: "David Carlisle d.p.carlisle@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Jul 2023 16:58:43 -0000
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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.