[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] XSLT for Extensibility

Subject: [xsl] XSLT for Extensibility
From: Alan <alan-xsl-list@xxxxxxxxx>
Date: Sat, 29 Jan 2005 13:47:34 -0500

    How does one design in XSLT for extensibility?

    I know how to design an API, but not on in XSLT.

    I'm not sure how to ask the question. So I'll try an example.

    (I'm not really looking for a build solution, but an XSLT as API

    Let's say you have a file that's a project.


    Project directory:

    Use the above to generate an Ant script.

    You could transform the project document into simple javac,
    junit, javadoc, and jar tasks.

    How do you allow the user to plug in new tasks?

    This is a general problem I'm having, how do you create hooks,
    callbacks, er, how do you create an XSLT framework? 


    I asked elsewhere, and pipelines were suggested, so I'll permit
    myself two steps.
    Here's a notion.





    I can transform the above into a script that looks like:


      <xsl:import href="taskdef/javac.xslt"/>
      <xsl:import href="taskdef/javadoc.xslt"/>
      <xsl:import href="taskdef/antlr.xslt"/>
      <xsl:import href="taskdef/jar.xslt"/>

      <xsl:template match="project">

        <project name="foo" default="default">
          <xsl:apply-templates select="." mode="javac"/>
          <xsl:apply-templates select="." mode="javadoc"/>
          <xsl:apply-templates select="." mode="antlr"/>
          <xsl:apply-templates select="." mode="jar"/>



    Then I can use that stylesheet as the the style to transform my
    project into an Ant build file. 

    What other methods are there for creating a a pluggble XSLT

Alan Gutierrez - alan@xxxxxxxxx

Current Thread