cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <>
Subject [FORMS] overriding default stylesheets
Date Fri, 24 Dec 2004 13:37:56 GMT
Does anyone have an elegant solution for overriding the default
stylesheets.  Basically I don't want to modify the sample stylesheets,
because I still want to these to be used as is for most of my forms. 
I want to be able to specify somehow that the xsl can be overridden,
but isn't by default.  This is the solution I came up with, but it's
not working.  Perhaps someone can help me figure out why or maybe
point me in a different direction...

      <!-- in this example, we'll say {1} is test -->
      <map:match pattern="forms/task/*-display">
        <map:select type="resource-exists">
          <map:when test="resources/forms-samples-styling-{1}.xsl">
src="resources/forms-samples-styling-{1}.xsl" label="debug3"/>
            <map:transform src="resources/forms-samples-styling.xsl"/>

This part seems to be working ok...

I changed the following line:
  <xsl:include href="forms-page-styling.xsl"/>
  <!-- If I do get this working, a parameter would probably work
        better than the hard-coded "test", then this whole thing
        can probably be generic -->
  <xsl:include href="forms-page-styling-test.xsl"/>

  <xsl:import href="forms-page-styling.xsl"/>

  <xsl:template match="fi:group[fi:styling/@layout='columns']"
    <table border="0" summary="{fi:hint}">
          <xsl:apply-templates select="fi:items/*"

It's this last step that isn't working.  I'm relatively new to xsl,
but I thought the import makes the stylesheet function the same as the
imported stylesheet except for what you override, but this is the part
that's broken because nothing is being transformed at all.

Any ideas?

Thanks and Merry Christmas Eve,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message