You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by EP...@upstate.com on 2003/01/16 20:41:04 UTC

JSL questions

I am trying to convert the .dvsl to .jsl file for merging web.xml for
cactus.

Now, my web.xml is empty and looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>

<web-app>

  <!-- Empty web.xml to use when the user project does not provide a
web.xml.
       We need a web.xml in order to perform the merge with our web.xml
       DVSL template. See plugin.jelly. -->

</web-app>

in my plugin.jelly, I have:
    <doc:jsl
 
input="c:\java\maven\plugins\maven-cactus-plugin-1.2-SNAPSHOT/conf/web.xml"
 
output="C:\java\jakarta-turbine-maven\src\plugins-build\cactus\sample/target
/cactus/maven-cactus-sample/WEB-INF/web.xml"
 
stylesheet="c:\java\maven\plugins\maven-cactus-plugin-1.2-SNAPSHOT/conf/web.
xml.jsl"
        omitXmlDeclaration="false"
        outputMode="xml"
        prettyPrint="true"
    />


and my web.xml.jsl is:
<?xml version="1.0"?>

<jsl:stylesheet
  select="$doc"
  xmlns:j="jelly:core"
  xmlns:jsl="jelly:jsl"

  xmlns:doc="doc"
  trim="false">

  <jsl:template match="*">
    <web-app>
      <filter>
          <filter-name>FilterRedirector</filter-name>
 
<filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
      </filter>
    </web-app>

  </jsl:template>
</jsl:stylesheet>

However, I don't get a resulting output file (or even an error when I run
things!)  What am I doing wrong?  And are there other resources about JSL
other then the tag reference on the website.  I noticed the old demo doesn't
seem to exist anymore (maven demo:jsl).

Eric Pugh

Re: JSL questions

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Eric

I don't see what the <doc:jsl> tag does in your plugin.jelly, so I'm having
a hard time seeing whats wrong. Everything else looks fine. BTW it might be
worth outputting the ${doc} variable in your web.xml.jsl script, just to see
if its setup correctly.

James
-------
http://radio.weblogs.com/0112098/

----- Original Message -----
From: <EP...@upstate.com>
> I am trying to convert the .dvsl to .jsl file for merging web.xml for
> cactus.
>
> Now, my web.xml is empty and looks like this:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <web-app>
>
>   <!-- Empty web.xml to use when the user project does not provide a
> web.xml.
>        We need a web.xml in order to perform the merge with our web.xml
>        DVSL template. See plugin.jelly. -->
>
> </web-app>
>
> in my plugin.jelly, I have:
>     <doc:jsl
>
>
input="c:\java\maven\plugins\maven-cactus-plugin-1.2-SNAPSHOT/conf/web.xml"
>
>
output="C:\java\jakarta-turbine-maven\src\plugins-build\cactus\sample/target
> /cactus/maven-cactus-sample/WEB-INF/web.xml"
>
>
stylesheet="c:\java\maven\plugins\maven-cactus-plugin-1.2-SNAPSHOT/conf/web.
> xml.jsl"
>         omitXmlDeclaration="false"
>         outputMode="xml"
>         prettyPrint="true"
>     />
>
>
> and my web.xml.jsl is:
> <?xml version="1.0"?>
>
> <jsl:stylesheet
>   select="$doc"
>   xmlns:j="jelly:core"
>   xmlns:jsl="jelly:jsl"
>
>   xmlns:doc="doc"
>   trim="false">
>
>   <jsl:template match="*">
>     <web-app>
>       <filter>
>           <filter-name>FilterRedirector</filter-name>
>
> <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
>       </filter>
>     </web-app>
>
>   </jsl:template>
> </jsl:stylesheet>
>
> However, I don't get a resulting output file (or even an error when I run
> things!)  What am I doing wrong?  And are there other resources about JSL
> other then the tag reference on the website.  I noticed the old demo
doesn't
> seem to exist anymore (maven demo:jsl).
>
> Eric Pugh
>

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com