bob mcwhirter wrote:

Seems like site.jelly is causing the pains wrt <j:if>.

Who's familiar with it?

-bob


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Hello Bob,
I am currently working on this stuff. Sorry, that it takes quite longer then I expected, but my company is pushing me hard right now in another project :-(
Anyway, I want a separation between the jsl stylesheet (site.jelly) and the plugin.jelly. Anyway, currently I am discussing if this is possible at all with James. Since this approach is different from the one Aleksei is taking, I definitly need a different plugin.jelly. Please find this attached. Probably somebody can help me there?
Please note, that this is by far not finished yet.

Regards,

Markus
<?xml version="1.0"?>

<project 
  xmlns:j="jelly:core" 
  xmlns:define="jelly:define"
  xmlns:jellyxdoc="jxdoc"
  xmlns:x="jelly:xml"  
  xmlns:ant="jelly:jeez">

  <!-- ================================================================== -->
  <!-- L I C E N S E                                                      -->
  <!-- ================================================================== -->

  <goal name="jxdoc"
    description="Generate a xml file from your license.txt"
    prereqs="jxdoc:transform"/>
        
  <goal name="jxdoc:init-tag">
      <define:taglib uri="jxdoc"/>
  </goal>
  
  <goal name="jxdoc:transform" prereqs="jxdoc:init-tag"
    description="Transform anakia xml files to html using jelly">
        
    <!-- Create a file scanner over the tempates -->

    <ant:fileScanner var="inFiles">
      <ant:fileset dir="${maven.jxdoc.doc.dir}">
        <ant:include name="**/*.xml"/>
      </ant:fileset>
    </ant:fileScanner>

    <j:forEach var="inFile" items="${inFiles.iterator()}">
        
        <x:parse xml="file://${inFile}" var="doc"/>
        
        <jsl:stylesheet var="out" select="${doc}" 
stylesheet="${plugin.dir}/site.jelly"/>
    
        Out:${out}
    
    </j:forEach>
      
  </goal>

  <goal
    name="jxdoc:generate-from-pom"
    description="Generates xdocs for site based on project descriptor">

    <j:set var="templateDir" value="${plugin.dir}/templates"/>

    <!-- Create a file scanner over the tempates -->

    <fileScanner var="inFiles">
      <fileset dir="${templateDir}">
        <include name="**/*.xml"/>
      </fileset>
    </fileScanner>

    <!-- Instantiate each template -->
    <j:new var="mapper"
className="org.apache.tools.ant.util.GlobPatternMapper"/>
    <j:setProperties object="${mapper}" from="${templateDir}/*.xml"
to="${maven.gen.docs}/*.xml"/>

    <j:new var="dirMapper"
className="org.apache.tools.ant.util.GlobPatternMapper"/>
    <j:setProperties object="${dirMapper}" from="${templateDir}*"
to="${maven.gen.docs}*"/>

    <j:forEach var="inFile" items="${inFiles.iterator()}">

      <j:set var="outFile"
value="${mapper.mapFileName(inFile.path).0}"/>

      <j:set var="outDir"
value="${dirMapper.mapFileName(inFile.parent).0}"/>
      <mkdir dir="${outDir}"/>
        
      <j:file var="outFile" encoding="${maven.docs.outputencoding}"
prettyPrint="true">

        <j:include uri="file://localhost/${inFile}" inherit="true"/>
      </j:file>
    </j:forEach>

  </goal>

</project>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to