You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andrew <an...@gmail.com> on 2006/07/19 12:19:57 UTC

forms-field-styling.xsl jar classpath

Hi,
from my understanding forms-field-styling.xsl is part of a jar in the class
path (<xsl:include href="resource://org/apache/cocoon/forms/resources/forms-
advanced-field-styling.xsl"/>)? I need to gain access to
forms-field-styling.xsl so that I can change the following lines from:

    <xsl:if test="@required='true'">
      <span class="forms-field-required">*</span>
    </xsl:if>

to:

    <xsl:if test="@required='true'">
      <span class="forms-field-required"><img src="images/plus.gif"
border="0" /></span>
    </xsl:if>

Do I access the jar directly, if so where is the jar located?, or is there a
source from which forms-*-.xsl files are made up from which I should edit
instead?

regards

Andrew

Re: forms-field-styling.xsl jar classpath

Posted by Andrew <an...@gmail.com>.
Hi Simone,
so a simple:

.forms-field-required {
width: 8px;
height: 14px;
margin-right: 0px;
background-image:url("images/plus.gif");
background-repeat:no-repeat;
}

will do the trick! Nice! You will need to update your docs as the class, and
not span, name associated with required-mark is now .forms-field-required

regards

Andrew


On 19/07/06, Simone Gianni <s....@thebug.it> wrote:
>
> Hi Andrew,
> i did a lot of CSS work in the XSLTs for 2.1.9, you can find my
> documentation here :
> http://cocoon.zones.apache.org/daisy/documentation/864/forms/g1/1147.html
> . I also recommend reading the XSLT page :
> http://cocoon.zones.apache.org/daisy/documentation/864/forms/g1/485.html
>
> Simone
>
> Andrew wrote:
>
> > Jason,
> >
> >
> >     In your case you could also avoid XSL changes altogether and use CSS
> >     image replacement to show your image in place of the asterisk.
> >
> >
> > very good idea! I like that a lot.
> >
> > regards
> >
> > Andrew
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >     <ma...@cocoon.apache.org>
> >     For additional commands, e-mail: users-help@cocoon.apache.org
> >     <ma...@cocoon.apache.org>
> >
> >
> --
> Simone Gianni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: forms-field-styling.xsl jar classpath

Posted by Simone Gianni <s....@thebug.it>.
Hi Andrew,
i did a lot of CSS work in the XSLTs for 2.1.9, you can find my
documentation here :
http://cocoon.zones.apache.org/daisy/documentation/864/forms/g1/1147.html
. I also recommend reading the XSLT page :
http://cocoon.zones.apache.org/daisy/documentation/864/forms/g1/485.html

Simone

Andrew wrote:

> Jason,
>
>
>     In your case you could also avoid XSL changes altogether and use CSS
>     image replacement to show your image in place of the asterisk.
>
>
> very good idea! I like that a lot.
>
> regards
>
> Andrew
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <ma...@cocoon.apache.org>
>     For additional commands, e-mail: users-help@cocoon.apache.org
>     <ma...@cocoon.apache.org>
>
>
-- 
Simone Gianni

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: forms-field-styling.xsl jar classpath

Posted by Andrew <an...@gmail.com>.
Jason,

>
> In your case you could also avoid XSL changes altogether and use CSS
> image replacement to show your image in place of the asterisk.


very good idea! I like that a lot.

regards

Andrew

---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Re: forms-field-styling.xsl jar classpath

Posted by Jason Johnston <co...@lojjic.net>.
Andrew wrote:
> Hi,
> from my understanding forms-field-styling.xsl is part of a jar in the 
> class path (<xsl:include 
> href="resource://org/apache/cocoon/forms/resources/forms-advanced-field-styling.xsl"/>)? 
> I need to gain access to forms-field-styling.xsl so that I can change 
> the following lines from:
> 
>     <xsl:if test="@required='true'">
>       <span class="forms-field-required">*</span>
>     </xsl:if>
> 
> to:
> 
>     <xsl:if test="@required='true'">
>       <span class="forms-field-required"><img src="images/plus.gif" 
> border="0" /></span>
>     </xsl:if>


FWIW, I've found that keeping around modified versions of the 
forms-*-styling.xsl files just leads to headaches, as with every upgrade 
you have to merge in all your changes and it becomes very messy.

What I've started doing instead is, in my equivalent of 
forms-samples-styling.xsl, simply add templates that override those in 
the imported files to apply my custom stylings.

In your case you could also avoid XSL changes altogether and use CSS 
image replacement to show your image in place of the asterisk.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Betr.: Re: Betr.: forms-field-styling.xsl jar classpath

Posted by Andrew <an...@gmail.com>.
Hi Peter,

> Just curious: why do you need a rebuild? You can just copy them and hack
> away. Use forms-samples-styling.xsl from the forms samples as a starting
> point
>

I was under the impression, so information I have read leads me to believe,
that resource://org/apache/cocoon/forms/resources/x.xsl tresolves to files
in the java class path and that these files are jar'd during the build
process?!?, and as Jason said, the last thing you want to do, especially
taking into consideration future migration, is hack away at these files.

regards

Andrew

Betr.: Re: Betr.: forms-field-styling.xsl jar classpath

Posted by Pe...@mediacenter.nl.



Hi Andrew

Just  curious: why do you need a rebuild? You can just copy them and hack
away. Use forms-samples-styling.xsl from the forms samples as a starting
point

Andrew <an...@gmail.com> wrote on 19-07-2006 13:55:20:

> Peter,
> many thanks for that. Another rebuild..Joy of joys! ;-)
>
> regards
>
> Andrew

> On 19/07/06, Peter.Urbanus@mediacenter.nl <Peter.Urbanus@mediacenter.nl
> > wrote:
> Andrew <an...@gmail.com> wrote on 19-07-2006 12:19:57:
>
> > Hi,
> > from my understanding forms-field-styling.xsl is part of a jar in
> > the class path (<xsl:include href="resource:
> > //org/apache/cocoon/forms/resources/forms-advanced-field-styling.
> > xsl"/>)? I need to gain access to forms-field-styling.xsl so that I
> > can change the following lines from:
> >
> >     <xsl:if test="@required='true'">
> >       <span class="forms-field-required">*</span>
> >     </xsl:if>
> >
> > to:
> >
> >     <xsl:if test="@required='true'">
> >       <span class="forms-field-required"><img src="images/plus.gif"
> > border="0" /></span>
> >     </xsl:if>
> >
> > Do I access the jar directly, if so where is the jar located?, or is
> > there a source from which forms-*-.xsl files are made up from which
> > I should edit instead?
> >
> > regards
> >
> > Andrew
> >
>
> Hi Andrew
>
> The source is in src/blocks/forms/java/org/apache/cocoon/forms/resources
>
> Regards.,
> Peter Urbanus

Betr.: Re: Betr.: forms-field-styling.xsl jar classpath

Posted by Pe...@mediacenter.nl.



Sorry, I missed Jason's reply. Listen to Jason!

Greetings,
Peter Urbanus

Re: Betr.: forms-field-styling.xsl jar classpath

Posted by Andrew <an...@gmail.com>.
Peter,
many thanks for that. Another rebuild..Joy of joys! ;-)

regards

Andrew

On 19/07/06, Peter.Urbanus@mediacenter.nl <Pe...@mediacenter.nl>
wrote:
>
> Andrew <an...@gmail.com> wrote on 19-07-2006 12:19:57:
>
> > Hi,
> > from my understanding forms-field-styling.xsl is part of a jar in
> > the class path (<xsl:include href="resource:
> > //org/apache/cocoon/forms/resources/forms-advanced-field-styling.
> > xsl"/>)? I need to gain access to forms-field-styling.xsl so that I
> > can change the following lines from:
> >
> >     <xsl:if test="@required='true'">
> >       <span class="forms-field-required">*</span>
> >     </xsl:if>
> >
> > to:
> >
> >     <xsl:if test="@required='true'">
> >       <span class="forms-field-required"><img src="images/plus.gif"
> > border="0" /></span>
> >     </xsl:if>
> >
> > Do I access the jar directly, if so where is the jar located?, or is
> > there a source from which forms-*-.xsl files are made up from which
> > I should edit instead?
> >
> > regards
> >
> > Andrew
> >
>
> Hi Andrew
>
> The source is in src/blocks/forms/java/org/apache/cocoon/forms/resources
>
> Regards.,
> Peter Urbanus
>

Betr.: forms-field-styling.xsl jar classpath

Posted by Pe...@mediacenter.nl.



Andrew <an...@gmail.com> wrote on 19-07-2006 12:19:57:

> Hi,
> from my understanding forms-field-styling.xsl is part of a jar in
> the class path (<xsl:include href="resource:
> //org/apache/cocoon/forms/resources/forms-advanced-field-styling.
> xsl"/>)? I need to gain access to forms-field-styling.xsl so that I
> can change the following lines from:
>
>     <xsl:if test="@required='true'">
>       <span class="forms-field-required">*</span>
>     </xsl:if>
>
> to:
>
>     <xsl:if test="@required='true'">
>       <span class="forms-field-required"><img src="images/plus.gif"
> border="0" /></span>
>     </xsl:if>
>
> Do I access the jar directly, if so where is the jar located?, or is
> there a source from which forms-*-.xsl files are made up from which
> I should edit instead?
>
> regards
>
> Andrew
>

Hi Andrew

The source is in src/blocks/forms/java/org/apache/cocoon/forms/resources

Regards.,
Peter Urbanus