Re: Question on YAML 1.2 spec Example 9.5

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <1240523096.6320.71.camel@nero>
Oops.

You are absolutely right; this is a bad example. Thanks for catching it
- I really appreciate you delving into the details like that!

The thing is, in theory we _could_ get away with not making % an
indicator. The 1.2 spec contains a new explanation of the role of '---',
and this new way of thinking allows for that. I had that in mind when I
wrote the example... However - % has always been an indicator and we
don't think changing it right now is a good idea.

This throws into suspicion the need for '---' to terminate directives
(and here I was thinking I found some use for '---'. Sigh.) but we are
_really_ not going to get rid of '---'. Chalk the combination up to
"historical reasons" ;-)

Besides, who knows, perhaps we'll want to do something nifty with % on
YAML 9.7 or something ;-)

I'll fix the example and some wording in the part discussing '---' to
that effect.

Thanks again,

    Oren Ben-Kiki

On Thu, 2009-04-23 at 12:32 -0700, Joshua Choi wrote:
> To the YAML 1.2 spec writers,
> 
> In the current draft's Example 9.5:
> 
> %YAML 1.2
> ---
> % of matches: 20
> ...
> %YAML1.2
> ---
> # Empty
> ...
> 
> "% of matches: 20" seems to be a valid node, but I don't see how
> that's possible. "% of matches" is acting as a plain-style mapping
> key. Plain scalars cannot start with an indicator character such as %.
> How, then, is this allowed? (For the record, according to Instant
> YAML, PyYaml says that this is indeed invalid in YAML 1.1.)
> 
> Sincerely,
> Joshua Choi


------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
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.