This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: AW: exlt set.distinct.template.xsl ?


Thanks Jenni,

for explaining how to handle correctly your templates.

I have begin last july designing with xsl for the frontend of a business
application on my job. Maybe you should consider, to put this part of your
explanation in your how to do page, because i think, i am not the only one,
which have had trouble, to fit all together in a working example. Probably
is enough to illustrate after your sentence, that it shall be used in mode
modus, with  <xsl:template match="node" mode="set:modul"> .The problem often
is that the lenguage involved at this kind of sites, never mind, what is it,
Js, xsl, xhtml, perl, cgi, etc, it´s so specific, that you must learn first
the vocubary, before understanding it.

Thanks for your patience,

Hans Braumüller
Mail Art not War
http://crosses.net


> -----Ursprüngliche Nachricht-----
> Von: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]Im Auftrag von Jeni
> Tennison
> Gesendet: Freitag, 15. März 2002 11:32
> An: Braumüller, Hans
> Cc: 'xsl-list@lists.mulberrytech.com'
> Betreff: Re: AW: [xsl] exlt set.distinct.template.xsl ?
> 
> 
> Hi Hans,
> 
> > to the transformation stylesheet set.distinct.1.xsl, because i want
> > to customize the output adding an semi-colon (;) and the second
> > adaption was changing copy-of with value-of, to some obtain some
> > output.
> >
> > How can i gain the same result without changing the original
> > template from exslt ?
> 
> Just to explain the design of the set:distinct (and some of the other
> set:*) template...
> 
> You cannot return a node set from an XSLT template. Therefore it's
> impossible for set:distinct to return the 'distinct' nodes. Instead,
> it applies templates to the distinct nodes in 'set:distinct' mode.
> 
> What happens to them then is up to you. By default, as you've seen,
> they get copied. If you want to get their values, then go ahead and
> override the template in set:distinct mode - that's precisely why the
> set:distinct template applies templates to the distinct nodes rather
> than immediately copying them.
> 
> If you simply have a template matching @country attributes in
> set:distinct mode within your stylesheet, then you should get what you
> want:
> 
> <xsl:template match="@country" mode="set:distinct">
>   <xsl:value-of select="." />;
> </xsl:template>
> 
> You don't need to delete the template from the
> set.distinct.template.xsl stylesheet, though - since you're importing
> it, your template will be used in preference to the one that's in the
> utility stylesheet.
> 
> Cheers,
> 
> Jeni
> 
> ---
> Jeni Tennison
> http://www.jenitennison.com/
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]