On 09/02/2024 02:46, dvint dvint@xxxxxxxxx wrote:
> The performance issue in the first came from running multiple for
> loops on the same content, getting down to one for loop has improved
> the performance.
>
> I agree, I don't understand why changing p to * makes a difference,
> but it does.
>
> I'll give your suggestion a try in the morning.
>
> Content is a bunch of dita topics of varying lengths and complexity -
> technical documentation.B I am trying to get a distinct list of all
> the values in those attributes across all the content and possible
> elements.
>
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
> -------- Original message --------
> From: "Martin Honnen martin.honnen@xxxxxx"
> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> Date: 2/8/24 3:51 PM (GMT-08:00)
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re: Find several different attribute values on many
> elements
>
>
>
> If you just want a flat list of distinct values of all those know
> attributes why not do e.g.
>
> B distinct-values(collection(...)!(.//@audience, .//@platform, .//@props))
>
> If you want to sort them use
>
> B distinct-values(collection(...)!(.//@audience, .//@platform,
> .//@props)) => sort()
I did some test, it seems doing e.g.
distinct-values(collection(...)!(descendant::*!(@foo, @bar, @foobar)))
=> sort()
performs slighly better than the suggestion above.
|