Tags:
create new tag
view all tags
There's an increasing need for standardisation of syntax for "end tags". TWikiVariables are frequently used as delimiters for blocks of content - e.g. STARTINCLUDE....STOPINCLUDE, SECTION...ENDSECTION but there is no standardisation for the syntax of end tags, making it impossible to write a general parser for these kinds of constructs.

Some alternatives:

  1. Bastardised XML tags c.f. <verbatim>...</verbatim>.
    • + consistent with <verbatim>
    • - not consistent with anything else
    • - confusion with HTML tags
    • - Personally I think this is really, really, really bad practice, and would like to deprecate <verbatim> in favour of %VERBATIM%
  2. %TAG%...%ENDTAG - Reserve the three characters END at the start of a tag name to refer to a tag that is paired with a matching tag without the END
    • + Consistent with SECTION...ENDSECTION
    • + Simple, intention-revealing
    • - Slight risk of conflict with real words e.g. ENDLESS, ENDEAVOUR, ENDIVE, ENDOMORPHIC
  3. %TAG%...%/TAG%
    • + consistent with XML syntax
    • - not very intention-revealing
    • - not in current use

My personal preference is to standardise on 2.

-- CrawfordCurrie - 31 Oct 2005

Do you like underscores? END_VERBATIM would avoid conflict with END.* words.

-- MartinCleaver - 31 Oct 2005

Having the END at the ... end would avoid that problem:

  • %VERBATIMEND%
  • %TAGEND%
  • %COLOREND%

just match on "%[A-Z][A-Z]*END%"

Somehow the END at the end seems approrate. I don't know if the pun maps to other languages.

-- AntonAylward - 31 Oct 2005


CategoryTWikiSyntax
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-10-31 - AntonAylward
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.