From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5e:a61a:: with SMTP id q26mr203528ioi.29.1545349174813; Thu, 20 Dec 2018 15:39:34 -0800 (PST) X-Received: by 2002:a9d:da3:: with SMTP id 32mr2309ots.3.1545349174698; Thu, 20 Dec 2018 15:39:34 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no17354itb.0!news-out.google.com!v141ni30ita.0!nntp.google.com!q69no17352itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 20 Dec 2018 15:39:34 -0800 (PST) In-Reply-To: <62da32c9-61b7-4ed1-afdf-9319eff5fe8a@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.28; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.28 References: <62da32c9-61b7-4ed1-afdf-9319eff5fe8a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: AWS template documentation help From: Shark8 Injection-Date: Thu, 20 Dec 2018 23:39:34 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:55089 Date: 2018-12-20T15:39:34-08:00 List-Id: On Thursday, December 20, 2018 at 3:35:43 PM UTC-7, Michael Hardeman wrote: > Running this code: >=20 > Templates.Set_Tag_Separators (Start_With =3D> "'@", Stop_With =3D> "/"); > Templates.Insert (Translations, Templates.Assoc ("foo", "'bar/baz")); > Put_Line (Templates.Translate ("test '@foo/one/two/three' test", Translat= ions)); >=20 > Yields the following error: >=20 > raised TEMPLATES_PARSER.TEMPLATE_ERROR : Unknown attribute name "@foo" >=20 > I expected it to print: >=20 > test 'bar/baz/one/two/three' test >=20 > If I remove the initial ' in Start_With it works ok, but if I keep the ' = I get this strange error. I assume there might be some undocumented feature= for the templates, but I can't find anything having to do with "attribute"= . Does anyone know what this is? Well, first let's simplify. Try replacing the tag-separators with something= unique: Templates.Set_Tag_Separators (Start_With =3D> "[[", Stop_With =3D> "]]"); and matching alterations in the translation: Put_Line (Templates.Translate ("test '[[foo]]/one/two/three' test", Transl= ations)); See if that helps. (Sorry, I don't currently have AWS installed on this computer.)