[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Even if you're not ... was If you're going to the W3C meet


taskdef junit
* Michael Kay <mike@s...> [2005-01-29 11:17]:
> >     This is a general problem I'm having, how do you create hooks,
> >     callbacks, er, how do you create an XSLT framework? 

> One answer is to run XSLT tasks under the control of a pipeline
> processor such as Orbeon.

> OK, it's yet another tool to master, and we all have our limits
> somewhere...

    That's nice. I'm writing a pipeline processor that makes heavy
    use of Saxon.

    A pipeline processor doesn't seem quite right, because, taking
    the project definition to Ant example, it seems like a hook
    could be defined as an extra mode to run through.

    <project name="${project-definition/name}" default="default">

      for each mode in (javac, javac, javacc, antlr, jython, jar, dist)

        <xsl:apply-templates select="project-definition" mode="$mode"/>

    </project>

    That's pseudo code.

    Maybe a good method is to have the user select their modes by
    definining a style sheet?

    <xsl:stylesheet>

      <xsl:import href="xslt/taskdef/javac.xslt"/>
      <xsl:import href="xslt/taskdef/junit.xslt"/>
      <xsl:import href="xslt/taskdef/javacc.xslt"/>
      <xsl:import href="xslt/taskdef/antlr.xslt"/>
      <xsl:import href="xslt/taskdef/jython.xslt"/>

      <xsl:template match="project-definition">
        <xsl:apply-templates select="." mode="taskdef.javac"/>
        <xsl:apply-templates select="." mode="taskdef.junit"/>
        <xsl:apply-templates select="." mode="taskdef.jython"/>
        <xsl:apply-templates select="." mode="taskdef.antlr"/>
        <xsl:apply-templates select="." mode="taskdef.jython"/>
      </xsl:template>

    </xsl:stylesheet>

    Framework might have been too strong a word. I guess, if I have
    Ant, I have a pipeline, though not as fancy as Oberon.

    And I suppose I could add a task definition section to the
    project file, and use that to generate the above template file.

--
Alan Gutierrez - alan@e...

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.