Ok, by adding the select tags where you indicate I get what I want.  But I
don't quite understand why.  Why would another match on the same tag be
allowed to execute.  I don't completely know what this:

<xsl:apply-templates />

does.  It seems like it says, look for any other matches like the one I
just trapped and executed. Right?

Also, I added the template you gave me in just an arbitrary xsl file, so
why is it that that the location of the widget in the html does not change.
I have a hard time understanding how the location of the things that appear
on the html page are associated the location of the xsl.  If I move things
around in item-view.xsl, things will move around on the html page, but this
is not always the case.




On Wed, Oct 10, 2012 at 1:31 PM, helix84 <[email protected]> wrote:

> On Wed, Oct 10, 2012 at 7:19 PM, Jose Blanco <[email protected]> wrote:
> > helix, after experimenting with this a bit more, I see that if I leave
> out
> > the apply-template, the label completely replaces the select, but if I
> leave
> > it in, the select widget is removed and the options are output
>
> Yes, just like I wrote here:
>
> On Wed, Oct 10, 2012 at 5:20 PM, helix84 <[email protected]> wrote:
> > Notice that the apply-templates call inserts what would normally be
> > inserted there and we insert the label BEFORE the contents. If you
> > leave out apply-templates, you will REPLACE the contents with the
> > label. Try both, just to see what it does.
>
>
>
> > - on the
> > browser it looks like this:
> >
> > Sort by: Sort By: deposit date issue date title
>
> It's possible that by overriding match="dri:field" with a more
> specific template match="dri:field[@id='something']" we probably lost
> the part of HTML output where the <select> tag is generated.
>
> You didn't say which template your template is based on. Look up
> <xsl:template match="dri:field"> in it and use its contents in your
> template.
>
> Alternatively, you can simplify it with something like this (wrapping
> the contents into "select" tags, this should give you the idea):
>
> <xsl:template name="add_label-sort_by"
>
> match="dri:field[@id='aspect.artifactbrowser.ConfigurableBrowse.field.sort_by']">
>     <label>
>         <xsl:attribute name="for">sort_by</xsl:attribute>
>         <xsl:attribute name="style">display:none</xsl:attribute>
>         Sort By:
>     </label>
>     <select>
>         <xsl:apply-templates />
>     </select>
> </xsl:template>
>
> Regards,
> ~~helix84
>
>
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to