[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Add items to a sequence

Subject: Re: Add items to a sequence
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Mar 2023 16:10:55 -0000
Re:  Add items to a sequence
Am 3/24/2023 um 5:02 PM schrieb rick@xxxxxxxxxxxxxx:
>
> I am not sure if I can ask this without giving more context, but I
> have a function that loops through some regular expressions in a
> lookup file and finds matches against a description element. When
> there is a match, I want to return an element from my lookup file. I
> want to return a sequence because there may be more than one regular
> expression match. In my function below, it seems like it is returning
> a flattened sequence instead of a sequence of distinct elements. If
> this isnbt enough context, I can try to mock up a more complete
> example. Thank you.
>
> Rick
>
> <xsl:function name="rq:get-key-codes">
>
> B B B B B B B  <xsl:param name="description" as="xs:string"/>
>
> B B B B B B B  <xsl:param name="report-type" as="xs:string"/>
>
> B B B B B B B  <xsl:iterate
> select="$key-codes/key-codes/record[report[.=$report-type]]">
>
> B B B B B B B B B B B  <xsl:param name="keyword-codes"
as="empty-sequence()"/>
>
> <xsl:on-completion>{$keyword-codes}</xsl:on-completion>
>

Here you don't want a text value template but

 B  <xsl:on-completion select="$keyword-codes"/>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.