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

Re: Case-insensitive filter match for template wanted

Subject: Re: Case-insensitive filter match for template wanted
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Mar 2017 09:57:07 -0000
Re:  Case-insensitive filter match for template wanted
> So I tried:
> <x:template match="section[ parameter/@name='Rule' ][ upper-case(
parameter/value/@entry ) = 'INPUT' ]" mode="processes" >
>
> But that gives me (using Saxon HE9.7.0.5):
> bA sequence of more than one item is not allowed as the first argument of
upper-case() ("INPUT", .....b

Well you could write

> match="section[ parameter/@name='Rule' ][ parameter/value/upper-case(@entry)
= 'INPUT' ]"

But the "correct" way to do case-insensitive matching is to use a collation:

> match="section[ parameter/@name='Rule' ][ parameter/value@entry = 'INPUT'
]"
> default-collation="http://www.w3.org/2013/collation/UCA?strength=2"

It depends a bit about whether you care what happens to characters like
"dotless i" (which probably aren't going to appear in your input unless you
are Turkish).


Michael Kay
Saxonica

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.