OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Even if you're not ... was If you're going to the W3C meet

[ Lists Home | Date Index | Thread Index ]

* Michael Kay <mike@saxonica.com> [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@engrm.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS