Version 4

    1. Parse XSL Template


    Smooks editor use the Dom4j to parse the XSL file or fragment contents to get the XML DOM model and mapping those XML DOM model to the Smooks XML Model.

    XSLModelAnalyzer analyzer = new XSLModelAnalyzer();
    String xslContents = "<xsl:stylesheet xmlns:xsl = \"\"/>";
    // the second param is the element's name which will be ignore
    // And the ignore element will be add into the "relatedXSLNode" list of its parent node
    TagObject smooksXMLModel = analyzer.parse(xslContents , String[]{"value-of"});


    The XSLModelAnalyzer also can use the file path to be the parameter to parse the file.


    Why use the Smooks XML Model ?


    Because in Smooks editor , the Smooks XML Model can be shown on Smooks graphical viewer easily and


    2. Generate XSL Template


    Acutally , In Smooks editor , Generating XSL template contents is just SAVE the Smooks XML Model :


    // TODO

    3. Display/Edit XSL Model in Smooks Editor

    // TODO