Re: Unify Anchor and Tag syntax

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <1272590081.2330.9.camel@nero>
The reason tags disallow non-URI tags is that, technically speaking,
tags are (parts of) URIs. Even if they are local tags, we want to keep
this property (both for consistency and to allow mooth migration path if
local tags are promoted to global tags by using a %TAG directive).

Anchors/aliases, on the other hand, are completely local and aren't
expected to survive processing, so they are restricted to help avoid
ambiguities inside flow collections etc.

Have fun,

    Oren Ben-Kiki

On Wed, 2009-12-30 at 18:58 -0800, William Spitzak wrote:
> Is there any reason the syntax for tags and anchors is so different?
> 
> Tags currently allow "[]," and disallow "non-URI characters". Some parts 
> of the 1.2 spec also say that "[]," are not allowed but this may be a 
> mistake.
> 
> Anchors allow all non-blank characters except "[{}],".
> 
> I would propose that the exact same syntax be used for both, by changing 
> both to the anchor rule (thus disallowing "[]," in tags).
> 
> If desired, the "verbatim tag" with '<' and '>' around it could allow 
> "[]," which I think would get you the desired ability to quote URLs.
> 
> I see no harm in allowing "non-URI characters" in the tags. The current 
> libyaml parser complains if the tag ends with anything other than a 
> blank, so this will not break anything.
> 
> Bill
> 
> 
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev 
> _______________________________________________
> Yaml-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/yaml-core



------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.