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

Re: Analyze-string Regex to Match Content within Curly

Subject: Re: Analyze-string Regex to Match Content within Curly Braces
From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 17 Nov 2020 14:59:10 -0000
Re:  Analyze-string Regex to Match Content within Curly
Hi,

<xsl:analyze-string regex="\{.+?\}" interpret-attributes-as-avt="no"> ..

samish as?

<xsl:analyze-string regex-string="\{.+?\}"> ...

whereas the current @regex is a @regex-avt ...

Cheers, Wendell


On Tue, Nov 17, 2020 at 9:31 AM Graydon graydon@xxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Tue, Nov 17, 2020 at 01:57:30PM -0000, Michael Kay mike@xxxxxxxxxxxx
> scripsit:
> > A suggestion that I've thought about from time to time:
> >
> > If an attribute in XSLT expects an expression or an AVT, then a leading
> undoubled "}" in the attribute value indicates that is to be treated as a
> plain string.
> >
> > So for an expression
> >
> > <xsl:param name="x" select="}O'Reilly"/>
> >
> > indicates that the default value is the string "O'Reilly"
> >
> > and in an AVT
> >
> > regex="}[a-z]{4}"
> >
> > indicates that the regex is [a-z]{4}
> >
> > This relies on the fact that neither an AVT nor an expression can
> legally begin with an undoubled "}", nor is it ever likely to. And you can
> think of "}" as meaning "exit expression mode, here is plain text".
> >
> > Nice idea, or just too quirky?
>
> Perhaps more terse than quirky?
>
> Like David, I'd prefer to see switchable AVT interpretation via an
> attribute.  Single leading undoubled close brace is going to look like
> a mistake to my brain.
>
> What's the opposite of template?  "literal" is wrong,
> xsl:analyze-string/@regex still gets interpreted, just differently.
>
> @select-not-template or @regex-not-template as booleans?
>
> --
> Graydon Saunders  | graydonish@xxxxxxxxx
> CC&s oferC)ode, C0isses swC! mC&g.
> -- Deor  ("That passed, so may this.")
>
>


--
...Wendell Piez... ...wendell -at- nist -dot- gov...
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...
...github.com/wendellpiez... ...gitlab.coko.foundation/wendell...

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.