comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: AWS template documentation help
Date: Thu, 20 Dec 2018 15:39:34 -0800 (PST)
Date: 2018-12-20T15:39:34-08:00	[thread overview]
Message-ID: <dd98b4d4-6f81-481d-96f5-dc7beac12a65@googlegroups.com> (raw)
In-Reply-To: <62da32c9-61b7-4ed1-afdf-9319eff5fe8a@googlegroups.com>

On Thursday, December 20, 2018 at 3:35:43 PM UTC-7, Michael Hardeman wrote:
> Running this code:
> 
> Templates.Set_Tag_Separators (Start_With => "'@", Stop_With => "/");
> Templates.Insert (Translations, Templates.Assoc ("foo", "'bar/baz"));
> Put_Line (Templates.Translate ("test '@foo/one/two/three' test", Translations));
> 
> Yields the following error:
> 
> raised TEMPLATES_PARSER.TEMPLATE_ERROR : Unknown attribute name "@foo"
> 
> I expected it to print:
> 
> test 'bar/baz/one/two/three' test
> 
> 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 => "[[", Stop_With => "]]");
and matching alterations in the translation:
 Put_Line (Templates.Translate ("test '[[foo]]/one/two/three' test", Translations));

See if that helps.
(Sorry, I don't currently have AWS installed on this computer.)


  reply	other threads:[~2018-12-20 23:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 22:35 AWS template documentation help Michael Hardeman
2018-12-20 23:39 ` Shark8 [this message]
2018-12-21  0:12   ` Michael Hardeman
2018-12-21  0:20     ` Michael Hardeman
2018-12-21  8:16 ` Per Sandberg
2018-12-21  9:35   ` Michael Hardeman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox